Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- define('MAX_COLS_FOOTER', 1);
- define('MAX_ROWS_FOOTER', 4);
- if (strlen($recently_viewed_footer>1)) {
- $info_box_contents = array();
- $info_box_contents[] = array('align' => 'left',
- 'text' => 'RECENTLY VIEWED'
- );
- new infoBoxHeading($info_box_contents, false, false);
- $counter = 0;
- $info_box_contents = array();
- $recent_products = split(';',$recently_viewed_footer);
- $rows=0;
- $cols=0;
- foreach ($recent_products as $recent) { if ((strlen($recent) >0) && ($counter < (MAX_ROWS_FOOTER*MAX_COLS_FOOTER)) && ($rows<MAX_ROWS_FOOTER)) {
- $recent_info = tep_db_query("select p.products_image from " . TABLE_PRODUCTS . " p where p.products_id = '" . $recent. "'");
- $recent_info_values = tep_db_fetch_array($recent_info);
- $counter++;
- if (strlen($counter) < 2) {
- $counter = '0' . $counter;
- }
- $info_box_contents[$rows][$cols] = array('align' => 'left',
- 'params' =>'',
- 'text' => '
- <!-- Begin Wrapper -->
- <div id="wrapperrightinnner">
- <!-- Begin Left Column -->
- <div id="leftcolumnrightinnner">
- <a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $recent, 'NONSSL') . '">' . tep_image(DIR_WS_IMAGES . $recent_info_values['products_image'], tep_get_products_name($recent), '60px', '55px') . '
- </div>
- <!-- End Left Column -->
- <!-- Begin Right Column -->
- <div id="rightcolumnrightinnner">
- ' . tep_get_products_name($recent) . '</div></a>
- <!-- End Right Column -->
- </div>
- <!-- End Wrapper -->
- '
- );
- $cols++;
- if ($cols >= MAX_COLS) {
- $cols = 0;
- $rows++;
- }
- }
- } new tableBox($info_box_contents,true);
- }?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement