How do I get the applicable price of a coupon in the Script Editor?

Solved
enginner-taro
Tourist
4 1 0

How do I get the applicable price of a coupon in the Script Editor?
You can retrieve a discount coupon from a Cart object in the Script Editor.
However, it is not possible to get the discounted price of the coupon.
For example, can I use a coupon code to get the applicable price of a coupon?

Accepted Solution (1)
enginner-taro
Tourist
4 1 0

This is an accepted solution.

Sorry, It's solved.

Here's the code.

puts Input.cart.discount_code.minimum_order_amount

 

It is not mentioned in the official documentation, so we would like to ask you to fix it.

 

https://help.shopify.com/en/manual/checkout-settings/script-editor/shopify-scripts#:~:text=in%20the%...

View solution in original post

Reply 1 (1)
enginner-taro
Tourist
4 1 0

This is an accepted solution.

Sorry, It's solved.

Here's the code.

puts Input.cart.discount_code.minimum_order_amount

 

It is not mentioned in the official documentation, so we would like to ask you to fix it.

 

https://help.shopify.com/en/manual/checkout-settings/script-editor/shopify-scripts#:~:text=in%20the%...