MarMis Posted February 10, 2016 Share Posted February 10, 2016 Standard all new products will be shown on the front page. I have added a couple of "new" products in my shop. But.....these are not really new but moved from one shop to another. I don't like all these products to be displayed on the front page. Is there a possibility that I mark these, so that these will not be shown between the other "really" new products? Link to comment Share on other sites More sharing options...
Knowband Plugins Posted February 10, 2016 Share Posted February 10, 2016 Hi, The best thing is you can assign old date_add to that product in the database. Modify date_add value in ps_product_shop database table. Alternatively, you can do this by modifying code. Edit /var/www/html/prestashop1612/classes/Product.php Search for Product::cacheFrontFeatures($products_ids, $id_lang); and add below three lines above search result. foreach ($result as $index => $pro_id) { if($pro_id['id_product'] == 11) unset($result[$index]); } 3 Link to comment Share on other sites More sharing options...
MarMis Posted February 10, 2016 Author Share Posted February 10, 2016 Hi, The best thing is you can assign old date_add to that product in the database. Modify date_add value in ps_product_shop database table. Alternatively, you can do this by modifying code. I hope this can be done per product. Try to find out where to find this. Can you assist and let me know where I can find this? thanks Link to comment Share on other sites More sharing options...
Knowband Plugins Posted February 10, 2016 Share Posted February 10, 2016 You need to know product id of those products, which you will find in url on edit product page. We are not aware of any setting in back end so you either need to access database or need to make change in code. If you are interested in some custom module for this feature, let us know. Link to comment Share on other sites More sharing options...
MarMis Posted February 10, 2016 Author Share Posted February 10, 2016 I am not so good in finding my way in the database. Need to learn sometime The ID number should be the same as in front of the article in the backoffice? or if I go into the article it is given like this: The product link will look like thishttps://www.tease2please.co.nz/lingerie-corsetsandbustiers/1101-Lingerie-CorsetsandBustiers-RomanticfrontZipperCorset.html am I right to think that the ID number is 1101, as I have added Have found the code as described and have changed it to the following: // Thus you can avoid one query per product, because there will be only one query for all the products of the cartforeach ($result as $index => $pro_id) { if($pro_id['1101'] == 11) unset($result[$index]);} Product::cacheFrontFeatures($products_ids, $id_lang); return Product::getProductsProperties((int)$id_lang, $result); } But unfortunately it is still in the "new" products. What am I doing wrong Thanks Link to comment Share on other sites More sharing options...
Knowband Plugins Posted February 10, 2016 Share Posted February 10, 2016 Try this Edit below file. /themes/default-bootstrap/product-list.tpl search for {foreach from=$products item=product name=products} and add below line after search result. {$prod_array=array('LILY POD WAND ATTACHMENT','BLACK ROTATION JELLY PENIS')} {if in_array($product.name|escape:'html':'UTF-8',$prod_array)} {continue} {/if} NOTE: you need to add condition based on your product name Link to comment Share on other sites More sharing options...
MarMis Posted February 10, 2016 Author Share Posted February 10, 2016 Thank you heaps for your advice. The only problem is.... it doesn't work I have tried to put it in default-bootstrap and in the warehouse theme I am using. But nope. Looks like: <ul{if isset($id) && $id} id="{$id}"{/if} class="product_list grid row{if isset($class) && $class} {$class}{/if}"> {foreach from=$products item=product name=products}{$prod_array=array('BURLESQUE VALENTINA CORSET','Satin Organza Pin On Bustle')}{if in_array($product.name|escape:'html':'UTF-8',$prod_array)} {continue}{/if} {math equation="(total%perLine)" total=$smarty.foreach.products.total perLine=$nbItemsPerLine assign=totModulo} Please let me know what I am doing wrong. I like to add more corsets, but don't want them getting the attention of my main product-line Link to comment Share on other sites More sharing options...
Knowband Plugins Posted February 11, 2016 Share Posted February 11, 2016 It should have worked for homepage, we have tested it on our demo installation and it was working fine. Link to comment Share on other sites More sharing options...
Knowband Plugins Posted February 11, 2016 Share Posted February 11, 2016 You can contact to get it done on your store. Link to comment Share on other sites More sharing options...
MarMis Posted February 11, 2016 Author Share Posted February 11, 2016 I have found it!!! It is as you suggested. I found the database and just need to change "date_add" Great, just a question is there a possibility that I can select more products and change them all at once or do I need to add them one by one? Link to comment Share on other sites More sharing options...
Knowband Plugins Posted February 11, 2016 Share Posted February 11, 2016 You need to run below query to do this for multiple products at once. Please be careful while running query, modify it with care and it is highly recommended that you make backup of complete database first. You can even use our Prestashop EasyDB backup module to make automatic backup of specific table or complete table. UPDATE `ps_product_shop` SET date_add= DATE_ADD(date_add, INTERVAL -100 month) where id_product=1 or id_product=2 Link to comment Share on other sites More sharing options...
Knowband Plugins Posted February 11, 2016 Share Posted February 11, 2016 Sorry, forgot to mention that you just need to change interval value and id_product values i.e -100 and 1,2 in above mentioned query. Link to comment Share on other sites More sharing options...
Rankxerox Posted March 15, 2016 Share Posted March 15, 2016 Hi Sorry if I'm late. But this module http://addons.prestashop.com/es/21957-new-product-select.html allows you to do what are you looking I guess. Link to comment Share on other sites More sharing options...
Henrik Pantle Posted February 7, 2019 Share Posted February 7, 2019 (edited) My solution: (proved in ps 1.7) in your database ( use phpMyAdmin for example) go to the table ps_product_shop and change the attribute date_add to a past, present or future date. be aware, in the table ps_product_shop only ACTIVE products are listed. The Duration of time how long a product is marked as new is 20 days as default. To change go to: Backend --> (Shop-)Preferences --> Products Edited February 7, 2019 by Henrik Pantle grammer (see edit history) 3 2 Link to comment Share on other sites More sharing options...
sting5 Posted November 29, 2019 Share Posted November 29, 2019 On 2/7/2019 at 7:17 PM, Henrik Pantle said: My solution: (proved in ps 1.7) in your database ( use phpMyAdmin for example) go to the table ps_product_shop and change the attribute date_add to a past, present or future date. be aware, in the table ps_product_shop only ACTIVE products are listed. The Duration of time how long a product is marked as new is 20 days as default. To change go to: Backend --> (Shop-)Preferences --> Products Muuuch better and quicker solution than all these alternatives on cloning the product..! Thank You Henrik for sharing this! Link to comment Share on other sites More sharing options...
biowebshop Posted May 23, 2020 Share Posted May 23, 2020 In 1.7.6.5 its actually Backend->Shop Parameters-> Product Settings 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