Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Want to add a HR to the newproducts.php


mrossi

Recommended Posts

Posted

I want to know if anyone has figured out how to add a <hr> to the new_products.php?

 

Mine displays 3 products accross and I want to add a <hr> between the next set of 3 products.

 

thanks, matt

Posted

Hi, you can try this one:

Take look at "catalog\includes\modules\new_products.php". Find a code:

    $col ++;
   if ($col > 2) {
     $col = 0;
     $row ++;

(There can be some other values but it's a line where column counter will be increased, about line 60...70).

 

After it, add a code:

  if ($row % 3 == 0) {
	 echo "<hr>\n";
  }

-ppajukos-

Posted

Tried it but it didnt seem to work, it added the HR above the table. I wish I new php code if I could get this to work it would be sweet.

 

thanks, matt

Posted

Similar to what was recommended, but use this instead:

 

$info_box_contents[$row][$col] = array('align' => 'center',
     'params' => 'colspan="3"',
     'text' => "<hr>");
$row ++;

 

So the whole block of code will now look like this:

 

if ($col > 2) {
$col = 0;
$row ++;
$info_box_contents[$row][$col] = array('align' => 'center',
   'params' => 'colspan="3"',
   'text' => "<hr>");
$row ++;
}

 

Hope it helps...

Archived

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

×
×
  • Create New...