Site logo

Archived topic

WooCommerce sale badge and product thumbnails

7 replies · Started by Atmostfear on September 11, 2021

Viewing posts 1–8 of 8

Hello there,

We would like to place the Sale badge on the upper left side corner of the Product Thumbnail. Currently, it is displaying above the Product Title.

Also, our Product thumbnails somehow get on a row of 4 instead of fully extend to the size of the main thumbnail above, how can we set it to display in a way the 2 remaining images fit that area?

Preview: Absolvent Ambassador Bolero

Thank you in advance.

Hi there,

Can you disable cache plugin for now, so we can inspect the site better?

For the product images, are you using plugin to make it like this, it doesn't look like the Woocommerce default product gallery layout.
https://www.screencast.com/t/mifFxjmu

Let me know :)

Hello,

We disabled WP Rocket, and no, we are not using any plugin that handles the thumbnail images.

Thank you in advance.

So the thumbnails were not displaying right is because of the cache plugin, not they look normal on my end :)

You can try this CSS for the thumbnails layout:

.product ol.flex-control-nav.flex-control-thumbs {
    display: flex;
}

For the sale badge, try this CSS:

.woocommerce.single-product span.onsale {
    position: absolute;
    left: 20px;
    top: 20px;
}

Adjust the leftand top value to adjust its position :)

Hello,

While the issue with sale badge is now resolved, it is not with the product thumbnails.

The only cache we have to enable is default from Kinsta, which we have flushed already.

While the issue with sale badge is now resolved, it is not with the product thumbnails.

Sorry I don't quite follow, do you mean the thumbnails are not aligned to 1 row?

If so, I don't see my CSS code has been added to your site yet, or there's a CSS typo or format error in your previous CSS.

As you can see if I add the CSS in developer tool, it works:
https://www.screencast.com/t/slDRYuUz

Let me know if you need further assistance :)

Hello Ying.

Apologies, when we got your reply somehow the sale badge CSS was on it and the Products Thumbnails was missing or skipped our attention.

We have got now both issues resolved, thank you so much for the support.

No problem :)

Glad it's working now!

This archived topic is closed to new replies.