stanley-king 8 lat temu
rodzic
commit
74daf36475

+ 0 - 2
data/logic/buy.logic.php

@@ -514,7 +514,6 @@ class buyLogic {
         if ($fc_id > 0) {
             $this->_order_data['fc_id'] = $fc_id;
         }
-
     }
 
     /**
@@ -577,7 +576,6 @@ class buyLogic {
         $this->_order_data['store_cart_list'] = $store_cart_list;
         $this->_order_data['goods_buy_quantity'] = $goods_buy_quantity;
         $this->_order_data['input_voucher_list'] = $input_voucher_list;
-
     }
 
     /**

+ 3 - 24
mobile/control/cart.php

@@ -1,10 +1,8 @@
 <?php
 /**
- * 我的购物车
+ * 购物车
  */
 
-//use Shopnc\Tpl;
-
 defined('InShopNC') or exit('Access Invalid!');
 
 require_once (BASE_ROOT_PATH . '/helper/goods_helper.php');
@@ -112,9 +110,6 @@ class cartControl extends mobileControl
         return self::outsuccess($ret);
     }
 
-    /**
-     * 购物车列表
-     */
     public function cart_listOp()
     {
         if($_SESSION['is_login'] != 1) {
@@ -336,11 +331,6 @@ class cartControl extends mobileControl
         }
     }
 
-    /**
-     * 检查商品是否符合加入购物车条件
-     * @param unknown $goods
-     * @param number $quantity
-     */
     private function check_goods($goods_info, $quantity)
     {
         if(empty($quantity)) {
@@ -394,7 +384,7 @@ class cartControl extends mobileControl
                     $quantity = intval($new_cart_list[$value['cart_id']]);
                     if (intval($value['goods_num']) !== $quantity)
                     {
-                        if (!$this->_check_goods_storage($value, $quantity, $_SESSION['member_id'])) {
+                        if (!$this->check_goods_storage($value, $quantity)) {
                             array_push($quantity_error, array('cart_id' => $value['cart_id'], 'quantity' => $quantity, 'err_info' => '库存不足'));
                         } else {
                             $data = array();
@@ -534,7 +524,6 @@ class cartControl extends mobileControl
         }
     }
 
-
     private function do_del($cart_id)
     {
         $model_cart	= Model('cart');
@@ -562,9 +551,6 @@ class cartControl extends mobileControl
         }
     }
 
-    /**
-     * 购物车删除
-     */
     public function cart_delOp()
     {
         if($_SESSION['is_login'] != 1) {
@@ -584,10 +570,7 @@ class cartControl extends mobileControl
         self::outsuccess(array('result' => '1'));
     }
 
-     /**
-     * 检查库存是否充足
-     */
-    private function _check_goods_storage($cart_info, $quantity, $member_id)
+    private function check_goods_storage($cart_info, $quantity)
     {
         $model_goods = Model('goods');
         $model_bl = Model('p_bundling');
@@ -596,11 +579,7 @@ class cartControl extends mobileControl
         if ($cart_info['bl_id'] == '0') {
             //普通商品
             $goods_info = $model_goods->getGoodsOnlineInfoAndPromotionById($cart_info['goods_id']);
-
-            //抢购
             $logic_buy_1->getGroupbuyInfo($goods_info);
-
-            //限时折扣
             $logic_buy_1->getXianshiInfo($goods_info, $quantity);
 
             if (intval($goods_info['goods_storage']) < $quantity) {

+ 1 - 4
mobile/control/member_buy.php

@@ -16,8 +16,7 @@ require_once (BASE_ROOT_PATH . '/helper/predeposit_helper.php');
 
 class member_buyControl extends mbMemberControl
 {
-    public function __construct()
-    {
+    public function __construct() {
         parent::__construct();
     }
 
@@ -76,14 +75,12 @@ class member_buyControl extends mbMemberControl
 
     /**
      * 购物车、直接购买第二步:保存订单入库,产生订单号,开始选择支付方式
-     *
      */
     public function buy_step2Op()
     {
         $param = array();
         $param['ifcart'] = $_POST['ifcart'];
         $param['cart_id'] = explode(',', urldecode($_POST['cart_id']));
-        Log::record('Create cart_id list' . urldecode($_POST['cart_id']), Log::DEBUG);
         $param['address_id'] = $_POST['address_id'];
         $param['vat_hash'] = $_POST['vat_hash'];
         $param['offpay_hash'] = $_POST['offpay_hash'];