FROM CACHE - en_header

Discount type variable missing in Shopify object

QualityUnit_s_r
Shopify Partner
14 0 2

I hope this got directly to developers. Thank you for your attention...

In Admin panel, your can add special variables to your thank you page (Settings> Checkout> Order processing> Additional scripts). There is a variable for discount type ( {{discount.type}} ). Cool.

The problem is that the Thank you page has a JS object Shopify.checkout which also has a lot of useful info, it even has some info about discount (Shopify.checkout.discount.code) but the type is not available.

To make work with code pushed by webhooks easier (as I cannot use {{discount.type}} there) it would be great to have the same options in Shopify.checkout object. If not all, please add discount type if possible.

Thank you,
Martin

Replies 2 (2)
QualityUnit_s_r
Shopify Partner
14 0 2

May we have a developer response to this?

QualityUnit_s_r
Shopify Partner
14 0 2

Any reply here, preferrably from developers?