Liquid, JavaScript, themes, sales channels
Hi!!! I just need help regarding on this how to remove the sale tag in the image but i need to show the compare price and selling price Iam using bounce less themes??? check the image below
Hi @jess1982
Would you mind sharing your store's URL so we can provide a solution here?
Hi @jess1982,
This is quite an easy fix as long as you're okay changing a bit of code. If you go in to the 'edit code' section of your theme, and find the file 'product-grid-item.liquid' file, you should see this section approximately 100 lines down:
{% comment %}
If on sale, add a badge
{% endcomment %}
{% if product.compare_at_price > product.price %}
{% assign sale_text_length = 'products.product.on_sale' | t | size %}
<span class="product-item__badge {% if sale_text_length > 6 %}product-item__badge--large{% endif %}">
{{ 'products.product.on_sale' | t }}
</span>
{% endif %}
You can just simply delete this section and there will be no badge displayed.
Please ensure you're comfortable making these changes, or alternatively hire a Shopify Partner to do this for you.
I'd be happy to assist if you need.
Kind regards,
James
Its already remove but when they go to the "search" their still a Sale Tag on the image
Hi @jess1982, glad to help you with your question. I’m sure, my given answer will help to solve your problem as adding the given code below in the section
1: Go to Online Store > Actions > Edit Code > Assets > style. css
And paste this code
span.sale-sticker.sale-title {
display: none;
}
Hopefully, that solves your problem. If not, please let me know if you're seeing any other issues.
Ah yes I forgot about that one. If you go to the file 'search-template.liquid', there is a very similar section you need to remove at about line 100 again:
{% comment %}
If on sale, add a badge
{% endcomment %}
{% if item.compare_at_price > item.price %}
{% assign sale_text_length = 'products.product.on_sale' | t | size %}
<span class="product-item__badge {% if sale_text_length > 6 %}product-item__badge--large{% endif %}">
{{ 'products.product.on_sale' | t }}
</span>
{% endif %}
Hopefully this should remove that last remaining badge for you.
James
Hey @jess1982,
You need to update the code in the price snippet.
Please share the store URL.
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024