Just another WordPress.com weblog

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…

-Vishal Surani

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: