piccola correzione da fare nel file :
[b]/includes/templates/template_default/sideboxes/tpl_shopping_cart.php[/b]
la modifica occorre per evitare una non corretta visualizzazione del box relativo al 'carrello', causata dall'errato posizionamento nel codice della classe che esegue il wrapping del box.
La modifica è confermata dal team americano.
Codice originale:
/**
* 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
* @version $Id: tpl_shopping_cart.php 3056 2006-02-21 06:41:36Z birdbrain $
*/
$content ="";
if ($_SESSION['cart']->count_contents() > 0) {
$content .= '
';
$content .= '
} else {
$content = '
}
if ($_SESSION['cart']->count_contents() > 0) {
$content .= '
';
$content .= '
$content .= '
';
}
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 .= '';
$content .= '
}
$content .= '
';
$content .= '
' . "\n" . '
';
- ' . "\n";
- ';
if (($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
$content .= '';
} else {
$content .= '';
}
$content .= $products[$i]['quantity'] . BOX_SHOPPING_CART_DIVIDER . '';
if (($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
$content .= '';
} else {
$content .= '';
}
$content .= $products[$i]['name'] . ' ' . "\n";
$products = $_SESSION['cart']->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
$content .= '
if (($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
$_SESSION['new_products_id_in_cart'] = '';
}
}
$content .= '
} else {
$content = '
' . BOX_SHOPPING_CART_EMPTY . '
';
}
if ($_SESSION['cart']->count_contents() > 0) {
$content .= '
';
$content .= '
' . $currencies->format($_SESSION['cart']->show_total()) . '
';
$content .= '
';
}
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 .= '';
$content .= '
' . VOUCHER_BALANCE . $currencies->format($gv_result->fields['amount']) . '
';
}
$content .= '
}
?>
Codice modificato:
/**
* 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
* @version $Id: tpl_shopping_cart.php 3056 2006-02-21 06:41:36Z birdbrain $
*/
$content ="";
$content .= '
';
if ($_SESSION['cart']->count_contents() > 0) {
$content .= '
} else {
$content .= '
}
if ($_SESSION['cart']->count_contents() > 0) {
$content .= '
';
$content .= '
$content .= '
';
}
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 .= '';
$content .= '
}
}
$content .= '
';
if ($_SESSION['cart']->count_contents() > 0) {
$content .= '
' . "\n" . '
';
- ' . "\n";
- ';
if (($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
$content .= '';
} else {
$content .= '';
}
$content .= $products[$i]['quantity'] . BOX_SHOPPING_CART_DIVIDER . '';
if (($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
$content .= '';
} else {
$content .= '';
}
$content .= $products[$i]['name'] . ' ' . "\n";
$products = $_SESSION['cart']->get_products();
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
$content .= '
if (($_SESSION['new_products_id_in_cart']) && ($_SESSION['new_products_id_in_cart'] == $products[$i]['id'])) {
$_SESSION['new_products_id_in_cart'] = '';
}
}
$content .= '
} else {
$content .= '
' . BOX_SHOPPING_CART_EMPTY . '
';
}
if ($_SESSION['cart']->count_contents() > 0) {
$content .= '
';
$content .= '
' . $currencies->format($_SESSION['cart']->show_total()) . '
';
$content .= '
';
}
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 .= '';
$content .= '
' . VOUCHER_BALANCE . $currencies->format($gv_result->fields['amount']) . '
';
}
}
$content .= '
?>
Ciao a tutti,
Max :-D