Catalog Price Rules Not Applied to Shopping Cart and Checkout in Magento 1.8/1.9

catalog-price-rulesmagento-1.8magento-1.9

I'm having troubles with Catalog Price rules. I have a rule that says YY% discount on products of manufacturer "X" for all members of customer-group "resellers"

I save and apply the rule (and cron is running so it updates every day), yet it does not work as expected.

The discount correctly shows on the product page, yet once you add the product to the cart, it reverts back to the original price, and this is the same for the actual checkout.

Yet if I create an order from the backend for the same customer, the discount is correctly applied…

Both the cart and the checkout use the stock base/default .phtml files for display of products/price/tax etc…

I've been experiencing this issue with Magento 1.8x, and just upgraded to 1.9.0.1 and still the same issue.

Best Answer

Not a set X to Y solution, but may help you debug this.

I'm not 100% at this point how the catalog price rules are applied to the products in the catalog, but what I can say is that they are applied differently in the catalog to in the cart.

Mage_CatalogRule_Model_Observer::processFrontFinalPrice() is where the catalog rules are applied to the cart items, so for example if I simply add return $this straight away I can replicated the exact behaviour your seeing, with the rules applied in the catalog, and indeed the admin as those are added in processAdminFinalPrice() but the cart rules are not applied.

    public function prepareCatalogProductCollectionPrices(Varien_Event_Observer $observer)
    {
        return $this;
        ...

Not a great answer but atleast this gives you somewhere to look.

Does the same problem happen when you don't set a specific customer group ID but instead select them all?

Related Topic