It seems shopping cart prices are always applied to the price in the cart.
Is there a feature/module that allows shopping cart prices rules to be applied to the items original RRP/price regardless if it has a special price and or group price?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityUse this event observer to set the shopping cart rule to base price of items instead speical or any group price.
sales_quote_address_collect_totals_after
public function updateccollects(Varien_Event_Observer $observer) { $quote = $observer->getQuoteAddress(); if ($quote->getData('address_type') == 'shipping') { // getting the items in cart $quoteObj= $quote->getQuote(); $cartItems = $quoteObj->getAllVisibleItems(); // print_r($cartItems); $totalPrice = 0; foreach($cartItems as $item) { $proId= $item->getId(); $productObj = Mage::getModel("catalog/product")->load($proId); $originalPrice = $productObj->getPrice(); $totalBasePrice = $totalPrice + $originalPrice; } // get the applied rule ids $cartRuleId = $quoteObj->getAppliedRuleIds(); $salesRule = Mage::getModel('salesrule/rule')->load($cartRuleId); $applyRule = $salesRule->getData('simple_action'); $discountAmmount = $salesRule->getData('discount_amount'); if($applyRule == "by_percent") { $finalDiscountAmount = $totalBasePrice*($discountAmmount/100); } $quote->setDiscountAmount($finalDiscountAmount); } }