2

I have an article "Wood" (Articlenumber 1115). If the user puts 42 wood in the cart, then he should get one Axe for free, but he must put the Axe to his cart himself, because he has too choose one.

The axes which he can choose have the following article numbers:

521537, 521538, 521517, 521518, 521527, 521528


I created this rule as Condition (sorry for the german UI, I translated some strings)

enter image description here

This is the action (again: I translated it from german to english):

Actions

Problem:

If the user puts 42 Wood in the cart and then one axe, then it works and the axe is for free!

But if the customer puts another axe which is in the article number list to the cart, then it is also free, but I want to gift the customer only one axe.

The documentation says The discount applies to each qualifying item in the cart. How can I change it so that it only applies to one of the items and then stops?

I hope the problem was clearly described.

What am I doing wrong?

  • It might be worth looking at buying an extension. Not promoting or anything, but I am using Special Promotions Pro and it allows me to do number of different rules ;) – Greg Oct 16 '18 at 15:24
  • 1
    @BareFeet but does it fix OPs specific issue? or is it just "better"? – zack6849 Oct 16 '18 at 15:44
  • 1
    It would "fix" the OPs specific problem. There is an action rule Buy X Get Y (X and Y are different products) Percent discount. This would fulfil the requirement. – Greg Oct 16 '18 at 16:00
2

You've run into a similar issue as the one I recently did, what you said is accurate, magento will apply that discount on a line item basis, and the maximum qty is per line item, eg: 2 line items that meet the promo condition will both get the discount.

If I understand right, what you want is a per cart max use, which is unfortunately not supported out of the box with magento.

I'm unsure of the process with magento 1, but we had to develop an in-house solution in magento 2 for it.

In our case, we had to completely override \Magento\SalesRule\Model\Quote\Discount::collect with an Interceptor and implement a custom use limit and logic to calculate the discounts for the entire cart from there.

Also to avoid conflict or changing the existing logic for maximum use qty, I would suggest creating a new field specifically for this

I found it to be easier to add my field as a column on the sales_rule table as modifying the existing form wasn't working out.

I'm sure this isn't super helpful for magento 1, but hopefully it gets you in the right direction.

0

What if you create 5 separate Cart Rules

1 for each of the SKUs (i.e. do not use "is one of" condition for SKU, use "equals" instead with specifying only 1 SKU),

And for each of these Cart Rules select "Do not use further rules" => "Yes"? Will it work?

  • I tried this, and it does not work too. – Black Oct 17 '18 at 7:39
-1

Hey we can do this by checking our cart while we do checkout process for example: if you have 42 woods in cart and 1 axe which is free and now if customer goes to add a new axe which comes to your discount rules so at the time of adding that axe you can check your cart item if one of the axe which you mentioned in your rule already present you can show a popup to customer that you can only add one axe in cart at present.This approach might work. If you find this answer useful accept it as solution thanks.

  • Thats not a good idea, what if the user needs the second axe too? I just want to discount one – Black Sep 19 '18 at 5:33
-1

Please try to use contains instead is one of in actions section

I hope this will help you.

  • Does not work. I tried it. No discount is applied at all now. – Black Oct 11 '18 at 14:39

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.