5

The situation is simple – I want to offer 25% discount on one product in the cart. So if you order 5 of Product A and 3 of Product B, you should receive 25% off either one of Product A or one of Product B but not both (so not more than 1 total).

Here are the current settings:

  • Apply = Percent of product price discount
  • Discount Amount = 25
  • Maximum Qty Discount is Applied To = 1
  • Discount Qty Step (Buy X) = 0

This currently gives the user 25% off of one Product A and one Product B. That is, the "Maximum Qty Discount is Applied To" seems to refer to cart line items, rather than total quantity.

I have looked at using the action conditions, but nothing seems to address this issue. Am I missing something? Or is an extension required for this functionality? Thanks in advance.

2
  • Under "Apply the rule only to cart items matching the following conditions (leave blank for all items)" Can you not just set it to only target Product A? If SKU is .... Jul 28, 2014 at 11:32
  • 1
    Did you succeed?
    – snh_nl
    Jul 25, 2015 at 19:53

1 Answer 1

5

Yes, there is no corresponding condition in the default magento shopping cart rules. And yes, there are some extensions at the magento connect. Search for "special promotions" or "advanced promotions" for example.

Basically, if you want to create a new module you can define a new action, similar to "fixed discount to whole cart" then observe event salesrule_validator_process and calculate total discount based on the first (say cheapest) product price. Take into account free shipping promo also.

The event is dispatched from app\code\core\Mage\SalesRule\Model\Validator.php as

    Mage::dispatchEvent('salesrule_validator_process', array(
        'rule'    => $rule,
        'item'    => $item,
        'address' => $address,
        'quote'   => $quote,
        'qty'     => $qty,
        'result'  => $result,
    ));
1
  • thank you for confirming! I will proceed as advised. Cheers. Jul 28, 2014 at 16:05

Your Answer

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

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