From cd4fce5ed145d0bd9b53b494bfae83e577d49ae6 Mon Sep 17 00:00:00 2001 From: Lorenz Meyer Date: Thu, 21 Jul 2022 18:03:40 +0200 Subject: [PATCH] In multishop context filter orders by shop --- ps_crossselling.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ps_crossselling.php b/ps_crossselling.php index 0356b1a..bf8e932 100755 --- a/ps_crossselling.php +++ b/ps_crossselling.php @@ -251,7 +251,7 @@ protected function getOrderProducts(array $productIds = []) FROM ' . _DB_PREFIX_ . 'orders o LEFT JOIN ' . _DB_PREFIX_ . 'order_detail od ON (od.id_order = o.id_order) WHERE o.valid = 1 - AND od.product_id IN (' . implode(',', $productIds) . ') + AND od.product_id IN (' . implode(',', $productIds) . ') and od.id_shop = ' . $this->context->shop->id. ' ORDER BY o.id_order DESC LIMIT ' . ((int) Configuration::get('CROSSSELLING_NBR')) * static::LIMIT_FACTOR;