Adding color swatches in Venture theme

MVUILL
Excursionist
27 0 8

@Yaaayu @Benjamin_Lung Thank you so much for this toturial! You made my day!

It seems that the files with the colors are not found. Is there sth I should change in the code?  

https://www.french-address.com/collections/amour-amour

MVUILL_0-1618406652602.png

 

0 Likes
BRADIENT
Tourist
4 1 2

He added an extra underscore, remove the , '_'

...replace_first: ' ', '_' | remove:...

It should look like this:

 

<img src="https://cdn.shopify.com/s/files/1/123/321/4321/files/{{ color | downcase | strip_newlines | strip_html | replace_first: ' ' | remove: ' ' | append: '.gif' }}" width="16" height="16" border="0" alt="{{color}}" style="border: 1px solid #bdbdbd;border-radius: 50%;" />

 

and the colorweb like this:

 

{% assign colorweb = 'https://cdn.shopify.com/s/files/1/123/321/4321/files/' %}

 

 

MVUILL
Excursionist
27 0 8

Fantastic! Thank you!

0 Likes