So following is the situation when the amount becomes 0 after applying the discount coupon code with percentage value.

  1. Create Coupon code by create discount of percentage type
  2. Where "Product discount conditions" = Apply to All
  1. Create Product with 0 base price
  2. Selected the options you have created for pricing attributes using options set
  3. On the product display page, Select an option, lets say an option of $100
  4. Click add to cart
  5. Go to cart page, value will perfectly display i.e. $100
  6. Click checkout
  7. On checkout page add coupon code
  8. After page gets refreshed the whole amount becomes 0 i.e order total = 0 and value of the item = 0

Or I can say that after applying discount code the code applies to the base price of the product

  1. If Base price of the product = $50
  2. If Selected option on product display page is = $100
  3. Total Value becomes = $150
  4. After applying discount code of percentage value of 10% the product total show on checkout page = $45, Subtotal = $50 and discount = -$5

Comments

vivek.saurabh’s picture

Issue summary: View changes
kunalkursija’s picture

Hi Vivek,

Did you find any solution for this ?

Trey’s picture

I just ran into this problem, I fixed it by changing the weight of the rule that applies the pricing attributes to be higher than the weight of the discount rules... now all of my discount rules have a weight of 0 and my pricing attributes rule has a weight of 2. This does not apply the discount to the pricing attributes which is the preferred behavior for our site.

vivek.saurabh’s picture

Hi Kunal,

Please try the solution mentioned by Trey, and let us know if that works for you or not.

Riff Raff’s picture

Trey's solution worked for me - the discount rule was stomping the attribute pricing modification. Altering the weight of the "Commerce pricing attributes calculation" rule solved the issue.

Thanks Trey!

tadesign’s picture

Hi,

I have exactly the same issue Vivek had originally. The rules weight change mentioned in #3 works, but as mentioned only for a case where the discount shouldn't apply to the pricing attribute cost. However I have a site that require the attribute cost to be discounted as well.

I had the discount setup as a product discount so I tried changing it to the order discount which does seem to work but then I get other issues which don't appear with the product discount i.e. the VAT amount shows the wrong value even though the subtotal/discount/total are correct. I also need to exclude a certain product type from being discounted and so far have only managed to do this with the discount set to product.

Does anyone have any ideas on how to get the attribute price not to zero with the discount applied and apply the discount to the attribute without changing the rules weight?

Kind Regards
Richard

anneeasterling’s picture

@tadesign / Richard, we've found this issue as well and have the same question. Did you ever find a solution?

Thanks,
Anne