Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

195
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda