Warning: Division by zero in /home/XXXXXXXX/public_html/XXXXXXXX/administrator/components/com_virtuemart/models/product.php on line 516
I just upgraded to 2.0.8a and got the above PHP warning message when I display products in category view.
			
			
			
				Hi everyone.
Same error, same place, same update...
			
			
			
				Hi all, 
As with the others above. Same bug, same place, same upgrade. 
			
			
			
				Me too!  :(
			
			
			
				try this:
replace line 516 with this:
    if($category->products_per_row>0){
   $rest = $suglimit%$category->products_per_row;
    }else{
   $rest =1;}
			
			
			
				Hi all, 
Although I haven't explored all the repercussions to doing so. I solved the problem by simply commenting out line 516. It seams to work without affecting any other part of the shop.
			
			
			
				This is a better solution: http://forum.virtuemart.net/index.php?topic=104707.0.
			
			
			
				The best solution is imho the one above and this
if(empty($limit)){
				if(!empty($category->limit_list_initial)){
					$suglimit = $category->limit_list_initial;
				} else {
					if(empty($category->limit_list_step)){
						$suglimit = VmConfig::get ('list_limit', 20);
					} else {
						$suglimit = $category->limit_list_step;
					}
				}
				if(empty($category->products_per_row)){
					$category->products_per_row = VmConfig::get ('products_per_row', 3);
				}
				$rest = $suglimit%$category->products_per_row;
				$limit = $suglimit - $rest;
			}