I've been trying to create a voucher code . i want to limit the products discount to 3 per person (so that the 100 % discount would be valid only on 3 products ) but for some reason it makes the whole SKU on the voucher code list discounted , it should be just maximum 3 products not all of them .

please view http://i.stack.imgur.com/yetQA.png


The Maximum Qty Discount is Applied To field is quantity per-product. So if you have that field set to 3, and someone puts in a single product with a quantity of 5, the discount will only be applied 3 times. However, if you put in 5 products with a quantity of 5 each, it will be applied 3 times to each product.

See Mage_SalesRule_Model_Validator

 * Return discount item qty
 * @param Mage_Sales_Model_Quote_Item_Abstract $item
 * @param Mage_SalesRule_Model_Rule $rule
 * @return int
protected function _getItemQty($item, $rule)
    $qty = $item->getTotalQty();
    return $rule->getDiscountQty() ? min($qty, $rule->getDiscountQty()) : $qty;

Even adding an Action condition like this, would not work, as it would then not apply the rule at all if the customer adds more than 3.

Quantity in cart equals or less than 3

I'm not aware of a built-in way to do what you're looking to do.

| improve this answer | |
  • so what do you suggest is there no way of doing it ? – Jay Dee Aug 20 '14 at 18:53
  • I don't know of a way, but I can't say for sure that there isn't a little trick for it. What I can confirm for you is that Maximum Qty Discount is Applied To isn't supposed to do what you're trying to do. – Tyler V. Aug 21 '14 at 18:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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