Add properties to line item in checkout page depends on discount code

Add properties to line item in checkout page depends on discount code

bluelcko
Shopify Partner
1 0 0

Hi, I am a new shopify partner development.

My website has the following function:
I want to use japan order csv to export orders.
And in the line items of the order there will be an X field, the X field will be calculated based on the product's price (including when using coupon codes).
I plan to pre-calculate the X field in the cart screen, and add X to the properties of a line item, so that when exporting csv, I can export the X field.
However, the problem occurs: when the customer uses a coupon code on the checkout screen, I cannot calculate the X field based on the discounted price when using the coupon code.

How can I solve this problem?
I'm a new developer and have no experience.

Replies 0 (0)