My shopping cart sidebox does not show the totals etc even though that's what I chose in the admin. Instead it shows a random New Product.
Is this how it should be or am I doing something wrong. I haven't messed with the template code. I am native to ASP so PHP is not so easy for me to read LOL. So I'll post the sidebox code. Maybe you can see easier than I can if there's something missing.
Perhaps I am missing some step in Admin.
PHP Code:
<?php
/**
* Side Box Template
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cartt Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
*/
$content ='';
if ($_SESSION['cart']->count_contents() > 0) {
$content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent">';
$content .= '<div id="cartBoxListWrapper">' . "\n" . '<ul>' . "\n";
$products = $_SESSION['cart']->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
$content .= '<li>';
if (($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
$content .= '<span class="cartNewItem">';
} else {
$content .= '<span class="cartOldItem">';
}
$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']) . '">';
if (($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
$content .= '<span class="cartNewItem">';
} else {
$content .= '<span class="cartOldItem">';
}
$content .= $products[$i]['name'] . '</span></a></li>' . "\n";
if (($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
$_SESSION['new_products_id_in_cart'] = '';
}
}
$content .= '</ul>' . "\n" . '</div>';
} else {
$content = '<div class="sideBoxContent center bold">' . BOX_SHOPPING_CART_EMPTY . '</div>';
}
if ($_SESSION['cart']->count_contents() > 0) {
$content .= '<hr />';
$content .= '<div class="cartBoxTotal">' . $currencies->format($_SESSION['cart']->show_total()) . '</div>';
$content .= '<br class="clearBoth" />';
}
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->fields['amount'] > 0 ) {
$content .= '<div id="cartBoxGVButton" class="sideBoxContent"><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 class="sideBoxContent center bold">' . VOUCHER_BALANCE . $currencies->format($gv_result->fields['amount']) . '</div>';
}
$content .= '';
}
$content_head = tm_box_head(BOX_HEADING_SHOPPING_CART,FILENAME_SHOPPING_CART);
$content_cont = tm_box_cont($content_tm);
$content = $content_head.$content_cont;
?>
Bookmarks