How to remove background color

Solved
Sermak
Pathfinder
149 3 38

Hello there,

I have a problem in product page... Because i have paint the background of the "You save $25", I see that the products that does not have discount appears a dot under the price.. Here is what i mean below..

Καταγραφή 2.PNGΚαταγραφή 1.PNG

 

Can anyone help me please to remove the green dot when a product doesn't have a discount? 

 

Here is a produuct page with discouunt code: https://theloggos.com/collections/t-shirts/products/unisex-oversize-t-shirt-ecru?variant=32811793645... 

Here is a produuct page withouut discouunt code: https://theloggos.com/collections/all-products/products/red-tie-dye-crew-socks 

 

 

Accepted Solution (1)

Accepted Solutions
diego_ezfy
Shopify Partner
2299 413 539

This is an accepted solution.

@Sermak,

1. In your Shopify Admin go to online store > themes > actions > edit code
2. In your theme.liquid file, find the </body> (press CTRL + F or command + F on Mac)
3. paste this code right above the </body> tag:

<script>
function removeEmptyYouSave(){
var $youSave = document.querySelector(`.template-product .percentdis`);

if (!$youSave){
    return;
}

var text = $youSave.innerHTML.trim();

if (text === ''){
    $youSave.remove();
}

}

removeEmptyYouSave();
</script>



Kind regards,
Diego

 

◦ Slideshow images cutting off? Try the Slideshow (PRO) section. No apps required. | Replace apps with copy/paste code snippets & save money. Examples here.

View solution in original post

Replies 4 (4)
diego_ezfy
Shopify Partner
2299 413 539

This is an accepted solution.

@Sermak,

1. In your Shopify Admin go to online store > themes > actions > edit code
2. In your theme.liquid file, find the </body> (press CTRL + F or command + F on Mac)
3. paste this code right above the </body> tag:

<script>
function removeEmptyYouSave(){
var $youSave = document.querySelector(`.template-product .percentdis`);

if (!$youSave){
    return;
}

var text = $youSave.innerHTML.trim();

if (text === ''){
    $youSave.remove();
}

}

removeEmptyYouSave();
</script>



Kind regards,
Diego

 

◦ Slideshow images cutting off? Try the Slideshow (PRO) section. No apps required. | Replace apps with copy/paste code snippets & save money. Examples here.

View solution in original post

KetanKumar
Shopify Partner
24919 2497 9031

@Sermak 

sorry for that issue can you you try this code

1. Go to Online Store->Theme->Edit code
2. Asset->/theme.scss.liquid->paste below code at the bottom of the file.

.product__price .percentdis {display: none;}
.price--on-sale .percentdis {display: block;}

 

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing
Sermak
Pathfinder
149 3 38

@KetanKumar Unfortunetly this doesn't work.. Thank you for your try!

 

@diego_ezfy This work for me! Thank you!!

KetanKumar
Shopify Partner
24919 2497 9031

@Sermak 

thanks for update

If helpful then please Like and Accept Solution.
Want to modify or custom changes on store Hire me.
- Feel free to contact me on bamaniyaketan.sky@gmail.com regarding any help
Shopify Partner | Skype : bamaniya.sky
PSD to Shopify | Shopify Design Changes | Shopify Custom Theme Development and Desing | Custom Modifications In to Shopify Theme | SEO & Digital Marketing