0

Have this scenario, a user must get 10% discount on only these products (product 1 & 2 is defined in rules), if at least 5 items of each is in cart.

Cart:

  • 5 pcs product 1 500
  • 5 pcs product 2 50
  • 1 pcs product 3 100

with the discount, the total will be 595, since the user will get 10% on 500+50 and not product 3

If the scenario is

  • 5 pcs product 1 500
  • 4 pcs product 2 50
  • 1 pcs product 3 100

the user will not get any discount.

1

It will help if you add the rule that you have added. Also if you think it's a complex rule to be applied, you can apply the discount in the checkout page rather than before that without using the rules itself. In other places just display the 1pcs price with the discount applied.

0

I sort of have figured half of it out.

the below isnt any particular programming language, but to show what i mean.

foreach (items as item)
  if (item.sku == v1 & item.value >= 5) or (item.sku == v2 & item.value >= 5) 
    item.price -= 10%
  endif
endforeach

My problem with rules is that both have to be present in the order.

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.