jolyanah Posted July 23, 2015 Share Posted July 23, 2015 Hello, In a module that I have created , after a request of all products in a category, I would then , in the same function , show those who are new , I did like this: private function getNewProducts($nbr){ $newProducts = false; $category = new Category()(int)$cat_id, (int)Context::getContext()->language->id); $products = $category::getProducts((int) $this->context->language->id, 1, ($nbr ? $nbr : 10); if (Configuration::get('PS_NB_DAYS_NEW_PRODUCT')) $result = $products->getNewProducts((int) $this->context->language->id, 0, $nbr); if (!$newProducts) return; return $newProducts; } And Prestashop is completely planted , As I don't know too prestashop , I don't know if it's the right syntax, Does anyone have an idea ? Thanks for your help,,, 1 Link to comment Share on other sites More sharing options...
jgamio Posted July 26, 2015 Share Posted July 26, 2015 Look the module blocknewproducts you have the same there just change to load a specific category Link to comment Share on other sites More sharing options...
moy2010 Posted September 12, 2015 Share Posted September 12, 2015 Hi, jolyanah. Did you manage to solve it? I'm looking for something similar . 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