-1

What I want to do is removing the price from the options in the bundled products in the cart.

I made a folder Mage/Bundle/Helper/Catalog/Product/Configuration.php in my local folder and i copy/paste all the code from the core there.As we all know because Magento reads first from local it reads my changes first. It works but I feel it's not the correct way to do it?? I know how to rewrite Blocks/Models/Helpers/ but that specific Helper also implements interface so you can't just change one function.You have to implement all. Am I wrong with what I have done? If so please point me the "Magento" way. Thanks

3

This is very simple you have to override the this class and that class implement that interface.

Fist you need to create the module of that for that app\etc\modules\Keyul_Test.xml

<?xml version="1.0"?>
<config>
  <modules>
    <Keyul_Test>
      <active>true</active>
      <codePool>local</codePool>
    </Keyul_Test>
  </modules>
</config>

Create the following structure app\code\local\Keyul\Test and create two folder like etc and Helper

create the config file app\code\local\Keyul\Test\etc

<?xml version="1.0"?>
<config>
  <global>
    <helpers>          
        <bundle>
            <rewrite>
                    <catalog_product_configuration>Keyul_Test_Helper_Bundle_Catalog_Product_Configuration</catalog_product_configuration>
            </rewrite>
        </bundle>
    </helpers>
  </global>
</config> 

create the app\code\local\Keyul\Test\Helper\Bundle\Catalog\Product\Configuration.php

<?php
class Keyul_Test_Helper_Bundle_Catalog_Product_Configuration extends     Mage_Bundle_Helper_Catalog_Product_Configuration
{
  // override your method hear.
}

Hope you got Solutions.

  • 1
    (1) declaration file should not contain version number; (2) the version number in the config file is superfluous; (3) test classgroup & prefix declaration are superfluous; (4) the data helper is superfluous – benmarks Feb 10 '14 at 21:00

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.