Adding "from.." in product price

Hi,

I am trying to add “from…” before showing my prices for my product cards throughout my horizon theme website except product page, checkout and in cart of course. I have multiple variants for each product so this would help alot! I’ve been trying to figure this out for months but no luck.

Help is much appreciated, thank you!

You can add this code to Custom CSS in Theme Settings, click Save, then check

product-card product-price > div:before { content: 'From'; }

Best regards,
Dan from Ryviu: Reviews & Loyalty app.

@omoot1 ,

Yes its possible. You will need to edit the product card template in your Horizon theme and add “From” before the price when the product has multiple variants or varying prices.

This only affects collection and product card prices, so your product page, cart, and checkout prices can remain unchanged. Its a small Liquid code change in the price snippet rather than a theme setting.

Where do insert the custom css?

And how would I do so?

From your Shopify admin > Sales channels > Online store > Edit theme > Theme settings

Best regards,
Dan from Ryviu: Reviews & Loyalty app.

Unfortunately, that didn’t work

Horizon has the logic, but only implements it in things like Product Highlight.

Easiest way is to add a Custom Liquid Block and use it in place of the Price Block:

Paste this in the Custom Liquid box and save:

{%- liquid
  assign product_resource = closest.product
  assign price_min = product_resource.price_min
  assign price_max = product_resource.price_max
  if settings.currency_code_enabled_product_cards
    assign price_min_formatted = price_min | money_with_currency
  else
    assign price_min_formatted = price_min | money
  endif
-%}

{% if price_min != price_max %}
  <span class="price">From {{ price_min_formatted }}</span>
{% else %}
  {% render 'price', product_resource: product_resource %}
{% endif %}

It will only show “From” if you have a variant that has a different price than the other variants.

This doesn’t interrupt anything. It won’t touch the files. It won’t touch the product page.

You can also use Tim’s code from the other thread.

Could you share the link to your store?

Your store has password-protected

This has worked for now, thank you so much!