I would like to eliminate the shopping cart sidebox on the 3 checkout phases.
- checkout_shipping
- checkout_payment
- checkout_confirmation
includes > modules > sideboxes > your template > shopping_cart.php
I am placing this the code
<?php
/**
* shopping_cart sidebox - displays contents of customer's shopping cart. Also shows GV balance, if any.
*
* @package templateSystem
* @copyright Copyright 2003-2005 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: shopping_cart.php 3505 2006-04-24 04:00:05Z drbyte $
*/
switch (true) {
case (SHOW_SHOPPING_CART_BOX_STATUS == '0'):
$show_shopping_cart_box = true;
break;
case (SHOW_SHOPPING_CART_BOX_STATUS == '1'):
if ($_SESSION['cart']->count_contents() > 0 || (isset($_SESSION['customer_id']) && zen_user_has_gv_account($_SESSION['customer_id']) > 0)) {
$show_shopping_cart_box = true;
} else {
$show_shopping_cart_box = false;
}
break;
case (SHOW_SHOPPING_CART_BOX_STATUS == '2'):
if ( ( ($_SESSION['cart']->count_contents() > 0) || (isset($_SESSION['customer_id']) && zen_user_has_gv_account($_SESSION['customer_id']) > 0) ) && ($_GET['main_page'] != FILENAME_SHOPPING_CART) ) {
$show_shopping_cart_box = true;
} else {
$show_shopping_cart_box = false;
}
break;
}
$show_shopping_cart_box = true;
if ($_GET['main_page'] == 'checkout_shipping'){
$show_shopping_cart_box = false;
}
if ($_GET['main_page'] == 'checkout_payment'){
$show_shopping_cart_box = false;
}
if ($_GET['main_page'] == 'checkout_confirmation'){
$show_shopping_cart_box = false;
}
if ($show_shopping_cart_box == true) {
require($template->get_template_dir('tpl_shopping_cart.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_shopping_cart.php');
$title = BOX_HEADING_SHOPPING_CART;
$title_link = false;
$title_link = FILENAME_SHOPPING_CART;
require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
}
?>
Placing this code right above: if ($show_shopping_cart_box == true) right below the case statements.
Great works but when you empty your shopping cart or the box still appears on the log in, log out, index page, product pages.
mark,
Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com.