Jump to content

"On sale" tag over product photo - how to move it under?


Recommended Posts

Dear All,

I am selling books through prestashop and I have a problem with "On sale" tag which comes on top of my photo and mostly covering book titles.

Is there any chance to move this tag on the half way up the photo, or on top or under, but not to cover my photo?

Perfect place I marked blue on my attach photo here.

Thank you in advance!

Leo

prestashop.jpg

Link to comment
Share on other sites

You can edit the corresponding CSS in your /themes/classic/assets/css/custom.css file.

e.g. moving the positon with "top" - additional you can make it transparent with "opacity" if desired - just play with the values. It might require  cache refresh to become active

.product-miniature .product-flags {
	top: 50px;
	opacity: 50%;
}

 

Link to comment
Share on other sites

5 hours ago, JBW said:

You can edit the corresponding CSS in your /themes/classic/assets/css/custom.css file.

e.g. moving the positon with "top" - additional you can make it transparent with "opacity" if desired - just play with the values. It might require  cache refresh to become active


.product-miniature .product-flags {
	top: 50px;
	opacity: 50%;
}

 

Dear JBW,

as I am not so familiar with css, should (or could) I change "top" to "middle", or I have to change 50px?

And thank you so much for answer!

Link to comment
Share on other sites

Dear JBW,

my /themes/classic/assets/css/custom.css file is empty. I did not mention earlier, I use default theme.

I browsed through css files, and in my theme.css I have some product-flags associations, should I change it here?  I also have theme-rtl.css whic looks or is similar to theme.css, it has also code related to product-flags.

Here is the code in theme.css with product-flags:

 .product-miniature .product-flags li.product-flag,.featured-products .product-miniature .product-flags li.product-flag,.product-accessories .product-miniature .product-flags li.product-flag,.product-miniature .product-miniature .product-flags li.product-flag{min-width:3.125rem;min-height:1.875rem;font-weight:600}#products .product-miniature .product-flags li.product-flag.online-only,.featured-products .product-miniature .product-flags li.product-flag.online-only,.product-accessories .product-miniature .product-flags li.product-flag.online-only,.product-miniature .product-miniature .product-flags li.product-flag.online-only{top:13.1rem}#

 

I tryed to change "top:13.1rem" to 20rem and then to 100rem, nothing changes. Where should I clear the cache, on my browser or server cache?

 

Please give it a look and thank you!

Link to comment
Share on other sites

11 minutes ago, leonardo2212 said:

my /themes/classic/assets/css/custom.css file is empty. I did not mention earlier, I use default theme.

Yes thats nevertheless the correct file to place your custom code. I will overrule the default settings. Advantage is that your changes are not impacted/lost by any further upgrades of the standard files

Link to comment
Share on other sites

19 minutes ago, leonardo2212 said:

But now phrase "On sale" goes also under with "Discount amount", how can I leave "on sale" on top or bottom of photo?

Use this CSS instead:

.product-miniature .product-flag.discount {
	top: 50px;
	position: absolute;
}

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...