Update product variable/price based on link click event without page reload

Shopify Partner
14 0 2

I Wanted to try and list some links that are assigned to a specific product variable and then when that link is clicked, it would update the product variable and pricing to reflect that variable selected from the onclick event. 

psuedo code:

<a href="javascript:void(0)" onclick="{% assign variable id to specific variable id and update the price%}"> variable name</a>

so each time a specific link is clicked it would update that variable id. For example Choose from an 8-pack, 18-pack, and 30-pack

 

Any suggestions or thoughts are greatly appreciated! Still learning this stuff!

Chris Weachock
0 Likes
New Member
1 0 0

Hello Chris,

I am professional shopify developer. Let me know if anything I can do for you.

You can easily contact me on my skype id - linuxbean

Thanks

 

 

0 Likes
Shopify Partner
14 0 2

Do you have any suggestions for how to implement this? I've looked at this github: https://github.com/carolineschnapp/make-image-change-variant/blob/master/product.liquid

Chris Weachock
0 Likes
Shopify Expert
49 0 12
Highlighted
Shopify Partner
14 0 2

Thanks! 

Chris Weachock
0 Likes