0

I'd like to overwrite the way this file works:

app\code\core\Mage\Catalog\Block\Product\View\Options\Type\Select.php

I thought all I had to do was copy it to:

app\code\local\Mage\Catalog\Block\Product\View\Options\Type\Select.php

That does not appear to be working. Is there another option available? My goal is just to change the HTML that is used here.

  • Had you clear all cache after put your file in local folder? – Chirag Rajput Apr 18 '18 at 13:26
  • caching is turned off, but I did go in and clear it anyway. – Battle Mage Apr 18 '18 at 13:31
  • So it is working now? – Chirag Rajput Apr 18 '18 at 13:34
  • @ChiragRajput no. – Battle Mage Apr 18 '18 at 13:35
  • Would you be able to accomplish your desired edits by copying app/design/frontend/base/default/template/catalog/product/view/options/type to a subtheme\fallback file? i.e. app/design/frontend/your/theme/template/catalog/product/view/options/type – mtr.web Apr 18 '18 at 19:23
0

In the linked code (below for posterity), the path

global/blocks/catalog/rewrite/Product_View_Options_Select

should be

global/blocks/catalog/rewrite/product_view_options_select

because the block class is specified using lowercase in layout XML files (eg. https://github.com/benmarks/magento-mirror/blob/1.7.0.2/app/design/frontend/base/default/layout/catalog.xml#L228).

/app/code/local/Lbb/Catalog/etc/config.xml

<?xml version="1.0" encoding="UTF-8"?>  
<config>  
    <modules>  
        <Lbb_Catalog>  
            <version>0.1.0</version>  
        </Lbb_Catalog>  
    </modules>  
    <global>  
        <blocks>  
            <catalog>  
                <rewrite>  
                        <product_view_options_type_select>Lbb_Catalog_Block_Product_View_Options_Type_Select</product_view_options_type_select>  
                </rewrite>  
            </catalog>  
        </blocks>  
    </global>  
</config> 

Hope this will help you.

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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