[ Index ] |
|
Code source de Zen Cart E-Commerce Shopping Cart 1.3.7.1 |
1 <?php 2 /** 3 * Main shopping Cart actions supported. 4 * 5 * The main cart actions supported by the current shoppingCart class. 6 * This can be added to externally using the extra_cart_actions directory. 7 * 8 * @package initSystem 9 * @copyright Copyright 2003-2005 Zen Cart Development Team 10 * @copyright Portions Copyright 2003 osCommerce 11 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 12 * @version $Id: main_cart_actions.php 3066 2006-02-25 22:14:00Z wilt $ 13 */ 14 if (!defined('IS_ADMIN_FLAG')) { 15 die('Illegal Access'); 16 } 17 /** 18 * include the list of extra cart action files (*.php in the extra_cart_actions folder) 19 */ 20 if ($za_dir = @dir(DIR_WS_INCLUDES . 'extra_cart_actions')) { 21 while ($zv_file = $za_dir->read()) { 22 if (preg_match('/\.php$/', $zv_file) > 0) { 23 /** 24 * get user/contribution defined cart actions 25 */ 26 include(DIR_WS_INCLUDES . 'extra_cart_actions/' . $zv_file); 27 } 28 } 29 } 30 switch ($_GET['action']) { 31 /** 32 * customer wants to update the product quantity in their shopping cart 33 * delete checkbox or 0 quantity removes from cart 34 */ 35 case 'update_product' : 36 $_SESSION['cart']->actionUpdateProduct($goto, $parameters); 37 break; 38 /** 39 * customer adds a product from the products page 40 */ 41 case 'add_product' : 42 $_SESSION['cart']->actionAddProduct($goto, $parameters); 43 break; 44 case 'buy_now' : 45 /** 46 * performed by the 'buy now' button in product listings and review page 47 */ 48 $_SESSION['cart']->actionBuyNow($goto, $parameters); 49 break; 50 case 'multiple_products_add_product' : 51 /** 52 * performed by the multiple-add-products button 53 */ 54 $_SESSION['cart']->actionMultipleAddProduct($goto, $parameters); 55 break; 56 case 'notify' : 57 $_SESSION['cart']->actionNotify($goto, $parameters); 58 break; 59 case 'notify_remove' : 60 $_SESSION['cart']->actionNotifyRemove($goto, $parameters); 61 break; 62 case 'cust_order' : 63 $_SESSION['cart']->actionCustomerOrder($goto, $parameters); 64 break; 65 case 'remove_product' : 66 $_SESSION['cart']->actionRemoveProduct($goto, $parameters); 67 break; 68 case 'cart' : 69 $_SESSION['cart']->actionCartUserAction($goto, $parameters); 70 break; 71 } 72 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 16:45:43 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |