[ Index ]
 

Code source de osCommerce 2.2ms2-060817

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/catalog/includes/boxes/ -> whats_new.php (source)

   1  <?php
   2  /*
   3    $Id: whats_new.php,v 1.31 2003/02/10 22:31:09 hpdl Exp $
   4  
   5    osCommerce, Open Source E-Commerce Solutions
   6    http://www.oscommerce.com
   7  
   8    Copyright (c) 2003 osCommerce
   9  
  10    Released under the GNU General Public License
  11  */
  12  
  13    if ($random_product = tep_random_select("select products_id, products_image, products_tax_class_id, products_price from " . TABLE_PRODUCTS . " where products_status = '1' order by products_date_added desc limit " . MAX_RANDOM_SELECT_NEW)) {
  14  ?>
  15  <!-- whats_new //-->
  16            <tr>
  17              <td>
  18  <?php
  19      $random_product['products_name'] = tep_get_products_name($random_product['products_id']);
  20      $random_product['specials_new_products_price'] = tep_get_products_special_price($random_product['products_id']);
  21  
  22      $info_box_contents = array();
  23      $info_box_contents[] = array('text' => BOX_HEADING_WHATS_NEW);
  24  
  25      new infoBoxHeading($info_box_contents, false, false, tep_href_link(FILENAME_PRODUCTS_NEW));
  26  
  27      if (tep_not_null($random_product['specials_new_products_price'])) {
  28        $whats_new_price = '<s>' . $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</s><br>';
  29        $whats_new_price .= '<span class="productSpecialPrice">' . $currencies->display_price($random_product['specials_new_products_price'], tep_get_tax_rate($random_product['products_tax_class_id'])) . '</span>';
  30      } else {
  31        $whats_new_price = $currencies->display_price($random_product['products_price'], tep_get_tax_rate($random_product['products_tax_class_id']));
  32      }
  33  
  34      $info_box_contents = array();
  35      $info_box_contents[] = array('align' => 'center',
  36                                   'text' => '<a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . tep_image(DIR_WS_IMAGES . $random_product['products_image'], $random_product['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '</a><br><a href="' . tep_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $random_product['products_id']) . '">' . $random_product['products_name'] . '</a><br>' . $whats_new_price);
  37  
  38      new infoBox($info_box_contents);
  39  ?>
  40              </td>
  41            </tr>
  42  <!-- whats_new_eof //-->
  43  <?php
  44    }
  45  ?>


Généré le : Mon Nov 26 19:48:25 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics