Hi does anyone know how we can show the word
Free
for items that are £0.00 here is an example page [https://kitout-fitness.co.uk/collections/mockup-emulator\](https://kitout-fitness.co.uk/collections/mockup-emulator\)
its a mockup digital file thats free
if its code - what is it and where to place
thankyou for any support
here is an image its in a. collection
@Shane_h - this will need liquid code editing, price needs to be compared and then show the text
thanks this is my price liquid can you tell me where to put it and what
{%- comment %}BSS Login{% endcomment -%}{% capture bss_lock_check %} {% render ‘bss-lock-condition’, scope: ‘subject’, subject: product, subject_parent: product, variable: ‘price’, get_content: true, bss_lock_action: ‘bss_hide_price’ %} {% endcapture %} {% if bss_lock_check contains ‘bss-lock-element’ %} {{ bss_lock_check }} {% break %} {% endif %}{%- comment %}BSS-Login{% endcomment -%}
{% comment %}
Renders a list of product’s price (regular, sale)
Accepts:
- product: {Object} Product Liquid object (optional)
- use_variant: {Boolean} Renders selected or first variant price instead of overall product pricing (optional)
- show_badges: {Boolean} Renders ‘Sale’ and ‘Sold Out’ tags if the product matches the condition (optional)
- show_stock: {Boolean} Renders product ‘Stock’ if the product matches the condition (optional)
- show_sku: {Boolean} Renders product ‘SKU’ if the product matches the condition (optional)
Usage:
{% render ‘price’, product: product %}
{% endcomment %}
{%- liquid
if use_variant
assign target = product.selected_or_first_available_variant
else
assign target = product
endif
assign compare_at_price = target.compare_at_price
assign price = target.price | default: 1999
assign available = target.available | default: false
assign money_price = price | money
if target == product and product.price_varies
assign money_price = ‘products.product.price.from_price_html’ | t: price: money_price
endif
-%}
{%- comment -%}
Explanation of description list:
- div.price__regular: Displayed when there are no variants on sale
- div.price__sale: Displayed when a variant is a sale
- div.price__availability: Displayed when the product is sold out
{%- endcomment -%}
{%- if compare_at_price > price -%}
{%- comment -%} Renders sale price {%- endcomment -%}
-
{{ 'products.product.price.regular_price' | t }}
-
{% render 'render-price', price: compare_at_price, css_class: 'price-item price-item--regular' %}
-
{{ 'products.product.price.sale_price' | t }}
-
{% render 'render-price', price: price, css_class: 'price-item price-item--sale price--final' %}
{%- else -%}
{%- comment -%} Renders regular price {%- endcomment -%}
-
{{ 'products.product.price.regular_price' | t }}
-
{% render 'render-price', price: price, css_class: 'price-item price-item--regular price--final' %}
{%- endif -%}
{%- render ‘render-price-unit’, variant: product.selected_or_first_available_variant, always_render: true -%}
{%- if show_badges -%}
{%- render 'badge-onsale', product: target, position: 'in-content', size: 'sm' -%}
{%- render 'badge-soldout', product: target, position: 'in-content', size: 'sm' -%}
{%- endif -%}
{%- render 'stock-sku', target: target, show_sku: show_sku, show_stock: show_stock -%}
Hi @Shane_h .
You can read this thread and try to implement the accepted solution.
@Shane_h - can you accept me as collab? I will check complete code and let you know the changes
thankyou for your offer have decided to hide the £0.00 instead
1 Like