0

I have Bundle product, with fixed price. but when I add it to the cart it shows 0.00 or price for individual items associated in bundle below product. http://prntscr.com/clt0em

How to removce those individual prices and leave only main price for bundle. Additional problem is that those prices are without tax, so customer is confused. I would like to remove them completely, which file to change?

Thanks

0

Override the file app/code/core/Mage/Bundle/Helper/Catalog/Product/Configuration.php and modify the funtion getBundleOptions

    <helpers>
        <bundle>
            <rewrite>
                <catalog_product_configuration>NameSpace_ModuleName_Helper_Bundle_Catalog_Product_Configuration</catalog_product_configuration>
            </rewrite>
        </bundle>
    </helpers>

Add helper file in the module

NameSpace_ModuleName_Helper_Bundle_Catalog_Product_Configuration extends Mage_Bundle_Helper_Catalog_Product_Configuration {

public function getBundleOptions (Mage_Catalog_Model_Product_Configuration_Item_Interface $item)
{
    $options = array();
    $product = $item->getProduct();

    /**
     * @var Mage_Bundle_Model_Product_Type
     */
    $typeInstance = $product->getTypeInstance(true);

    // get bundle options
    $optionsQuoteItemOption = $item->getOptionByCode('bundle_option_ids');
    $bundleOptionsIds = $optionsQuoteItemOption ? unserialize($optionsQuoteItemOption->getValue()) : array();
    if ($bundleOptionsIds) {
        /**
        * @var Mage_Bundle_Model_Mysql4_Option_Collection
        */
        $optionsCollection = $typeInstance->getOptionsByIds($bundleOptionsIds, $product);

        // get and add bundle selections collection
        $selectionsQuoteItemOption = $item->getOptionByCode('bundle_selection_ids');

        $bundleSelectionIds = unserialize($selectionsQuoteItemOption->getValue());

        if (!empty($bundleSelectionIds)) {
            $selectionsCollection = $typeInstance->getSelectionsByIds(
                unserialize($selectionsQuoteItemOption->getValue()),
                $product
            );

            $bundleOptions = $optionsCollection->appendSelections($selectionsCollection, true);
            foreach ($bundleOptions as $bundleOption) {
                if ($bundleOption->getSelections()) {
                    $option = array(
                        'label' => $bundleOption->getTitle(),
                        'value' => array()
                    );

                    $bundleSelections = $bundleOption->getSelections();

                    foreach ($bundleSelections as $bundleSelection) {
                        $qty = $this->getSelectionQty($product, $bundleSelection->getSelectionId()) * 1;
                        if ($qty) {
                            $option['value'][] = $qty . ' x ' . $this->escapeHtml($bundleSelection->getName());
                        }
                    }

                    if ($option['value']) {
                        $options[] = $option;
                    }
                }
            }
        }
    }
    return $options;
}

}

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.