if ($HTTP_GET_VARS['to'] == 'postpone') {
         $cart->remove($HTTP_GET_VARS['products_id']);
         $postpone_cart->add_cart($HTTP_GET_VARS['products_id'], '1');
     } else {
         $postpone_cart->remove($HTTP_GET_VARS['products_id']);
         $cart->add_cart($HTTP_GET_VARS['products_id'], '1');
     }
     tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, tep_get_all_get_params($parameters)) . ($HTTP_GET_VARS['to'] == 'postpone' ? '#postpone' : ''));
     break;
     // customer remove a product from shopping cart or postpone cart
 // customer remove a product from shopping cart or postpone cart
 case 'remove_product':
     if ($HTTP_GET_VARS['from'] == 'postpone') {
         $postpone_cart->remove($HTTP_GET_VARS['products_id']);
     } elseif ($HTTP_GET_VARS['from'] == 'foreign') {
         $foreign_cart->remove($HTTP_GET_VARS['products_id']);
     } else {
         $cart->remove($HTTP_GET_VARS['products_id']);
     }
     tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters), $ssl_params) . ($HTTP_GET_VARS['from'] != '' ? '#' . $HTTP_GET_VARS['from'] : ''));
     break;
     // customer remove a product from shopping cart or postpone cart
 // customer remove a product from shopping cart or postpone cart
 case 'notify':
     if (tep_session_is_registered('customer_id')) {
         $postpone_cart->change_notification($HTTP_GET_VARS['products_id'], $HTTP_GET_VARS['notify']);
     } else {
         $messageStack->add_session('header', POSTPONE_CART_NOTIFICATION_ERROR);
     }
     tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters), $ssl_params) . '#postpone');
     break;
     $goto = FILENAME_SHOPPING_CART;
     $parameters = array('action', 'cPath', 'products_id', 'pid');
 } else {
     $goto = basename($PHP_SELF);
     if ($HTTP_GET_VARS['action'] == 'buy_now') {
         $parameters = array('action', 'pid', 'products_id');
     } else {
         $parameters = array('action', 'pid');
     }
 }
 switch ($HTTP_GET_VARS['action']) {
     // customer wants to update the product quantity in their shopping cart
     case 'update_product':
         for ($i = 0, $n = sizeof($HTTP_POST_VARS['products_id']); $i < $n; $i++) {
             if (in_array($HTTP_POST_VARS['products_id'][$i], is_array($HTTP_POST_VARS['cart_delete']) ? $HTTP_POST_VARS['cart_delete'] : array())) {
                 $cart->remove($HTTP_POST_VARS['products_id'][$i]);
             } else {
                 $attributes = $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] ? $HTTP_POST_VARS['id'][$HTTP_POST_VARS['products_id'][$i]] : '';
                 $cart->add_cart($HTTP_POST_VARS['products_id'][$i], $HTTP_POST_VARS['cart_quantity'][$i], $attributes, false);
             }
         }
         tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
         break;
         // customer adds a product from the products page
         // Additional code to allow sample quantity  - BBG Design 2011
     // customer adds a product from the products page
     // Additional code to allow sample quantity  - BBG Design 2011
     case 'add_product':
         if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id']) && $HTTP_POST_VARS['cart_quantity'] != '0') {
             $attributes = isset($HTTP_POST_VARS['id']) ? $HTTP_POST_VARS['id'] : '';
             $cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id'])) + $HTTP_POST_VARS['cart_quantity'], $HTTP_POST_VARS['id']);
     $parameters = array('action', 'cPath', 'products_id', 'pid');
 } else {
     $goto = $PHP_SELF;
     if ($_GET['action'] == 'buy_now') {
         $parameters = array('action', 'pid', 'products_id');
     } else {
         $parameters = array('action', 'pid');
     }
 }
 switch ($_GET['action']) {
     // customer wants to update the product quantity in their shopping cart
     case 'update_product':
         $n = sizeof($_POST['products_id']);
         for ($i = 0; $i < $n; $i++) {
             if (in_array($_POST['products_id'][$i], is_array($_POST['cart_delete']) ? $_POST['cart_delete'] : array())) {
                 $cart->remove($_POST['products_id'][$i]);
                 $messageStack->add_session('product_action', sprintf(PRODUCT_REMOVED, tep_get_products_name($_POST['products_id'][$i])), 'warning');
             } else {
                 $attributes = $_POST['id'][$_POST['products_id'][$i]] ? $_POST['id'][$_POST['products_id'][$i]] : '';
                 $cart->add_cart($_POST['products_id'][$i], $_POST['cart_quantity'][$i], $attributes, false);
             }
         }
         tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
         break;
         // customer adds a product from the products page
     // customer adds a product from the products page
     case 'add_product':
         if (isset($_POST['products_id']) && is_numeric($_POST['products_id'])) {
             $attributes = isset($_POST['id']) ? $_POST['id'] : '';
             $cart->add_cart($_POST['products_id'], $cart->get_quantity(tep_get_uprid($_POST['products_id'], $attributes)) + 1, $attributes);
         }