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";