0
1. app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php

2. app/design/adminhtml/default/default/template/catalog/product/edit/options/option.phtml

3. app/design/frontend/rwd/default/template/catalog/product/view/options.phtml

4.app/design/adminhtml/default/default/template/catalog/product/edit/options/type/select.phtml

How to achieve this in module ?

2 Answers 2

2

1.app/code/core/Mage/Adminhtml/Block/Catalog/Product/Edit/Tab/Options/Option.php

 <global>
    <blocks>
       <adminhtml>
          <rewrite>
            <catalog_product_edit_tab_options_option>Spacename_Modulename_Block_Adminhtml_Catalog_Product_Edit_Tab_Options_Option</catalog_product_edit_tab_options_option>
          </rewrite>
      </adminhtml>
    </blocks>
   </global>

2.app/design/adminhtml/default/default/template/catalog/product/edit/options/option.phtml

class Spacename_Modulename_Block_Adminhtml_Catalog_Product_Edit_Tab_Options_Option  extends Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options
    {
        public function __construct()
        {
            parent::__construct();
            $this->setTemplate('test/yours.phtml'); // add you phtml file here
        }
    }

same goes for point 4. override Block

Mage_Adminhtml_Block_Catalog_Product_Edit_Tab_Options_Type_Select

and set template in

__construct

3 point Changing the product custom option renderer

2
  • 3 Point. Can I override options.phtml through local.xml without creating new block. Dec 2, 2016 at 4:14
  • @Pankaj if you are creating theme ten copy file in your theme and edit their. Dec 2, 2016 at 4:35
0

To rewrite a block follow this link: overwriting adminhtml block from another extension doesn't work

To override an adminhtml template follow this link: https://stackoverflow.com/questions/14448983/magento-override-adminhtml-template-file

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.