July 29, 20179 yr from ps-forum - with date-picker admin folder\themes\default\template\controllers\products\informations.tlp find the code <div id="product-pack-container" {if $product_type != Product::PTYPE_PACK}style="display:none"{/if}></div> <hr /> add this after ``` {if $product->date_add} {$bullet_common_field} {l s='New from'} {/if}
July 30, 20179 yr Does it give you an option to set old products as new? Please show live example for non programmers :)
July 30, 20179 yr Author @MockoB For us this is very helpful. If we get lists of new items from our wholesalers (dropshipping), then we can upload them by CSV. Very often, we only have to edit and activate the new articles several days later. So we can activate the article with the current date.
July 31, 20179 yr Perfect! I wonder why it is not native feature. I sell products which are unique and I was deleting it after every sale. Recently I decided to change just the picture to avoid loosing ranking but it is hard for customers to find them because they have to list all the product pages ... Are you sure it will not cause any troubles with database or other related features? And is it possible to add for the non native TB theme?
July 31, 20179 yr Author @MockoB I use the code for over a year with PS. There I had so far no problems. Since I have already switched some of my shops to TB, I could not find any problems so far. The code affects only the template in the BO under Edit Product, where the date of the article can be changed. In the FO, the article appears accordingly under NEW, if the date was set to the current.
July 31, 20179 yr I can confirm that this works like a charm because we used this already with PS 1.5. But sometimes we needed to deal with just the opposite, because we didn't want every new entry to show up in frontend. So we backdated the products via date_add and for the remaining new products "abused" the database field upc. Every entry > 0 serves as condition in blocknewproducts to display a product (or not). This is helpful, if you have many new products, but don't want them all in your shop's frontend and want only a choice of them displayed.
July 31, 20179 yr Author @Occam Yes. In the case of products which are used, for example, as an emergency aid for various things or are not to appear as new, we use an older date in the date field.
August 1, 20179 yr Great, I will implement it in my next shop! One more question, what if I update the store? Do I have to update the code also in the file and if that's the case is there way to avoid changes to be overwritten?
August 1, 20179 yr Not at all, feel free to do so. But in this case you should mention that the update safe way to implement such changes is always an override of the standard behavior and not a direct core change. The modified informations.tpl should be created as /override/controllers/admin/templates/products/informations.tpl
December 7, 20178 yr This should be added to the core I have moded my file works perfect YAH no more going into myphpadmin to change the date. Thank You
December 7, 20178 yr @hfxracing said in Change Product Add Date to affect New: This should be added to the core I have moded my file works perfect YAH no more going into myphpadmin to change the date. Thank You agreed
December 8, 20178 yr Hm I am very surprised that is working. How can it without changing any php file? Btw I have coded a very similair function in an internal module... In other words: I also would like to see this in core ;)
December 8, 20178 yr @lesley said in Change Product Add Date to affect New: There are lots of hidden things in the code... Like easter eggs. hahah :D who can find them :)
December 9, 20178 yr I have a list of a lot of them. Image mapping, shipping orders to multiple addresses, using multiple carriers per order. There are a lot.
December 24, 20178 yr Author can an admin or moderator please move this topic to the new category Tips and Tricks
January 13, 20188 yr @Nemo Thank you for creating the video to make it understandable to create an override and edit a template. http://nemops.com/eidt-product-creation-date-thirtybees-prestashop/ @zimmer-media - Thanks for creating this for us in the first place. Naturally, @Nemo gave you credit for it. :)
February 16, 20188 yr I have change the add product date, but it don't come up on the FO, tab NEW products. browser cache and BO cache refreshed. On the pictuere there are the "new" label.
February 22, 20188 yr Author @alwayspaws hi stephanie - I'm not petty, but I do not have this code from nemo's website - look at the date
Create an account or sign in to comment