From cf0f83ac6c06bf3ac27f0ce6b611d17996bacca8 Mon Sep 17 00:00:00 2001 From: Gena Date: Sun, 2 Dec 2018 06:27:22 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=80=D0=B8=20=D1=81=D0=B1=D0=BE=D1=80?= =?UTF-8?q?=D0=B5=20=D0=BA=D0=BE=D0=BB=D0=BB=D0=B5=D0=BA=D1=86=D0=B8=D0=B8?= =?UTF-8?q?=20=D0=B4=D1=83=D0=B1=D0=BB=D0=B8=D1=80=D1=83=D0=B5=D1=82=D1=81?= =?UTF-8?q?=D1=8F=20=D0=B2=D1=8B=D0=B7=D0=BE=D0=B2=20=D1=85=D1=83=D0=BA?= =?UTF-8?q?=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/classes/shopProductsCollection.class.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/classes/shopProductsCollection.class.php b/lib/classes/shopProductsCollection.class.php index 426272349..f0c9c7731 100644 --- a/lib/classes/shopProductsCollection.class.php +++ b/lib/classes/shopProductsCollection.class.php @@ -7,6 +7,7 @@ class shopProductsCollection protected $options = array(); protected $prepared = false; + protected $prepared_sql = false; protected $filtered = false; protected $filtered_by_features = array(); protected $title; @@ -1332,7 +1333,10 @@ public function getSQL() * @event products_collection.prepared * @param shopProductsCollection $this */ - wa('shop')->event('products_collection.prepared', $this); + if(!$this->prepared_sql) { + wa('shop')->event('products_collection.prepared', $this); + $this->prepared_sql = true; + } $sql = "FROM shop_product p";