Hi Shopify community,
I am using the Debut theme. I found out that whenever I added variants to any of my products, this code will appear as seen in the photo below and I would like to get rid of it. Can this be solved?
Here is my website: https://discoverls.com
Thank you!
1 Like
Kani
August 22, 2022, 3:29pm
2
Hi @discoverls
please share your product-price-listing.liquid file
if you don’t mind I can send a collaborator request which will solve this issue quickly.
1 Like
Hi Kani,
Here is my product-price-listing.liquid file, thank you!
{% comment %}
Renders a list of product’s price (regular, sale, unit)
Accompanies product listings (collection page, search result) and not updated dynamically
Accepts:
variant: {Object} Variant Liquid object (optional)
product: {Object} Product Liquid object (optional)
show_vendor: {Boolean} Show the product’s vendor depending on the section setting (optional)
Usage:
{% include ‘product-price-listing’, product: product %}
{% endcomment %}
{%- liquid
if product.title
assign compare_at_price = product.compare_at_price
assign price = product.price
assign available = product.available
assign variant = product.variants.first
else
assign compare_at_price = 1999
assign price = 1999
assign available = true
endif
assign money_price = price | money
-%}
{% if show_vendor and product %}
{{ 'products.product.vendor' | t }}
{{ product.vendor }}
{% 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__unit: Displayed when the first variant has a unit price
div.price__availability: Displayed when the product is sold out
{%- endcomment -%}
{{ 'products.product.regular_price' | t }}
{%- if product.price_varies -%}
{{ 'products.product.from_lowest_price_html' | t: lowest_price: money_price }}
{%- else -%}
{{ money_price }}
{%- endif -%}
{{ 'products.product.sale_price' | t }}
{%- if product.price_varies -%}
{{ 'products.product.from_lowest_price_html' | t: lowest_price: money_price }}
{%- else -%}
{{ money_price }}
{%- endif -%}
{{ 'products.product.regular_price' | t }}
{{ compare_at_price | money }}
{{ 'products.product.unit_price_label' | t }}
{%- capture unit_price_separator -%}
/ {{ 'general.accessibility.unit_price_separator' | t }}
{%- endcapture -%}
{%- capture unit_price_base_unit -%}
{%- if 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 -%}
{%- endcapture -%}
{{ variant.unit_price | money }} {{- unit_price_separator -}}{{- unit_price_base_unit -}}
{{ 'products.product.on_sale' | t }}
{{ 'products.product.sold_out' | t }}
Kani
August 25, 2022, 3:13pm
4
sorry I can’t see the problem from this file, seems like you have not did that much change on it.
maybe it’s your currency convertor lead to this issue
I have sent you a collaborator request, if you don’t mind I can take a look on it tomorrow