[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
[phpBB Debug] PHP Warning: in file [ROOT]/includes/crs/crs_misc_functions.php on line 37: mime_content_type(): Empty filename or path
Zen Cart 源代码 main_cart_actions.php

Zen Cart 源代码 main_cart_actions.php




下载文件

文件名: main_cart_actions.php
文件类型: PHP文件
文件大小: 2.28 KiB
MD5: 56e6125b51e44b3014df3f859566d3ba

main_cart_actions.php - 关闭高亮
  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-2007 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 6644 2007-07-27 09:12:36Z drbyte $
  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.   $za_dir->close();
  30. }
  31. switch ($_GET['action']) {
  32.   /**
  33.    * customer wants to update the product quantity in their shopping cart
  34.    * delete checkbox or 0 quantity removes from cart
  35.    */
  36.   case 'update_product' :
  37.   $_SESSION['cart']->actionUpdateProduct($goto, $parameters);
  38.   break;
  39.   /**
  40.    * customer adds a product from the products page
  41.    */
  42.   case 'add_product' :
  43.   $_SESSION['cart']->actionAddProduct($goto, $parameters);
  44.   break;
  45.   case 'buy_now' :
  46.   /**
  47.    * performed by the 'buy now' button in product listings and review page
  48.    */
  49.   $_SESSION['cart']->actionBuyNow($goto, $parameters);
  50.   break;
  51.   case 'multiple_products_add_product' :
  52.   /**
  53.    * performed by the multiple-add-products button
  54.    */
  55.   $_SESSION['cart']->actionMultipleAddProduct($goto, $parameters);
  56.   break;
  57.   case 'notify' :
  58.   $_SESSION['cart']->actionNotify($goto, $parameters);
  59.   break;
  60.   case 'notify_remove' :
  61.   $_SESSION['cart']->actionNotifyRemove($goto, $parameters);
  62.   break;
  63.   case 'cust_order' :
  64.   $_SESSION['cart']->actionCustomerOrder($goto, $parameters);
  65.   break;
  66.   case 'remove_product' :
  67.   $_SESSION['cart']->actionRemoveProduct($goto, $parameters);
  68.   break;
  69.   case 'cart' :
  70.   $_SESSION['cart']->actionCartUserAction($goto, $parameters);
  71.   break;
  72.   case 'empty_cart' :
  73.   $_SESSION['cart']->reset(true);
  74.   break;
  75. }
  76. ?>


cron