[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/includes/modules/ -> articles_xsell.php (source)

   1  
   2  <?php
   3  /* 

   4  $Id: articles_xsell.php 3 2006-05-27 04:59:07Z user $

   5  

   6  osCMax Power E-Commerce 

   7    http://oscdox.com

   8  

   9  Copyright 2006 osCMax 

  10  

  11  Released under the GNU General Public License 

  12  */ 
  13  
  14  if ($HTTP_GET_VARS['articles_id']) {
  15  $xsell_query = tep_db_query("select distinct a.products_id, a.products_image, ad.products_name from " . TABLE_ARTICLES_XSELL . " ax, " . TABLE_PRODUCTS . " a, " . TABLE_PRODUCTS_DESCRIPTION . " ad where ax.articles_id = '" . $HTTP_GET_VARS['articles_id'] . "' and ax.xsell_id = a.products_id and a.products_id = ad.products_id and ad.language_id = '" . $languages_id . "' and a.products_status = '1' order by ax.sort_order asc limit " . MAX_DISPLAY_ARTICLES_XSELL);
  16  $num_products_xsell = tep_db_num_rows($xsell_query); 
  17  if ($num_products_xsell >= MIN_DISPLAY_ARTICLES_XSELL) {
  18  ?> 
  19  <!-- xsell_articles //-->
  20  <?php
  21        $info_box_contents = array();
  22        $info_box_contents[] = array('align' => 'left', 'text' => TEXT_XSELL_ARTICLES);
  23        new contentBoxHeading($info_box_contents);
  24  
  25        $row = 0;
  26        $col = 0;
  27        $info_box_contents = array();
  28        while ($xsell = tep_db_fetch_array($xsell_query)) {
  29          $xsell['products_name'] = tep_get_products_name($xsell['products_id']);
  30          $info_box_contents[$row][$col] = array('align' => 'center',
  31                                                 'params' => 'class="smallText" width="33%" valign="top"',
  32                                                 'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . tep_image(DIR_WS_IMAGES . DYNAMIC_MOPICS_THUMBS_DIR . $xsell['products_image'], $xsell['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $xsell['products_id']) . '">' . $xsell['products_name'] . '</a>');
  33          $col ++;
  34          if ($col > 2) {
  35            $col = 0;
  36            $row ++;
  37          }
  38        }
  39        new contentBox($info_box_contents);
  40  ?>
  41  <!-- xsell_articles_eof //-->
  42  <?php
  43      }
  44    }
  45  ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7