Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

infobox on main page


jimmygreaves

Recommended Posts

Posted

Has anybody experimented with including infoboxes in the main body of the page (i.e. not in the left or right columns).

 

Specifically I want to include an infobox on the product_listing module which would appear in with the products every, say, 7th item. I want to display random store info throughout - secure server, feephone number, ordering details, etc. just to remind people periodically of the "benefits" of using my store.

 

Any thoughts?

Posted

you can just call it with a require()

 

Matti

Posted

Yeah, I suppose that would call the file :-"

 

Where on the product_listing.php module is the reference to the product "count" so I can call the infobox every X products?

 

I'm thinking of a little script running doing somthing like............

 

if "count" == 5 or 10 or 15 etc... {

require(DIR_WS_BOXES . 'informationBox.php');

}

 

 

Any thoughts?

Posted

The variable for the count is $rows :)

 

Matti

  • 1 month later...
Posted

Need some help on this............

 

I've managed to get my infobox appearing on the product listing page.

Its positioned when ($rows = 2) the infobox is displayed.

Unfortunately the product which would normally appear when ($rows = 2) does not display at all - its replaced by my infobox.

 

Anybody else experinenced this kind of problem - some help is required!!!!

 

Thanks in advance...........

Posted
Need some help on this............

 

I've managed to get my infobox appearing on the product listing page.

Its positioned when ($rows = 2) the infobox is displayed.

Unfortunately the product which would normally appear when ($rows = 2) does not display at all - its replaced by my infobox.

 

Anybody else experinenced this kind of problem - some help is required!!!!

 

Thanks in advance...........

 

Just a BUMP - I really need some input with this. I'm sure the solution is simple but It needs a fresh pair of eyes to look at the problem.

 

Thanks boffins...........

Posted

BUMP!

 

I'd thought I'd include some code as to possibly generate interest.....................

 

..............................................

 

 

if ($column == 0) {

$lc_text = implode('<br>', $product_contents);

$list_box_contents[$row][$column] = array('align' => '',

'params' => '',

'text' => '<!-- column 01 --><table width="260" border="0" cellspacing="0" cellpadding="0"><tr><td height="2" colspan="4"><img src="images/prodboxTop.gif" width="250" height="2"></td><td rowspan="4" width="10"><img src="images/clear.gif" width="10" height="15"></td></tr><tr><td height="196" rowspan="2" width="2" background="images/prodboxLeft.gif"><img src="images/clear.gif" width="2" height="15"></td><td colspan="2" width="246" height="26" background="images/prodboxHeadbg.gif" class="greyHead" valign="top">  ' . $lf_text . '</td><td height="196" rowspan="2" width="2" background="images/prodboxRight.gif"><img src="images/clear.gif" width="2" height="15"></td></tr><tr ' . $lb_text . '><td height="170" width="231" valign="top" align="right" ' . $lh_text . '<table width="116" border="0" cellspacing="0" cellpadding="0"><tr><td height="15" align="right"><img src="images/clear.gif" width="10" height="15"></td></tr><tr><td height="50" valign="top" align="right" class="prodboxText">' . $ld_text . '</td></tr><tr><td height="63" valign="top" align="right" class="prodboxText">' . $la_text . '<br>' . $lg_text . '</td></tr><tr><td height="27" valign="middle" align="right" class="prodboxPrice"><img src="images/prodboxBaby.gif" width="27" height="27" align="absmiddle">' . $le_text . '</td></tr></table></td><td height="170" width="15" bgcolor="#FFFFFF"><img src="images/clear.gif" width="15" height="10"></td></tr><tr><td height="2" colspan="4"><img src="images/prodboxFoot.gif" width="250" height="2"></td></tr><tr><td height="10" colspan="4"><img src="images/clear.gif" width="250" height="10"></td></tr></table>');

 

}

 

else {

 

if (($row == 2)&&($column != 0)) {

$lc_text = implode('<br>', $product_contents);

$list_box_contents[$row][$column] = array('align' => '',

'params' => 'valign="top"',

'text' => '' . tep_display_banner('dynamic', 'Home Banne') . '');

 

}

 

else {

$lc_text = implode('<br>', $product_contents);

$list_box_contents[$row][$column] = array('align' => '',

'params' => '',

'text' => '<!-- column 02 --><table width="250" border="0" cellspacing="0" cellpadding="0"><tr><td height="2" colspan="4"><img src="images/prodboxTop.gif" width="250" height="2"></td></tr><tr><td height="196" rowspan="2" width="2" background="images/prodboxLeft.gif"><img src="images/clear.gif" width="2" height="15"></td><td colspan="2" width="246" height="26" background="images/prodboxHeadbg.gif" class="greyHead" valign="top">  ' . $lf_text . '</td><td height="196" rowspan="2" width="2" background="images/prodboxRight.gif"><img src="images/clear.gif" width="2" height="15"></td></tr><tr ' . $lb_text . '><td height="170" width="231" valign="top" align="right" ' . $lh_text . '<table width="116" border="0" cellspacing="0" cellpadding="0"><tr><td height="15" align="right"><img src="images/clear.gif" width="10" height="15"></td></tr><tr><td height="50" valign="top" align="right" class="prodboxText">' . $ld_text . '</td></tr><tr><td height="63" valign="top" align="right" class="prodboxText">' . $la_text . '<br>' . $lg_text . '</td></tr><tr><td height="27" valign="middle" align="right" class="prodboxPrice"><img src="images/prodboxBaby.gif" width="27" height="27" align="absmiddle">' . $le_text . '</td></tr></table></td><td height="170" width="15" bgcolor="#FFFFFF"><img src="images/clear.gif" width="15" height="10"></td></tr><tr><td height="2" colspan="4"><img src="images/prodboxFoot.gif" width="250" height="2"></td></tr><tr><td height="10" colspan="4"><img src="images/clear.gif" width="250" height="10"></td></tr></table>');

 

}

 

}

$column ++;

if ($column >= 2) {

$row ++;

$column = 0;

}

 

..............................................

Archived

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

×
×
  • Create New...