NoroHadzi Posted February 13, 2018 Share Posted February 13, 2018 (edited) Hello, Im using original module productscategory on prestashop 1.6. I want to show 6 products, so i changed this line: $category_products = $category->getProducts($this->context->language->id, 1, 6); /* 100 products max. */ Problem is, in some products I see only 5 products. I think the problem is becouse of deleting current product from the list... (when I delete this lines of code, i see in each product the right number - 6 products, but one is the same as current product): // Remove current product from the list if (is_array($category_products) && count($category_products)) { foreach ($category_products as $key => $category_product) { if ($category_product['id_product'] == $id_product) { unset($category_products[$key]); break; } } Does anybody have modification that works for selected number of products and not showing current product in list? Thanks Edited February 13, 2018 by NoroHadzi (see edit history) 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