Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to create new custom options type in magento?

How to create new product custom options type in magento, for example I have to give new image custom option type in magento which fetch image from my custom module table and I want to assign that image to my custom options image field .

like image 234
Mufaddal Avatar asked May 08 '12 14:05

Mufaddal


1 Answers

As Dustin Graham said, it is very tricky. First steps:

  1. Add new node under global/catalog/product/options/custom/groups. See examples in /app/code/core/Mage/Catalog/etc/config.xml.

  2. Create new block to render your custom option.

  3. Rewrite Mage_Catalog_Model_Product_Option and implement saving your custom type options (saveOptions() method) and loading your custom type options (getProductOptionCollection method).

If your custom type isn't very custom :) - it should be enough.

like image 64
Dmytro Zavalkin Avatar answered Oct 27 '22 14:10

Dmytro Zavalkin