Theme: Stiletto
Currently, my site displays a price range for products with variants on collection pages. Since some of my products have a very small sample size, users get confused or bothered that it shows a price range that says “from $1.50” when in reality they will have to spend >$25 for a retail-size product.
I need to be able to adjust the price range to instead display the price of my first variant which is the normal-size product that is most commonly purchased. I’ve messed around in the code and can’t seem to get it right.
Attached is a screenshot of how it displays on the storefront as well as the code for the product item price.
use the variants object on the product object to get that variants price, or first_available_variant ,
or the price_max property, etc
https://shopify.dev/api/liquid/objects/product
{{ product.variants.first.price }} {{ product.first_available_variant .price }} , or {{ product.price_max }} , etc
This of course fully relies on the assumption that the first-variant for EVERY product will ALWAYS be “the normal-size product”, otherwise you need to build in some more robust logic.
If you need that type of customization , you can contact me directly for services.
Please provide context, examples: store url, theme name, post url(s) , or any further detail.
Contact Info in signature.
Where exactly in the code am I replacing this information?
Where exactly in the code am I replacing this information?