• Resolved Noor Ullah

    (@unoor51)


    Hi,

    I’m curious about how WooCommerce distributes coupons within order items. I’ve generated a fixed cart coupon for $100.

    However, when I apply this coupon to an order, I’ve noticed that the coupon amount is divided among the order’s line items. I’m unclear about the logic WooCommerce uses to distribute the coupon amount. Is there a specific formula or method involved in this distribution process?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi there,

    Thanks for reaching out!

    I’m curious about how WooCommerce distributes coupons within order items

    This is a great question!

    To the best of my knowledge, WooCommerce distributes the fixed coupon amount in a nearly equal manner among the line items.

    Here is an example of the method for distributing the coupon amount:

    • Line Item 1 (Regular Price: $90)
    • Line Item 2 (Regular Price: $55)
    • Line Item 3 (Regular Price: $45)

    Here’s the breakdown of how the coupon amount is distributed:

    1. Calculate the total regular prices of the items in your cart: $90 + $55 + $45 = $190.
    2. Divide the coupon amount ($100) by the number of items in your cart (in this example it is 3). This results in an initial allocation of approximately $33.33 per item.
    3. Apply this initial allocation to each line item, which evenly reduces the regular price of each item by roughly $33.33.

    As a result, the prices for your items are adjusted as follows:

    • Line Item 1: Reduced to $56.66 (Original Price: $90, Discount: $33.34)
    • Line Item 2: Reduced to $21.67 (Original Price: $55, Discount: $33.33)
    • Line Item 3: Reduced to $11.67 (Original Price: $45, Discount: $33.33)

    I hope this helps!

    Thread Starter Noor Ullah

    (@unoor51)

    I appreciate your response, Roxy S. (woo-hc)..

    I’m facing a situation where the individual line item cost is lower than the discount amount. To illustrate, if one line item costs $30, I’m curious about how WooCommerce distributes the remaining discounted amount, which would be approximately $3.33 for a single line item, among the other line items.

    Hi there ??

    I’m facing a situation where the individual line item cost is lower than the discount amount. To illustrate, if one line item costs $30, I’m curious about how WooCommerce distributes the remaining discounted amount, which would be approximately $3.33 for a single line item, among the other line items.

    Feel free to go ahead with testing that. When testing this, with a test site of mine, I got the results showcased in the screenshots below, for reference.

    Direct link to image: https://snipboard.io/63WhQ2.jpg
    Direct link to image: https://snipboard.io/mKWjp8.jpg

    Just to clarify, is there a limitation to only utilize fixed cart coupons, or otherwise? This reminded me of another thread, which I’ll go ahead with linking here, for convenience.

    I trust that points you in the right direction, but if you have more questions, let us know.

    We’re happy to help.

    Hi there,

    We haven’t heard back from you in a while, I hope that you have managed to make some headway in getting this resolved!

    I’m going to mark this as resolved, however, feel free to create a new topic if you need any further help.

    Cheers!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Fixed coupon distribution in the order items.’ is closed to new replies.