Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

192
Views
Shopify asset not loading

I am trying to include a JavaScript file (named StoreLocator.js) from my Shopify assets by using the URL filters as explained in the Shopify documentation (see https://shopify.dev/api/liquid/filters/url-filters).

First of all, I uploaded the JavaScript file to the assets folder. I noticed during debugging that the uploaded JavaScript file is accessible under the following URL:

https://cdn.shopify.com/s/files/1/0551/8009/9636/t/6/assets/StoreLocator.js

I was able to debug this, because I used the same JavaScript file and the same URL filter in a previous project and it worked just fine. Therefore I could see, that Shopify uses this URL to load the JavaScript file.

However, by using the following URL-filter in the new project.

{{ 'StoreLocator.js' | asset_url | script_tag }}

it generates the following URL which is incorrect (note the part /t/6 vs /t9.

https://cdn.shopify.com/s/files/1/0551/8009/9636/t/9/assets/StoreLocator.js

Unfortunately I could not find any documentation about the URLs that the Shopify CDN generates. In the present case it would be interesting to know why the URL changed from /t/6 to /t9.

Can someone explain why the URL filter does not point to the correct URL?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try this code it will work:-

Make sure your StoreLocator.js file is present in Assets folder

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

After using this you have to check this url in 'view page source' and click this url and check url code in browser and in any code editor

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!