leonard_margarit Posted July 3, 2015 Share Posted July 3, 2015 Everytime when a new products has been added, Prestashop is applying a "New" label on the picture and is keep it there base on the number of days has been set as new products will stay here. I need to "hide" this label. Any help how to do it? Link to comment Share on other sites More sharing options...
Paulito Posted July 3, 2015 Share Posted July 3, 2015 Hello I assume you have tried setting the amount of days to "0" Paul Link to comment Share on other sites More sharing options...
leonard_margarit Posted July 3, 2015 Author Share Posted July 3, 2015 Yes, i know about setting up amount of days "0". I need this NOT to be "0" because is reflected in the "New products" tab which i want to keep. I just want to hide label "New". Any other ideas? Link to comment Share on other sites More sharing options...
Paulito Posted July 3, 2015 Share Posted July 3, 2015 Hello again OK, the simplest way is just to use "display: none;" (without quotes) in the relevant css file. I'm using a mobile at the moment but will try to give you the answer when I get back to the office. Paul Link to comment Share on other sites More sharing options...
leonard_margarit Posted July 3, 2015 Author Share Posted July 3, 2015 Great, looking for the answer. Thanks Link to comment Share on other sites More sharing options...
Paulito Posted July 3, 2015 Share Posted July 3, 2015 Hello I have tried this on PS 1.6.0.14 (and please be aware it is an adult site) So try adding this to the bottom of: global.css .new-label {display:none} Before http://screencast.com/t/naOASb8L6jwR After http://screencast.com/t/ry155sH48F Paul Link to comment Share on other sites More sharing options...
leonard_margarit Posted July 3, 2015 Author Share Posted July 3, 2015 I am a bit "novice" in terms of Prestashop and programming, please explain in details. So, i am going to: store/themes/my theme/css/global.css Is it the right path? Where should i add: .new-label {display:none} ? Link to comment Share on other sites More sharing options...
Paulito Posted July 4, 2015 Share Posted July 4, 2015 Hello If your using default PS theme 1.6 then Yes: In my case then it is this my shop/themes/default-bootstrap/css/global.css I find it easier to place any css changes in global.css right at the very bottom of the file and to write a comment, so, it would look like this: /* Added This Code To Hide The "New Label" On My Products */ .new-label {display: none; Paul Link to comment Share on other sites More sharing options...
leonard_margarit Posted July 4, 2015 Author Share Posted July 4, 2015 I did so, but no change. I am using PS 1.6 BUT my own theme. I have attached here how global.css file look like. global css.pdf Link to comment Share on other sites More sharing options...
Krystian Podemski Posted July 4, 2015 Share Posted July 4, 2015 Create css file named for example 99-custom.css, upload to themes/your_theme/css/autoload/ in 99-custom.css place your CSS code, .new-label { display: none!imporatnt; } Link to comment Share on other sites More sharing options...
leonard_margarit Posted July 5, 2015 Author Share Posted July 5, 2015 In this "99-custom.css" should i put what i have in global.css plus ".new-label { display: none!imporatnt; }"? Or just ".new-label { display: none!imporatnt; }"? And how can i create a css file? Link to comment Share on other sites More sharing options...
PrestaShopDeveloper Posted July 5, 2015 Share Posted July 5, 2015 There's a typo in the CSS rule. It should be: .new-label { display: none !important; } Just create a text file called 99-custom.css and place it in the /css/autoload/ folder of your theme. Link to comment Share on other sites More sharing options...
Krystian Podemski Posted July 5, 2015 Share Posted July 5, 2015 In this "99-custom.css" should i put what i have in global.css plus ".new-label { display: none!imporatnt; }"? Or just ".new-label { display: none!imporatnt; }"? And how can i create a css file? Only this CSS which you want to rewrite Link to comment Share on other sites More sharing options...
leonard_margarit Posted July 5, 2015 Author Share Posted July 5, 2015 Unfortunately, this solution with creating a css file it doesn't work. What i did, i came back to original "global.css" file and found the piece of code where is state this label "New" and found if. I've placed "new-label {display:none}" and the label disappear but the text ("New" and in my language "Nou") is still there (see enclosed). Any idea? Here is the code: .label-new { .new-label {display:none} background: url(../img/new.png) no-repeat;}.label-sale { background: url(../img/sale.png) no-repeat; }.products-list-in-row .label-sale { .new-label {display:none} background: url(../img/sale.png) no-repeat;}.products-list-in-row .label-new { background: url(../img/new.png) no-repeat; } Link to comment Share on other sites More sharing options...
PrestaShopDeveloper Posted July 5, 2015 Share Posted July 5, 2015 (edited) In your latest code replace:.new-label {display:none}with display:none; but this will remove it from all the places, including the tab, so the rule must look differently.I'll need to see the source of the code of the tab in which you only need this "new" label. Edited July 5, 2015 by PrestaShopDeveloper (see edit history) Link to comment Share on other sites More sharing options...
leonard_margarit Posted July 5, 2015 Author Share Posted July 5, 2015 I need to hide "New" label from everywhere. Here's attached global.css file. global.css Link to comment Share on other sites More sharing options...
PrestaShopDeveloper Posted July 5, 2015 Share Posted July 5, 2015 (edited) Then you should do the following: .label-new { background: url(../img/new.png) no-repeat; } .label-sale { background: url(../img/sale.png) no-repeat; } .products-list-in-row .label-sale { background: url(../img/sale.png) no-repeat; } .products-list-in-row .label-new { background: url(../img/new.png) no-repeat; } should became: .label-sale { background: url(../img/sale.png) no-repeat; } .products-list-in-row .label-sale { background: url(../img/sale.png) no-repeat; } i.e. you must remove the 1st and the 4th declarations. This is according to the CSS file you provided. From some module there can be other changes.Another variant is the following: .label-new { display: none !important; } .label-sale { background: url(../img/sale.png) no-repeat; } .products-list-in-row .label-sale { background: url(../img/sale.png) no-repeat; } This way you are not displaying the new label, and the !important keyword makes the declaration to take precedence over the normal declarations. Edited July 5, 2015 by PrestaShopDeveloper (see edit history) Link to comment Share on other sites More sharing options...
leonard_margarit Posted July 5, 2015 Author Share Posted July 5, 2015 Second option worked, thanks a lot. Link to comment Share on other sites More sharing options...
7alberto7 Posted November 19, 2015 Share Posted November 19, 2015 Hello again OK, the simplest way is just to use "display: none;" (without quotes) in the relevant css file. I'm using a mobile at the moment but will try to give you the answer when I get back to the office. Paul Thanks, I changed global.css and it working! 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