WIN-2308041133\Administrator 5 месяцев назад
Родитель
Сommit
0119cb6ad9

+ 1 - 0
app/api/controller/order/StoreOrderController.php

@@ -51,6 +51,7 @@ class StoreOrderController
         if (!is_string($cartId) || !$cartId) return app('json')->fail('请提交购买的商品');
         $uid = $request->uid();
         $cartGroup = StoreCart::getUserProductCartList($uid, $cartId, 1);
+        @file_put_contents('quanju.txt', json_encode($cartGroup) . "-总购物车内容\r\n", 8);
         if (count($cartGroup['invalid'])) return app('json')->fail($cartGroup['invalid'][0]['productInfo']['store_name'] . '已失效!');
         if (!$cartGroup['valid']) return app('json')->fail('请提交购买的商品');
         $cartInfo = $cartGroup['valid'];

+ 0 - 9
app/models/store/StoreCart.php

@@ -90,15 +90,6 @@ class StoreCart extends BaseModel
             $product = StoreProduct::get($product_id);
             if ($product['store_type'] == 2 && !$is_new) return self::setErrorInfo('虚拟商品不可加入购物车');
         }
-//        普惠商品,积分商品,报单商品不能加入购物车
-//        $product_info = StoreProduct::get($product_id);
-//        if ($product_info['is_inclusive']==1){
-//            return self::setErrorInfo('普惠商品不能加入购物车');
-//        }elseif ($product_info['is_points']==1){
-//            return self::setErrorInfo('积分商品不能加入购物车');
-//        }elseif ($product_info['is_explosive']==1){
-//            return self::setErrorInfo('报单商品不能加入购物车');
-//        }
         if ($cart = self::where('type', $type)->where('uid', $uid)->where('product_id', $product_id)->where('product_attr_unique', $product_attr_unique)->where('is_new', $is_new)->where('is_pay', 0)->where('is_del', 0)->where('combination_id', $combination_id)->where('bargain_id', $bargain_id)->where('seckill_id', $seckill_id)->find()) {
             if ($is_new)
                 $cart->cart_num = $cart_num;

+ 0 - 1
app/models/store/StoreOrder.php

@@ -80,7 +80,6 @@ class StoreOrder extends BaseModel
         $totalPrice = self::getOrderSumPrice($cartInfo, 'truePrice');//获取订单总金额
         $totalIntegral = self::getOrderSumPrice($cartInfo, 'integral');//获取订单总积分
         $costPrice = self::getOrderSumPrice($cartInfo, 'costPrice');//获取订单成本价
-        @file_put_contents('quanju.txt', json_encode($cartInfo) . "-购物车内容\r\n", 8);
         $vipPrice = self::getOrderSumPrice($cartInfo, 'vip_truePrice');//获取订单会员优惠金额
         //如果满额包邮等于0
         if (!$storeFreePostage) {