Create link with product.handle

Highlighted
New Member
4 0 0

I'm trying to create a for loop that list all the products in the collection and grabs the product handle and create a code that places the product handle in a url.

 

{% for product in collection %}
<img src="{{ product.handle | prepend: 'https://arturoagutierrez/img/' | append: '.jpg' }}" >
{% endfor %}

It comes out correct in the html code but the link does not make an image appear.

0 Likes
Highlighted

Very interesting! Did you find a solution? Did you check the browser console for any errors?

Was my answer helpful? Be sure to give it a "Like" and mark it as the solution - this way others can find it easily.
- Need help with a Shopify build or custom solution? Feel free to get in touch via hello@stonedigital.com.au !
- Did my reply help solve your problem? The above email is my Paypal too ʘ‿ʘ
0 Likes