Discount adjustment in orders

Discount adjustment is required for correct interaction with payment systems via which an online store receives payments from its customers.

There are two types of discounts related to products in Shop-Script:

  • discount for each ordered product;
  • discount for the entire order.

Information about discounts is transferred to payment systems with other payment details, which may be required for sales regulation carried out by the governments in various countries. Some controlling authorities do not accept discounts applied to the entire order and require that certain discount amounts are applied to individual items within an order. Therefore, to comply with such authorities’ requirements, the total order discount must be correctly distributed over the ordered products.

Some payment systems automatically perform such discount distribution but they do it in different ways, which may lead to inconsistencies in the accounting data. Customers may also raise unnecessary questions if they notice non-matching numbers in their payment documents and in the personal accounts or in order notifications.

Therefore, correct discount distribution over ordered items is a requirement for a modern online store. To ensure that such distribution is always completed according to the same rules, Shop-Script automatically performs it and sends the processed data to various third-party services via corresponding plugins when necessary.

In Shop-Script there are 2 methods of the discount distribution: with the adjustment of the total order discount amount and with the splitting of one of order items. To choose the desired method, use the “Order discount adjustment” setting in “Settings → Currencies” section.

Method 1. Adjustment of the total order discount amount

To use this method, select setting option “Order discount adjustment: increase the discount”.

With this setting option, the total order discount is equally distributed over all groups of ordered products. For instance, if the total discount is equal to $10 and an order contains 5 equal products then the discount for each product will be equal to $10 / 5 = $2.

Now let us look at a more complicated case when an order with the same total amount contains 3 equal products. The apparently “simple” solution would be to try and divide 10 by 3. But an exact division is impossible in this case because it results in $3.33 per product and a remainder of $0.01. If we ignore that $0.01 then a customer would receive a discount less by $0.01 and might thus get dissatisfied with the quality of an online store’s services.

If we try to work around this situation and apply the remaining discount of $0.01 to one of the 3 ordered equal products then this will result in different discounts applied to the same products. Such a discrepancy will lead to difficulties for an online store administrator when a customer requests a refund because an administrator will then somehow have to manually choose which of the product items’ cost must be returned—that of items with lower or with higher discount.

How the discount adjustment is performed

To ensure that customers always receive a promised, or greater, discount and that thet total discount amount is correctly distributed over ordered products, the discount amount is adjusted, i.e. increased by several cents so that the result can be divided by the ordered products’ quantity without a remainder.

We cannot decrease a discount in order not to upset a customer!

Order details before discount adjustment
  • product: 3 pcs. (total order discount = $10, order total = $100)
Order details after discount adjustment
  • product: 3 pcs. (total order discount = 3.34 x 3 = $10.02, order total = $99.98)

The discount is increased not in all orders. It takes place only in the cases with multiple copies of the same product ordered when the total order discount cannot be divided by their quantity without a remainder. If there is at least one product in an order whose quantity is equal to 1 then a division remainder, if there is any, is applied to such a single-product item and no discount adjustment is necessary in this case.

When the order discount is increased then the order total is reduced by the same adjustment amount.

Precision of the discount adjustment amount

In the above example we showed how the discount amount can be adjusted by several cents to make it dividable without a remainder by the quantity of ordered products. If necessary, the precision of that adjustment amount can be increased to tenths of dollars, integer dollars, tens, or even hundreds of dollars. In our example, the resulting discount amount, after an adjustment, can become $10.02, $10.20, $12, $30, or $210—each of these amounts is dividable by 3 without a remainder. Remember that the number 3 here denotes the quantity of ordered equal products and that that number can, of course, be different in real orders.

How to change the precision of the discount adjustment amount:

  1. Select the desired rounding precision in the properties of the currency in which you receive orders from your customers.
  2. Enable option “Rounding → For total discount amount” in section “Settings → Currencies”.

Method 2. Splitting of one order item into two

To use this method, select setting option “Order discount adjustment: split one of order items into two”.

To correctly handle cases when the total order discount cannot be divided by the quantity of the equal products without a remainder, one of order items is automatically split into two. After that the remainder of the division is added to one of the items obtained after the splitting.

Let us examine the same example with 3 equal products and a total order discount of $10. Since 10 is not dividable by 3, Shop-Script will split one order item containing 3 pcs. of the same product into two items or 2 pcs. and 1 pc. For each product piece within the first item a discount of $3.33 is applied, and for the remaining 1 product piece within the second item a slightly higher discount of $3.34 is applied. The sum of all items’ discounts will be the same as before the splitting: $3.33 x 2 + $3.34 x 1 = $10.

Order details before discount adjustment
  • product: 3 pcs. (discount for entire order is $10)
Order details after discount adjustment
  • product: 2 pcs. (discount for this order item is $3.33 x 2)
  • product: 1 pc. (discount for this order item is $3.34 x 1)

When one of order items is split into two then both the total order discount order and the quantity of ordered products remain unchanged. Modified is only the list of records about ordered products in the order details, which a customer can see in an order notification, in the personal account, and in payment documents.

0 comments

    Add comment

    To add a comment please sign up or login