oli Posted November 8, 2018 Share Posted November 8, 2018 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 More sharing options...
JBW Posted November 9, 2018 Share Posted November 9, 2018 Use the developer tools/style inspector of your browser to identify the correct CSS class/id. Then adjust the CSS in the custom.css of your theme. Here an example in classic theme. Link to comment Share on other sites More sharing options...
oli Posted November 9, 2018 Author Share Posted November 9, 2018 Thx for the answer, but still dont find it :s When i do the inspector i find this: So far so good, but the custom css is empty. Should i look here ? but that is cache ? I dont find the custom css from my theme... Link to comment Share on other sites More sharing options...
JBW Posted November 9, 2018 Share Posted November 9, 2018 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 More sharing options...
oli Posted November 9, 2018 Author Share Posted November 9, 2018 (edited) 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 November 9, 2018 by oli (see edit history) Link to comment Share on other sites More sharing options...
JBW Posted November 9, 2018 Share Posted November 9, 2018 Yes, this should work, have you tried it? If you only want to change the background color there is no need for the other attributes. Link to comment Share on other sites More sharing options...
El Patron Posted November 9, 2018 Share Posted November 9, 2018 (edited) deleted... Edited November 9, 2018 by El Patron (see edit history) Link to comment Share on other sites More sharing options...
oli Posted November 9, 2018 Author Share Posted November 9, 2018 (edited) Hi JBW, I did a few cache refreshes and the color has changed now ! A very BIG thank you from Belgium to help solving this problem ! Oli Edited November 9, 2018 by oli (see edit history) 1 Link to comment Share on other sites More sharing options...
goldies Posted December 26, 2020 Share Posted December 26, 2020 (edited) 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 December 26, 2020 by goldies (see edit history) 1 Link to comment Share on other sites More sharing options...
yaKay Posted March 25, 2021 Share Posted March 25, 2021 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now