Hi, nicolas,
It does not work.
But thanks for your answer and I found where I could make change:)
I added below codes and it works now:
// Before foreach($rows as $r) {
$countedOrderProductIds = array();
// After ($limiter->limit_category_id > 0 && $limiter->limit_category_id == $r->category_id)
// ) {
if (array_key_exists($r->order_product_id, $countedOrderProductIds)) {
continue;
}
else {
$countedOrderProductIds[$r->order_product_id] = $r->order_product_id;
}
I guess that below inner join created repeated rows for a single order_product_id because if one product belongs to multiple categories, it will have multiple product_parent_id
$query .= ' INNER JOIN '.hikashop_table('product_category').' AS d ON (c.product_parent_id = 0 AND c.product_id = d.product_id) OR (c.product_parent_id = d.product_id) ';
I attached the cart.php file which I modified.