How to get HTML element value in Liquid

1.6k Views Asked by At

I am working on a Shopify store and want to get product's price as per the variant selection in product page. I would like to know how I can get HTML element's value using Liquid.

1

There are 1 best solutions below

0
On

You can't get element values, but selected_variant will get all of that Variant's attributes, including price:

{{ product.selected_variant.price | money }}