Adjustment of the discount amount in customers’ orders

Adjustment of the discount amount is useful for correct integration with payment gateways and online cash registers. As a result of the adjustment, the discount amount may be increased by several cents.

In Shop-Script, there are two types of discounts applied to ordered items:

  • discount for individual items,
  • discount for the entire order.

Discounts-related information may be passed on to payment gateways and be required to be available on payment checks. However, payment gateways and government bodies do not always accept discounts applied to orders and require that a discount is marked as applied to individual order items. Therefore, for correct integration with various services, the discount for an entire order must be evenly distributed over all order items.

Some payment gateways are capable of distributing the discount amount but they may do it differently and thus cause discrepancies in numbers. This may result in errors in the accounting documents and online store customers may also ask unnecessary questions when they see different numbers on payment checks and in their personal accounts in your online store.

Discount adjustment over order items is a requirement for a modern online store. To ensure that such adjustment always occurs by the same rules, Shop-Script performs this operation first and then sends processed data to third-party services via corresponding integration plugins.

How the discount is distributed over order items

The discount for an order is evenly divided over all groups of order items with equal prices. For instance, if the total order amount is equal to $100 and there are 5 equal items in an order then the discount applied to each item is equal to $100 / 5 = $20.

A more complex case is when the discount for an order is equal to $100 and there are 3 equal items in an order. It might seem obvious to “simply” divide $100 by 3 but you cannot perform an exact division because it would result in $33.33 per item with a remainder of $0.01.

If you ignore those $0.01 then a customer would get a discount less by that amount and might be unsatisfied with your service.

If, however, you decide to apply the remaining $0.01 to any of the order items then it will turn out that different discounts are applied to equal items. This might cause you troubles when you are requested a refund—if a customer decides to return one of those equally priced items then you would face the dilemma of choosing which item to return: the one with the lower discount or the one with the greater discount? The necessity to make such a choice would be an additional hassle in your everyday online store management.

Discount adjustment

To ensure that a customer always gets the discount amount displayed on the checkout page and that the discount is evenly distributed over all order items, the discount amount is automatically adjusted, i.e. increased by several cents, so that it can be correctly divided by all items without a remainder.

Remember that we cannot reduce the discount to keep a customer satisfied!

The discount is not increased in all orders but only in those containing more than one item of each product so that the overall order discount cannot be divided by all items without a remainder. If, however, there is at least one item with the quantity equal to 1 then the remainder of the division is applied to that item and no discount adjustment is required in this case.

When the discount amount is increased as a result of the adjustment then the total order amount is decreased by the same value.

0 comments

    Add comment

    To add a comment please sign up or login