How to display price of the first variant in product page.

MinuSak
Excursionist
28 0 9

Hello,

Im using supply theme. Currently the catalog page is displaying the lowest price of the products. I want to display the price of the first variant.

Can anyone please help me with this.

Thanks in Advance.

Replies 6 (6)

pioneer100
Shopify Partner
1119 145 481

you will need to add below code to show first variant's price.

{{ product.selected_or_first_available_variant.price | money }}

If helpful, Please Like and accept The Solution.
MinuSak
Excursionist
28 0 9
Click to expand...
Thank you,, Where should i add this code?
pioneer100
Shopify Partner
1119 145 481

@MinuSak are you familiar with liquid programming in shopify?

If helpful, Please Like and accept The Solution.
MinuSak
Excursionist
28 0 9

little

MinuSak
Excursionist
28 0 9

can you please help

IonPillowFight
Tourist
5 0 4

You can also follow these steps:

- Step 1: Go to Online store > Themes > Actions > Edit code.

- Step 2: Go to snippets > card-product.liquid and look for
Code:  
{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}

- Step 3: Replace this code with

Code: {{ card_product.variants.first.price | money }}

** In case you want to include the currency code in your code replacement, you can modify it like this:

Code: {{ card_product.variants.first.price | money_with_currency }}

Thank you and good luck.