When a customer searches for a product and finds it, there are two prices showing. How can I remove the higher price on this page. I do have compare at prices. I would prefer here to show just the smaller price. Thanks.
https://community.shopify.com/c/blog/how-to-get-support-from-the-community/ba-p/1399408
Without detail or inspectable code or site url it’s a shot in the dark as this will vary wildly by theme , your apps, and any customizations can affect this.
It’s highly likely you’ve customized the CSS of your theme somewhere affecting compare at prices to be style inappropriately as normally they are shown in strikethrough.
Look in search.liquid for product.compare_at_price and comment it out by wrapping it in comment tags {%-comment-%}…{%-endcomment-%}
If your products infact have no data in their compare at price fields , see if those price values displayed are the minimum and maximum prices of variants for that product.
If that lines up with what’s going on then in the themes search.liquid or related templates look for product.price_min or product.price_max comment out the html or liquid logic
https://shopify.dev/api/liquid/objects/product#product-price_min
https://shopify.dev/api/liquid/objects/product#product-price_max
Here is my search.liquid. I am using compare at prices and would like to keep them on the product pages but not on the search results.
{% paginate search.results by 30 %}
{{ 'general.search.title' | t }}
{% else %}{{ 'general.search.results_with_count' | t: terms: search.terms, count: search.results_count }}
{% endif %}{% if search.performed and search.results_count == 0 %}
{{ 'general.search.no_results_html' | t: terms: search.terms }}
{% endif %}{% if search.performed %}
{% if search.results_count > 0 %}
{% endif %}
{% if paginate.pages > 1 %}
{% include ‘pagination’ %}
{% endif %}
{% endif %}
{% endpaginate %}
{% include 'product-card-list', product: item %}
Would be where that is for theme modularity.
In that snippet repeat the prior process to find the proper part of the pricing code.
But to keep the display on product pages instead of commenting the logic out use a condition to check if it’s NOT on a search page/template.
{%- if template.name != "search" -%}
{%- comment -%}Render everywhere except on search templates{%- endcomment -%}
{%- endif -%}
Note this may not affect things like search autocomplete displays which would require separate effort.
Here is the product-card-list.liquid. Do I need to make the change here. Thanks.
{% if section.settings.show_vendor %}
Yes there a “compare” logic in there, or go deeper into {% include ‘product-price’ %}
Goodluck
Not sure what to change here. Can you be more specific. Thanks.
look for the relevant words compare, price_max ,etc in the code.
I tried a few of your suggestions and nothing is fixing it. Can you look at my code and let me know what else I can try?
