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.

5
  • Had you clear all cache after put your file in local folder? Commented Apr 18, 2018 at 13:26
  • caching is turned off, but I did go in and clear it anyway. Commented Apr 18, 2018 at 13:31
  • So it is working now? Commented Apr 18, 2018 at 13:34
  • @ChiragRajput no. Commented Apr 18, 2018 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
    Commented Apr 18, 2018 at 19:23

1 Answer 1

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 and acknowledge you have read our privacy policy.

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