Personalized checkout and custom promotions with Shopify Scripts
Hi,
We have received an email from Shopify advising we need to "Replace "order.{anything}" with “checkout.order_id” in Additional Scripts and similarly update any downstream systems that rely on this data".
In our additional script we have two "order." references, {{ order.order_number }} and {{ order.currency }}.
Please can someone confirm is they should both be replaced with {{ checkout.order_id }}, or should {{ checkout.currency }} be used for the latter?
Thanks in advance,
Carl
Solved! Go to the solution
This is an accepted solution.
Hi @carl_ft!
You have received this email because your additional scripts on the Thank you page reference the Liquid order object. You can verify these references by following these steps:
* From your Shopify admin dashboard, go to Settings > Checkout.
* Scroll down to the Order status page section
* Locate the Additional scripts input box.
* The input box displays only the first 5 lines of code.
* To view the entire code block, highlight all the content within the input box, making sure to scroll down all the way.
* Copy the highlighted content and paste it into a text editor of your choice.
* This will allow you to easily review and identify all instances of the order object within the code.
Why?
Order creation on Shopify is asynchronous, meaning the Thank you page is likely to load before an order is created. When this happens the Liquid order object isn't always populated. This means Critical 3rd party systems like Google ads and analytics should not rely on the order object on the Thank you page. By contrast, the Order status page only renders when an order has been created, so it is safe to reference the order object on that page.
Solution
If you have tracking scripts for when an order completes, there are a couple of options available to you to resolve this:
Mac | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
Thanks I had a same question also where is Additional Scripts? I cant find it under Edit code.
Additional scripts are located under Settings > Checkout, in the 'Order status page additional scripts' section
Looking for clarity on this as well. Feels like there was a typo in the email and it should be:
> Replace "order.{anything}" with “checkout.{anything}"
Please confirm, thanks.
This is an accepted solution.
Hi @carl_ft!
You have received this email because your additional scripts on the Thank you page reference the Liquid order object. You can verify these references by following these steps:
* From your Shopify admin dashboard, go to Settings > Checkout.
* Scroll down to the Order status page section
* Locate the Additional scripts input box.
* The input box displays only the first 5 lines of code.
* To view the entire code block, highlight all the content within the input box, making sure to scroll down all the way.
* Copy the highlighted content and paste it into a text editor of your choice.
* This will allow you to easily review and identify all instances of the order object within the code.
Why?
Order creation on Shopify is asynchronous, meaning the Thank you page is likely to load before an order is created. When this happens the Liquid order object isn't always populated. This means Critical 3rd party systems like Google ads and analytics should not rely on the order object on the Thank you page. By contrast, the Order status page only renders when an order has been created, so it is safe to reference the order object on that page.
Solution
If you have tracking scripts for when an order completes, there are a couple of options available to you to resolve this:
Mac | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
I have looked in our Additional Scripts coding and there is no "order.{anything}" code in there. Does this mean we don't need to worry about anything or should this have been in there somewhere initially? Thanks!
If you have the checkout.liquid file (only for Shopify Pro) check there also, if not you don't need to worry about anything.
Before August 13, 2024, you won't have access there anymore, and you have to move the whole code to the additional scripts (before August 28, 2025).
Hi Shopify -
How come this message/email was not sent out to all merchants?! How come this new update promised to keep Additional Scripts intact until Aug 2025 but as soon as we switched only the first checkout page (information,payment,shipping) all of a sudden our order object behaved completely differently in Thank You page/Additional scripts EVEN THOUGH we are not upgraded on our Thank You and Status Page?!
This was severely false advertising, where we were under the impression we would get more time to refactor everything we had on Additional Scripts to move into Customer Events. The whole roll out of Checkout Extensibility has been a hot mess to say the least.
I'm extremely disappointed in the severe lack of communication from Shopify, which resulted in our team not being able to take necessary action to maintain all of our pixel structure and in turn affecting our reporting downstream. Luckily I was able to correct this by sheer grit and determination.
Shopify should absolutely not be stating that 'Additional Scripts' will function as intended without putting a MASSIVE banner on top of 'Additional Scripts' to let everyone know that 'order' does not work anymore if you make the switch.
This has caused a massive headache for our team and I'm sure many other merchants. I still can't believe how Plus merchants are treated sometimes, seemingly zero technical support for when it actually matters and instead forcing high-paying contracts to dig for answers in forums.
Signed,
A very frustrated Shopify dev
Hey Community! As we jump into 2025, we want to give a big shout-out to all of you wh...
By JasonH Jan 7, 2025Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024