Sunday, February 8, 2015

Show the related products even if they have been added to the cart



# mkdir -p app/code/local/Mage/Catalog/Block/Product/List/

# cp app/code/core/Mage/Catalog/Block/Product/List/Related.php app/code/local/Mage/Catalog/Block/Product/List/Related.php

Change the following block:
        if (Mage::helper('catalog')->isModuleEnabled('Mage_Checkout')) {
            Mage::getResourceSingleton('checkout/cart')->addExcludeProductFilter($this->_itemCollection,
                Mage::getSingleton('checkout/session')->getQuoteId()
            );
            $this->_addProductAttributesAndPrices($this->_itemCollection);
        }
To:
        if (Mage::helper('catalog')->isModuleEnabled('Mage_Checkout')) {
            #Mage::getResourceSingleton('checkout/cart')->addExcludeProductFilter($this->_itemCollection,
            #    Mage::getSingleton('checkout/session')->getQuoteId()
            #);
            $this->_addProductAttributesAndPrices($this->_itemCollection);
        }

http://stackoverflow.com/questions/13235125/magento-related-product-dont-show-up

No comments: