public function runQuery( ProductSearchQuery $query ) { $db = Db::getInstance(); $request = 'SELECT `id_product` FROM `' . _DB_PREFIX_ . 'favorite_products`'; $productsCount = "SELECT `count('id_product')` FROM `' . _DB_PREFIX_ . 'favorite_products` "; $idcustomer = $db->execute($request); $count = $db->execute($productsCount); $result = new ProductSearchResult(); if (!empty($idcustomer)) { $result ->setProducts($idcustomer) ->setTotalProductsCount($productsCount); $result->setAvailableSortOrders( $this->sortOrderFactory->getDefaultSortOrders() ); return $result; } }
WHERE id_customer = ...
добавил, id_customer, тогда мен надо прописать ету переменную тоесть $id_customer = (int)$this->context->customer->id;верно?