How to stop text duplicating next to price on Impulse Theme

jubileo
New Member
2 0 0

Hi there,

We added this script to our product listings so text appears next to the pricing.

.product__price::after {
        content: "*Price includes taxes & postage";
   font-size:15px;
    display: block;
}

 

However, if an item is on sale, it ends up duplicating it twice. 

jubileo_0-1626759820067.png

 

How can we fix this problem so it only appears once?

Many thanks! 

0 Likes

Hello, which Shopify theme are you using?

Can you also provide the link to the website, so that I can take a look and suggest a solution?

• If the problem is solved remember to click ✅ to Accept Solution
• Press Like ?? if the answer was helpful
• Shopify/Shopify Plus custom development, optimization and consulting. You can hire me here.
0 Likes

The problem is caused by the fact that, when a product is on sale, there are 2 prices displayed that use the same class you used in your code.

I don't like it, because I would prefer much more solving it in the template using Liquid, but you can add this CSS at the end of your theme.css to do the trick:

And remove your previous code.

 

 

.product__price-savings:after {
    content: "*Price includes taxes & postage";
    font-size: 15px;
    display: block;
    color: #000;
}
.product__price-savings {
    display: block !important;
}

 

 

 

• If the problem is solved remember to click ✅ to Accept Solution
• Press Like ?? if the answer was helpful
• Shopify/Shopify Plus custom development, optimization and consulting. You can hire me here.
0 Likes

Another option, maybe cleaner.

.product__price:after {
    content: "*Price includes taxes & postage";
    font-size: 15px;
    display: block;
}
.product__price.product__price--compare:after {
    content: "";
}

  

• If the problem is solved remember to click ✅ to Accept Solution
• Press Like ?? if the answer was helpful
• Shopify/Shopify Plus custom development, optimization and consulting. You can hire me here.
0 Likes