zimmer-media Posted July 29, 2017 Posted July 29, 2017 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}
MockoB Posted July 30, 2017 Posted July 30, 2017 Does it give you an option to set old products as new? Please show live example for non programmers :)
zimmer-media Posted July 30, 2017 Author Posted July 30, 2017 @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.
MockoB Posted July 31, 2017 Posted July 31, 2017 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?
zimmer-media Posted July 31, 2017 Author Posted July 31, 2017 @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.
Occam Posted July 31, 2017 Posted July 31, 2017 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.
zimmer-media Posted July 31, 2017 Author Posted July 31, 2017 @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.
MockoB Posted August 1, 2017 Posted August 1, 2017 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?
lesley Posted August 1, 2017 Posted August 1, 2017 Would it bother you all if I wrote a dev blog post about this?
Occam Posted August 1, 2017 Posted August 1, 2017 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
hfxracing Posted December 7, 2017 Posted December 7, 2017 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
SLiCK_303 Posted December 7, 2017 Posted December 7, 2017 @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
wakabayashi Posted December 8, 2017 Posted December 8, 2017 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 ;)
lesley Posted December 8, 2017 Posted December 8, 2017 There are lots of hidden things in the code... Like easter eggs.
wakabayashi Posted December 8, 2017 Posted December 8, 2017 @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 :)
lesley Posted December 9, 2017 Posted December 9, 2017 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.
zimmer-media Posted December 24, 2017 Author Posted December 24, 2017 can an admin or moderator please move this topic to the new category Tips and Tricks
alwayspaws Posted January 13, 2018 Posted January 13, 2018 @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. :)
Generaal Posted February 16, 2018 Posted February 16, 2018 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.
zimmer-media Posted February 22, 2018 Author Posted February 22, 2018 @alwayspaws hi stephanie - I'm not petty, but I do not have this code from nemo's website - look at the date
alwayspaws Posted February 22, 2018 Posted February 22, 2018 @zimmer-media Nemo thanked you so take it up with him, please. :)
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