Index: /model/wpsg_product.class.php
===================================================================
--- /model/wpsg_product.class.php	(revision 8061)
+++ /model/wpsg_product.class.php	(revision 8062)
@@ -738,11 +738,13 @@
 							1
 							".$strQueryWHERE."
+						GROUP BY
+							P.`id`
 						HAVING
 							1
-							".$strQueryHAVING."
+							".$strQueryHAVING."						
 					) AS innerSelect
 			";
           
-			// wpsg_debug($strQuery);
+			if (($arFilter['debug']??false) === true) wpsg_debug($strQuery);
 			
 			return $GLOBALS['wpsg_db']->fetchOne($strQuery);
Index: /views/produkt/index.phtml
===================================================================
--- /views/produkt/index.phtml	(revision 8061)
+++ /views/produkt/index.phtml	(revision 8062)
@@ -87,5 +87,6 @@
                             
                             $filterAll = $this->view['arFilter'];
-                        	
+                        	$filterAll['debug'] = true;
+                            
                             unset($filterAll['productgroup_ids']);
                         	unset($filterAll['productcategory_ids']);
