We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

Compare at price, wrong colour - Minimal Theme

Solved

Compare at price, wrong colour - Minimal Theme

insideout_aus
Excursionist
35 0 4

Hey team,

 

The compare at price is coloured correctly on the collection grid page, but is showing the opposite colours on the product page. Please see below:

 

Collection grid:

 

IMG_8235.jpeg

 

Product page:

 

IMG_8236.jpeg



Can you please help me to correct the product page colour to:

 

Price = Red 

Compare at Price = Black (with strikethrough)

Accepted Solution (1)
PageFly-Noah
Shopify Partner
1317 233 282

This is an accepted solution.

Hi @insideout_aus Please help me to replace the code above with this new one:

<style>

#ProductPrice {
font-weight: unset;
color: red;
}

.product-single__sale-price {
color: #5b5754 !important;
}

 </style>

<script>
const pfInterval = setInterval(()=> {
const price = document.querySelector('#ProductPrice')
const comparePrice = document.querySelector('#ComparePrice')
const obj = comparePrice.childNodes

if(Object.keys(obj).length == 0){
clearInterval(pfInterval)
price.style.color = 'black'
}
},100)

setTimeout(() => {
clearInterval(pfInterval)
},5000)
</script>

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

View solution in original post

Replies 8 (8)

oscprofessional
Shopify Partner
16407 2444 3196

@insideout_aus 
Hello, Can You Please Share Your Store URL? I Will Check and Provide a Proper Solution

Hire us | Pass Core Web Vital | B2B Wholesale Experts | Claim Your Free Website Review |
Connect with Us: WhatsApp | Skype: oscprofessionals-87 | Email: pallavi@oscprofessionals.com |
Custom Shopify SolutionsPrivate Apps, Theme Customization & SEO | Digital Marketing |
OSCP Apps: Discount Suite | Wholesale App | Bundle & Upsell | Shipping Discount | and more...
insideout_aus
Excursionist
35 0 4

PageFly-Noah
Shopify Partner
1317 233 282

Hi @insideout_aus 

 

This is Noah from PageFly - Shopify Page Builder App

 

Please add this code to your theme.liquid above the </head> to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the </head>

<style>
#ProductPrice {
font-weight: unset;
color: red;
}

.product-single__sale-price {
color: #5b5754 !important;
}

 </style>

PageFlyNoah_0-1691630568756.png

 

Hope this can help you solve the issue 

 

Best regards,

Noah | PageFly

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

insideout_aus
Excursionist
35 0 4

This worked partially, but now my non-sale item prices are red

oscprofessional
Shopify Partner
16407 2444 3196

Hello @insideout_aus 

You can try this code: it will be helpful to you

Go to the Online Store->Theme->Edit code->Assets->timber.scss.css>Add this code at the bottom.

.product-single__prices span {
    color: red !important;
}

 

Hire us | Pass Core Web Vital | B2B Wholesale Experts | Claim Your Free Website Review |
Connect with Us: WhatsApp | Skype: oscprofessionals-87 | Email: pallavi@oscprofessionals.com |
Custom Shopify SolutionsPrivate Apps, Theme Customization & SEO | Digital Marketing |
OSCP Apps: Discount Suite | Wholesale App | Bundle & Upsell | Shipping Discount | and more...
insideout_aus
Excursionist
35 0 4

That also made my product prices red, to clarify I only want items on sale to be red so:

Compare at Price = Black with strikethrough
Price: Red

Single Price (without compare at price) = Black

PageFly-Noah
Shopify Partner
1317 233 282

This is an accepted solution.

Hi @insideout_aus Please help me to replace the code above with this new one:

<style>

#ProductPrice {
font-weight: unset;
color: red;
}

.product-single__sale-price {
color: #5b5754 !important;
}

 </style>

<script>
const pfInterval = setInterval(()=> {
const price = document.querySelector('#ProductPrice')
const comparePrice = document.querySelector('#ComparePrice')
const obj = comparePrice.childNodes

if(Object.keys(obj).length == 0){
clearInterval(pfInterval)
price.style.color = 'black'
}
},100)

setTimeout(() => {
clearInterval(pfInterval)
},5000)
</script>

Please let me know if it works by giving it a Like or marking it as a solution!


PageFly - #1 Page Builder for Shopify merchants.


All features are available from Free plan. Live Chat Support is available 24/7.

insideout_aus
Excursionist
35 0 4

Thank you @PageFly-Noah this worked perfectly