zencart购物车修改调用显示购物车图片,修改边栏购物车模版
屏幕调暗了所以图片截取有点暗 开始是这样的 本来是没有图片的现在改了有图片 的 自己举一反三吧
??
事例?调用边栏购物车的图片 避免出错请直接覆盖
修改之后效果
代码开始(为了安全没有写<?php?>这样的标签 ?可以直接复制 我用的1.39版本 ?修改的是?tpl_shopping_cart.php?这个文件?):
/**
* Side Box Template
*
* @package templateSystem
* @copyright Copyright 2003-2007 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: tpl_shopping_cart.php 7192 2007-10-06 13:30:46Z drbyte $
*/
$content ="";
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" . '<ul>' . "\n";
$products = $_SESSION['cart']->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
$content .= '<li>';
if (isset($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
$content .= '<span . '</div>';
} else {
$content .= '<div id="cartBoxEmpty">' . BOX_SHOPPING_CART_EMPTY . '</div>';
}
if ($_SESSION['cart']->count_contents() > 0) {
$content .= '<hr />';
$content .= '<div />';
}
if (isset($_SESSION['customer_id'])) {
$gv_query = "select amount
from " . TABLE_COUPON_GV_CUSTOMER . "
where customer_id = '" . $_SESSION['customer_id'] . "'";
$gv_result = $db->Execute($gv_query);
if ($gv_result->RecordCount() && $gv_result->fields['amount'] > 0 ) {
$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>';
$content .= '<div id="cartBoxVoucherBalance">' . VOUCHER_BALANCE . $currencies->format($gv_result->fields['amount']) . '</div>';
}
}
$content .= '</div>';
zencart购物车修改调用购物车图片显示,zencart教程?
来源 http://zencart.me/archives/148