Developer forum

Forum » Ecommerce - Standard features » Discount Calculations Incorrect

Discount Calculations Incorrect

George Jaros
Reply

While testing product discounts on a 9.16.6 site we discovered an issue with Discount calculations.

Wew set up a very basic 20% Discount and applied it to a Product Group.  When adding items from that group at multiple quantities to the cart the discounts initially display fine, but as soon as the order is placed the discounts still display correctly but are only applied once, not extended to the quantity of the item that was ordered.

Example:

  • An item costs $10 but has a 20% discount applied to its Product Group.
  • Add 10 of the item to the cart.  Product shows 10x$10 = $100, Discount shows 10x($2) = ($20), Order Total shows $80
  • Proceed through checkout, everything appears correct.  Line items, subtotal, and totals show correctly.
  • Complete order: Product is 10x$10 = $100, Discount shows 10x($2) = ($20), Order Total shows $98
    • The discount is only being applied one time, not ten, even though the line items show it applied ten times.

Replies

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi George

I will have QA look into it.

Please provide the following:

  1. Setup of your discount
  2. Your order discount settings (as displayed below)
  3. Screendumps of the checkout and receipt (including the template tags used to render the amounts in question in your template)

 
George Jaros
Reply
 
George Jaros
Reply
 
George Jaros
Reply

Here is the Order Discounts settings:

Discount configuration:

 

 

Discount shows correctly in the cart: 

Discount shows correctly through checkout.  This is the payment page.

 

However, as soon as the order is placed the discount goes from $6.40 to $0.64.  It's only applying once, not ten times.  This is even though the line item shows the correct amount.

 

Here's the order in the back end showing that the discount amount is only applied once ($0.64 instead of $6.40):

 

 
Oleg Rodionov Dynamicweb Employee
Oleg Rodionov
Reply

Hi all,

I've checked the case using exact the same conditions and steps described above on Swift solution based on last DW9.6.11 and was not able to reproduce the issue using dummy payment as well as valid QuickPay checkout. IIS pool was recycled before it. Please, have a look at the video about my test.

BR, Oleg QA uic

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Could it be Live Integration, messing with the order in the last step? If you have Live Integration, did you check the XML requests and responses?

I have a similar case with Care where recurring orders are created with this issue (discount only applied to 1, not all products on a line), so it could be something in DW anyway...

Imar

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

And it might be changed by removing the checkbox "Add orderline discounts per quantity" setting

 
George Jaros
Reply

Thank you.  It turned out that this was due to the Live Integration being set to process carts on order completion.  It's a setting we need for clients paying invoices, but it's also affecting initial orders so our Integration Team is making some updates.

 

You must be logged in to post in the forum