Having trouble creating dynamic SKU's on liquid code in shopify

184 Views Asked by At

Hi im having trouble trying to make an img src change number(sku) dynamically based on which product i have selected. - its a bit difficult when i dont have access to the base HTML and only liquid code and templates.

(see screenshot 1) The codestring that needs to be with dynamic SKU

I need help with creating a codestring that makes the SKU=(number) dynamic - so that it changes the SKU based on what product i have selected on the website.

So that if i select product A it becomes sku=productA

and if i select product B it becomes sku=productB

I hope someone can help.

Kind Regards Alexander

I tried putting in all the SKU's with , in between. and that didnt work

1

There are 1 best solutions below

0
Fréderic Cox On

If you are in the product page you should be able to use {{ current_variant.sku }} to dynamically show the SKU in the src.