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