Browse Source

wrong position of counter reset

extrafields will work now ;) and not the first product gets the last extrafields values
Jan 7 years ago
parent
commit
ddbfaf0788
1 changed files with 1 additions and 1 deletions
  1. 1 1
      htdocs/webservices/server_productorservice.php

+ 1 - 1
htdocs/webservices/server_productorservice.php

@@ -1048,11 +1048,11 @@ function getProductsForCategory($authentication,$id,$lang='')
 				$res  = $db->query($sql);
 				if ($res)
 				{
+					$iProduct = 0;
 					while ($rec = $db->fetch_array($res))
 					{
 						$obj = new Product($db);
 						$obj->fetch($rec['fk_'.$field]);
-						$iProduct = 0;
 						if($obj->status > 0 )
 						{
 							$dir = (!empty($conf->product->dir_output)?$conf->product->dir_output:$conf->service->dir_output);