Jump to content

Change add to cart button color


Recommended Posts

Hello,

 

I've searched several time to search the background color from my add to cart button.

But all the results are for 1.5,1.6 but not for 1.7.

Do you guys have any idea to change the background color ?

It is currently in black and i want another color.

 

Thank you very much

Link to comment
Share on other sites

Thx for the answer, but still dont find it  :s

When i do the inspector i find this:

5be54f2c738bc_Schermafbeelding2018-11-09om10_06_45.thumb.png.5c1fec9891521739f8c7fefb40357f52.png

 

So far so good, but the custom css is empty.

Should i look here ? but that is cache ?

5be5510d7f36a_Schermafbeelding2018-11-09om10_17_24.png.ae5aa85b586030e62e5c6c5ebc261639.png

 

I dont find the custom css from my theme...

Link to comment
Share on other sites

So your template is using same class .btn-primary. You can override the setting in your custom.css (if your theme loads it - hopefully it does) - this file should be in the asset/css folder. For sure it is empty as load you don't have done any changes in it yet. In case custom.css is not used, you have to find the original css file (assets/css/theme.css in classic template). Don't forget to clear cache when testing css changes.

Link to comment
Share on other sites

Thank you for the  effort  JBW, im not that good in coding in presta :)

 

Ok, to be sure?

 

Il copy next lines to the custom.css:

}
.product-information .product-actions .add-to-cart {
 padding:8px 20px;
 width:auto;
 background:#000;
 color:#fff
}

 

Then save upload, and delete cache and hoping that the shops picks it up

Edited by oli (see edit history)
Link to comment
Share on other sites

  • 2 years later...

Use the developer tools/style inspector of your browser to identify the button color (code)

 Than go FTP html/themes/classic/assets/css  “theme.css”

Than find this color code in theme.css and change all codes with this color with your own color.

Force compilation and clear cache.

Prestashop 1.7.6.9 (Clasic theme)

Edited by goldies (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 months later...

Hi 2 u all,

 

Is it possible (and eventually how) to change the background-colour of the "add to cart" button in relation to the quantity? 

If qu >= 1 the color will be color1,

if qu=0 the color will be color2.

Thanks in advance to you all

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...