Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How do I count products displayed on product_listing.php


brandoneilers

Recommended Posts

Posted

I was wondering if anyone knew how to count the products displayed on the product_listing.php page. I have added a line between each product, but want to get rid of the last line at the very bottom under the last product. It looks a little tacky. I need to independently count the products and then display the line only if it is not the last one.

 

Here is a snippet of my code:

 

if (condition goes here) {
 $list_box_contents[][] = array('params' => 'valign="middle" colspan="3" class="infoBoxContents"', 'text'  => '<tr class="infoBoxContents" height="0"><td colspan="3" height="1" class="infoBoxContents">' . tep_draw_separator('pixel_brown.gif', '100%', '1') . '</td></tr>' );
  }

 

I really just need to know how to count all products before they are displayed one by one. I'm sure someone can help me.

 

Thanks.

Posted

The problem I face with this page is that it splits the results in half. I don't know how to work with it when it does that. I wish there was someone who could show me how to count the items being displayed before it did that.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...