Posts Tagged ‘Catalog Price Rules’

Hello,

If you have problem with Catalog Price Rules…
When we apply catalog price rules then rules are reflect to product listing and product detail
but when we add product in cart its taking original product price …

I think its magento core problem.

Any-way , lets solve it ….

open Mage/Catalogrule/Model/Observer.php
around 101st line

you have this segment …

if ($observer->hasCustomerGroupId()) {
$gId = $observer->getEvent()->getCustomerGroupId();
} elseif ($product->hasCustomerGroupId()) {
$gId = $product->hasCustomerGroupId();
} else {
$gId = Mage::getSingleton('customer/session')->getCustomerGroupId();
}

Now in 4th line we have code like
$gId = $product->hasCustomerGroupId();
… simply change this to
$gId = $product->getCustomerGroupId();

Thanks…

-Bijal Bhavsar 🙂

Advertisements