[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
Zen Cart 源代码 tpl_shopping_cart.php

Zen Cart 源代码 tpl_shopping_cart.php




下载文件

文件名: tpl_shopping_cart.php
文件类型: PHP文件
文件大小: 2.7 KiB
MD5: 6ed8b9d2cbcb33b8baaffb61d70446ab

tpl_shopping_cart.php - 关闭高亮
  1. <?php
  2. /**
  3.  * Side Box Template
  4.  *
  5.  * @package templateSystem
  6.  * @copyright Copyright 2003-2007 Zen Cart Development Team
  7.  * @copyright Portions Copyright 2003 osCommerce
  8.  * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
  9.  * @version $Id: tpl_shopping_cart.php 7192 2007-10-06 13:30:46Z drbyte $
  10.  */
  11.   $content ="";
  12.  
  13.   $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
  14.   if ($_SESSION['cart']->count_contents() > 0) {
  15.   $content .= '<div id="cartBoxListWrapper">' . "\n" . '<ul>' . "\n";
  16.     $products = $_SESSION['cart']->get_products();
  17.     for ($i=0, $n=sizeof($products); $i<$n; $i++) {
  18.       $content .= '<li>';
  19.  
  20.       if (isset($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
  21.         $content .= '<span class="cartNewItem">';
  22.       } else {
  23.         $content .= '<span class="cartOldItem">';
  24.       }
  25.  
  26.       $content .= $products[$i]['quantity'] . BOX_SHOPPING_CART_DIVIDER . '</span><a href="' . zen_href_link(zen_get_info_page($products[$i]['id']), 'products_id=' . $products[$i]['id']) . '">';
  27.  
  28.       if (isset($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
  29.         $content .= '<span class="cartNewItem">';
  30.       } else {
  31.         $content .= '<span class="cartOldItem">';
  32.       }
  33.  
  34.       $content .= $products[$i]['name'] . '</span></a></li>' . "\n";
  35.  
  36.       if (isset($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
  37.         $_SESSION['new_products_id_in_cart'] = '';
  38.       }
  39.     }
  40.     $content .= '</ul>' . "\n" . '</div>';
  41.   } else {
  42.     $content .= '<div id="cartBoxEmpty">' . BOX_SHOPPING_CART_EMPTY . '</div>';
  43.   }
  44.  
  45.   if ($_SESSION['cart']->count_contents() > 0) {
  46.     $content .= '<hr />';
  47.     $content .= '<div class="cartBoxTotal">' . $currencies->format($_SESSION['cart']->show_total()) . '</div>';
  48.     $content .= '<br class="clearBoth" />';
  49.   }
  50.  
  51.   if (isset($_SESSION['customer_id'])) {
  52.     $gv_query = "select amount
  53.                 from " . TABLE_COUPON_GV_CUSTOMER . "
  54.                 where customer_id = '" . $_SESSION['customer_id'] . "'";
  55.    $gv_result = $db->Execute($gv_query);
  56.  
  57.     if ($gv_result->RecordCount() && $gv_result->fields['amount'] > 0 ) {
  58.       $content .= '<div id="cartBoxGVButton"><a href="' . zen_href_link(FILENAME_GV_SEND, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_SEND_A_GIFT_CERT , BUTTON_SEND_A_GIFT_CERT_ALT) . '</a></div>';
  59.       $content .= '<div id="cartBoxVoucherBalance">' . VOUCHER_BALANCE . $currencies->format($gv_result->fields['amount']) . '</div>';
  60.     }
  61.   }
  62.   $content .= '</div>';
  63. ?>
  64.  


cron