Alex12 Posted October 28, 2013 Share Posted October 28, 2013 Hello, I m'trying to change the function "new product" to no longer bind to the date_add in the database. I created a new category. Each product since its default category + I link to the category "new products". I would like that when a product appears in his default category, it is recognized as a new product and therefore the banner new appears. I think we need to override this file classes/category.php And change the function reference getProduct if my new date added is less than x days. I wish that this new function returns if my product is also linked to the category new (in my case id_cat = 8) I have no idea to make this change and change sql query (line 552) to achieve this. Someone can help me? A big thank you Link to comment Share on other sites More sharing options...
math_php Posted October 29, 2013 Share Posted October 29, 2013 Hi Alex, Seems complicated to me. Perhaps you could modify date_add this way : - 'old product' : first january 2000 - 'new product' : today You will not have then to modify a method which is used by several parts of Prestashop and add complexity. Regards 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