Personalized checkout and custom promotions with Shopify Scripts
Hi,
Hope you are doing well.
I encounter an issue when I customize the Order Status page (Thank You page) using additional scripts.
Here is my scripts sample:
<script type="text/javascript">
console.log('{{checkout.order.gateway}}');
console.log('{{checkout.order.financial_status}}');
</script>
I have functions that depend on the order info.
https://shopify.dev/api/liquid/objects/checkout#checkout-order
https://shopify.dev/api/liquid/objects/order
So, I enabled a custom manual payment method and I processed to checkout with it.
However, on the Order Status page (Thank You page), most of time this liquid object "checkout.order" returns empty/null. Sometimes it returns correct result.
How can I resolve this issue?
Please help! Thank you in advance!
Solved! Go to the solution
This is an accepted solution.
hi @kevinz,
Based on what information you need, you should use the checkout.transactions, documentation here. Since checkout.order depends on payment provider. You can check the gateway and the financial status with checkout.transactions.
This is an accepted solution.
hi @kevinz,
Based on what information you need, you should use the checkout.transactions, documentation here. Since checkout.order depends on payment provider. You can check the gateway and the financial status with checkout.transactions.
Thank you for the prompted answer!!!
Now I am using checkout.transactions[0].gateway_display_name and checkout.transactions[0].status to get the values.
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024