De Verzamelman Posted October 25, 2017 Share Posted October 25, 2017 How can i remove the label "new" with products? For example, if i put a product on it, there is a new standard, but sometimes i can re-purchase old products. I don't want to disable new products, i only want to remove the label of it. I'm Using prestashop 1.7.2.3 Link to comment Share on other sites More sharing options...
De Verzamelman Posted October 25, 2017 Author Share Posted October 25, 2017 (edited) I found the following code in the file theme.css in my assets folder of my theme. When I change block to none, the label "new" is gone but unfortunately also all other labels (sale, online only) Does anyone have a solution? #products .product-miniature .discount-percentage, #products .product-miniature .on-sale, #products .product-miniature .online-only, #products .product-miniature .pack, #products .product-miniature .product-flags .new, #product .discount-percentage, #product .on-sale, #product .online-only, #product .pack, #product .product-flags .new, .featured-products .product-miniature .discount-percentage, .featured-products .product-miniature .on-sale, .featured-products .product-miniature .online-only, .featured-products .product-miniature .pack, .featured-products .product-miniature .product-flags .new, .product-accessories .product-miniature .discount-percentage, .product-accessories .product-miniature .on-sale, .product-accessories .product-miniature .online-only, .product-accessories .product-miniature .pack, .product-accessories .product-miniature .product-flags .new, .product-miniature .product-miniature .discount-percentage, .product-miniature .product-miniature .on-sale, .product-miniature .product-miniature .online-only, .product-miniature .product-miniature .pack, .product-miniature .product-miniature .product-flags .new { display: block; /*position: relative;*/ position: relative; /*added*/ /*left: -.4375rem;*/ /*top: .4375rem;*/ padding: .3125rem .4375rem; color: #fff; background: #2fb5d2; text-transform: uppercase; min-width: 2.125rem; min-height: 1.875rem; font-size: 1rem; font-weight: 600; text-align:center; /*added*/ clear:both; /*added*/ float:left; /*added*/ margin-top: .625rem; /*added*/ margin-left: -.3125rem; /*added*/ /*box-shadow: 2px 2px 4px 0 rgba(0, 0, 0, .2)*/ } Edited October 25, 2017 by De Verzamelman (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted October 29, 2017 Share Posted October 29, 2017 You want to remove it only for certain products, or for all products? If you want to remove it completely, then you can either edit the ProductPresenter, which has the the following code, and either remove it or comment it out. if ($product['new']) { $flags['new'] = array( 'type' => 'new', 'label' => $this->translator->trans('New', array(), 'Shop.Theme.Catalog'), ); } Or you might look into customizing the themes template files. For example, the following code is in the following file, which iterates through different product flags. You could check the product flag value is "new", and then choose to display it or not based on the product \themes\classic\templates\catalog\_partials\miniatures {block name='product_flags'} <ul class="product-flags"> {foreach from=$product.flags item=flag} <li class="product-flag {$flag.type}">{$flag.label}</li> {/foreach} </ul> {/block} Link to comment Share on other sites More sharing options...
Miss Etta Posted December 16, 2018 Share Posted December 16, 2018 On 10/29/2017 at 7:54 AM, bellini13 said: You want to remove it only for certain products, or for all products? If you want to remove it completely, then you can either edit the ProductPresenter, which has the the following code, and either remove it or comment it out. if ($product['new']) { $flags['new'] = array( 'type' => 'new', 'label' => $this->translator->trans('New', array(), 'Shop.Theme.Catalog'), ); } Or you might look into customizing the themes template files. For example, the following code is in the following file, which iterates through different product flags. You could check the product flag value is "new", and then choose to display it or not based on the product \themes\classic\templates\catalog\_partials\miniatures {block name='product_flags'} <ul class="product-flags"> {foreach from=$product.flags item=flag} <li class="product-flag {$flag.type}">{$flag.label}</li> {/foreach} </ul> {/block} Hello, Please for version 1.7.4.4? Yes, I'd like to hide the "new" flag, on products with the "sale" flag. In ProductPresenter.php : All this: if ($product['new']) and $product['on_sale']) and $product['reduction']) I'd like the assignment to be: $flags['new'] must be hidden. Or hide it in template file using classes? Up till now everything I did failed Any help is much appreciated. Thank you! Link to comment Share on other sites More sharing options...
Kishan Shiyaliya Posted May 7, 2019 Share Posted May 7, 2019 Hello, In admin panel, Go to Shop Parameters -> Product Settings In Option "Number of days for which the product is considered 'new'" , write 0. That's it. 1 2 Link to comment Share on other sites More sharing options...
Miss Etta Posted May 11, 2019 Share Posted May 11, 2019 I only wanted it for certain products. The product isn't new, it's advertised elsewhere. Just the photo is new. ( I won't be needing this anymore, but maybe someone else might.) Thanks! Link to comment Share on other sites More sharing options...
oakwood Posted May 12, 2019 Share Posted May 12, 2019 You need to edit the tables ps_product and ps_product_shop. Set the 'date_add' and 'date_upd' fields to more than 30 days in the past (or different period if not using the default setting). Then clear your cache. (these instructions apply to ver 1.6 but I expect it's the same in 1.7) 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