1

I want to make a shopping cart rule that applies to the original prices of each product not over special prices.

I was thinking to override Mage_SalesRule_Model_Rule model.

Any ideas?

1 Answer 1

0

Well for the record i have done this:

i overrode cart controller (Mage_Checkout_CartController) the methods: addaction, deleteAction ,updateItemOptionsAction

so i check for applied rules with:

 $appliedRuleIds = $this->_getSession()->getQuote()
            ->getAppliedRuleIds();

and then if it is my rule id,

i do this:

   foreach ($cart->getQuote()->getAllItems() as $quote) {
                    //get original price not special
                    $productPrice = $quote->getProduct()->getPrice();
                    $quote->setOriginalCustomPrice($productPrice);
                    // setCustomPrice
                    $quote->save();
                }

so the cart now has the original prices of the products

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.