Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Division by Zero error


Recommended Posts



First time posting - I did search the archives for any help to this issue but didn't find anything.


I keep getting this error when I go to view a product category. For instance, I go to my categories, click Flies, then the sub category Dry where it should show two products I have - instead I get this error.


The categories and products have images as well. I did install Additional Images v2.1.1. Any help would be much appreciated.


Best Regards,








Link to comment
Share on other sites

Whoops, sorry 'bout that. I've included lines 116-128 & 336-345.


Can you show the code of your product_listing.php




Maybe you have to add images or set any configuration settings after installation of the Additional Images.




  $counter = 0;
 for ($x = 0; $x < $no_of_listings; $x++) {

  if ($x % PRODUCT_LIST_NUMCOL == 0) {
    if (($counter+1)/2 == floor(($counter+1)/2)) {

      $list_box_contents[$row] = array('params' => 'class="productListing-even"');
      $class_for_buy_now_row = 'class="productListing-even"';
    } else {
      $list_box_contents[$row] = array('params' => 'class="productListing-even"');
      $class_for_buy_now_row = 'class="productListing-odd"';


		$column ++;   
	if ($x == ($no_of_listings -1)) {
		$last_column = ($x % PRODUCT_LIST_NUMCOL); 
		$fill_up_empty_cell = tep_draw_separator('pixel_trans.gif', '250px' , '1');			
		for ($column = ($last_column + 1) ; $column < $colnum; $column++) {
			$list_box_contents[$row][$column] = array('align' => 'center',
											'valign' => $lc_valign,
											'params' => 'class="productListing-data" width="'.$tdsize.'%"',
											'text'  => $fill_up_empty_cell);

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...