Shopify themes, liquid, logos, and UX
Hi
Can I please have some help in changing the From price to the maximum variant price?
For instance, one of our product's price is $65, there is a variant of pre order for 10% deposit of $6.5, with the current coding, it automatically shows the lowest price, can you please change the show price to always show the max value, in this case $65?
Thanks
Sorry you are facing this issue, it would be my pleasure to help you.
Welcome to the Shopify community!😊
Thanks for your good question.
Please share your site URL,
I will check out the issue and provide you a solution here.
thanks for url sorry your store is password project you have able to code try this
Go to Online store > Edit Code > Snippets > Product-price.liquid
Locate this line of code (Usually line no. 15)
assign price = variant.price
and replace it with
to
assign price = variant.price_max
Hi Ketan
I have disabled the password now, my bad.
I have tried your codes below, but I couldnt find assign price and didnt want to screw up the codes just in case..
Thanks
Fern
yes please assing price code and add
sorry but I meant I couldnt find the line to be replaced, any chance you can change it for me pls?
I have disabled the password now.
Thanks
Fern
yes please find this class and added
grid-link__meta or share code here
Below code is from Snippets - Product-unit-price.liquid
{%- unless available -%}
{%- if variant.title -%}
{%- assign available = variant.available -%}
{%- else -%}
{%- assign available = true -%}
{%- endif -%}
{%- endunless -%}
<span class="product-unit-price{% unless available and variant.unit_price_measurement %} hide{% endunless %}{% if wrapper_class != blank %} {{ wrapper_class }}{% endif %}" data-unit-price-container>
{%- capture unit_price_separator -%}
<span aria-hidden="true">/</span><span class="visually-hidden">{{ 'general.accessibility.unit_price_separator' | t }}</span>
{%- endcapture -%}
{%- capture unit_price_base_unit -%}
<span data-unit-price-base-unit>
{%- if available and variant.unit_price_measurement -%}
{%- if variant.unit_price_measurement.reference_value != 1 -%}
{{- variant.unit_price_measurement.reference_value -}}
{%- endif -%}
{{ variant.unit_price_measurement.reference_unit }}
{%- endif -%}
</span>
{%- endcapture -%}
<span class="visually-hidden">{{ 'products.product.unit_price_label' | t }}</span>
<span data-unit-price>{{ variant.unit_price | money }}</span>{{- unit_price_separator -}}{{- unit_price_base_unit -}}
</span>
How should I update the code?
Thanks
can please try this code
{%- unless available -%}
{%- if variant.title -%}
{%- assign available = variant.available -%}
{%- else -%}
{%- assign available = true -%}
{%- endif -%}
{%- endunless -%}
<span class="product-unit-price{% unless available and variant.unit_price_measurement %} hide{% endunless %}{% if wrapper_class != blank %} {{ wrapper_class }}{% endif %}" data-unit-price-container>
{%- capture unit_price_separator -%}
<span aria-hidden="true">/</span><span class="visually-hidden">{{ 'general.accessibility.unit_price_separator' | t }}</span>
{%- endcapture -%}
{%- capture unit_price_base_unit -%}
<span data-unit-price-base-unit>
{%- if available and variant.unit_price_measurement -%}
{%- if variant.unit_price_measurement.reference_value != 1 -%}
{{- variant.unit_price_measurement.reference_value -}}
{%- endif -%}
{{ variant.unit_price_measurement.reference_unit }}
{%- endif -%}
</span>
{%- endcapture -%}
<span class="visually-hidden">{{ 'products.product.unit_price_label' | t }}</span>
<span data-unit-price>{{ variant.unit_price | money }}</span>{{- unit_price_separator -}}{{- unit_price_base_unit -}}
<span>{{ variant.price_max }}</span>
</span>
Hi @KetanKumar
Unfortunately it didn't work 😞
I've checked different products and nothing much has changed
Let me know if I can provide any more details
Thanks
Fern
did you have see any error
there isnt any error, everything is basically the same..
Are you able to access my codes and website and have a look? I know nothing about coding and dont want to mess it up...
It can be done by doing some code customization. please send me a personal message and we can discuss what you'd like
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024