Wrong cart and line items cost - total and subtotal #430
Replies: 4 comments 2 replies
-
I noticed that for order discount functions, |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Have created a forum bug report for this: https://community.shopify.com/c/shopify-functions/wrong-cart-and-product-totals-in-order-discounts/m-p/2445374#M1546 |
Beta Was this translation helpful? Give feedback.
-
Product and order discount Functions are ran all at once, and their outputs are used later in the discounts engine, where, when determining the best discount combination, product discounts are considered first, then order discounts. It is unfortunately not a bug, as discount Functions can’t know about other discounts when they’re being executed, as it’s long before the discounts engine begins to consider discount combinations and the best one. We’re going to update the documentation to make this clearer. Discount allocators (currently in dev preview) would allow you to provide more control over the combination of order and product discounts. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Using product discount. for the cart, I am getting same amount for the total and subtotal fields. in addition, tax and duty values are null.
also, if i have a coupon applied, the Input is still the exact same.
for the line items, the item which is discounted by the function is with full price which is logical as the function haven't applied the discount yet. but the one which is discounted by a coupon, is still with full price.
how can i calculate the correct amount of the cart and line items?
Input (STDIN)
Beta Was this translation helpful? Give feedback.
All reactions