d
Topic
kayluhb Member
Posts:
1
Last edited 7 months ago
g
1
upvotes

asset_url liquid filter in Checkout > Additional Scripts Order Status page This post is outdated

I am experiencing some strange issues with using the asset_url filter in the Additional Scripts for the Order Status page.

<script src="{{ 'file1.js' | asset_url }}"></script>
<script src="{{ 'file2.js' | asset_url }}"></script>

Both of the tags in the example above generate a path to the files on the CDN, however file2.js links to a 404. Additionally, the generated url path to file1.js differs from the generated path by the actual theme.

For example, the above would produce 

<script src="//cdn.shopify.com/s/files/1/0190/1390/t/182/assets/file1.js?17773255192778122258"></script> - 200 status
<script src="//cdn.shopify.com/s/files/1/0190/1390/t/182/assets/file2.js?17773255192778122258"></script> - 404 status

Front end template produces

<script src="//cdn.shopify.com/s/files/1/0190/1390/t/12/assets/file1.js?17773255192778122258"></script> - 200 status
<script src="//cdn.shopify.com/s/files/1/0190/1390/t/12/assets/file2.js?17773255192778122258"></script> - 200 status

i
Replies
Alexis Shopify Employee
Posts:
22
7 months ago

Hey there,

Alexis here from Shopify Support!

I'm just moving your post over to our Shopify Design forum. This is the best place for coding and theme queries so you should hear from one of our experts soon.

If you need anything else, feel free to reach out to our Support, available 24/7 !

Warm regards,

Alexis | Shopify Guru