From 9f68846cafaef88fa0026ff22e780a1c2e9ee240 Mon Sep 17 00:00:00 2001 From: "DESKTOP-GMUNQ1B\\Administrator" <604446095@qq.com> Date: Fri, 6 Dec 2024 16:37:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=94=B6=E9=93=B6=E5=8F=B0?= =?UTF-8?q?=E5=95=86=E5=93=81=E4=BB=B7=E6=A0=BC=E8=AE=A1=E7=AE=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/store/lists/cart/CartList.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/app/store/lists/cart/CartList.php b/app/store/lists/cart/CartList.php index f136bdfcc..4829be66e 100644 --- a/app/store/lists/cart/CartList.php +++ b/app/store/lists/cart/CartList.php @@ -9,6 +9,7 @@ use app\common\model\order\Cart; use app\common\model\Config; use app\common\model\store_branch_product\StoreBranchProduct; use app\common\model\store_product_attr_value\StoreProductAttrValue; +use app\common\model\store_product_group_price\StoreProductGroupPrice; use app\common\model\store_product_unit\StoreProductUnit; use app\common\model\user\User; use app\common\lists\ListsExtendInterface; @@ -66,15 +67,16 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists $user_ship=0; if ($uid > 0) { $user_ship = User::where('id', $uid)->value('user_ship'); - if (in_array($user_ship, [4, 6, 7])) { - $off_activity = 1; - } +// if (in_array($user_ship, [4, 6, 7])) { +// $off_activity = 1; +// } } foreach ($list as $key => &$item) { $find = StoreProduct::where(['id' => $item['product_id']]) ->field('id,id product_id,image,price,cost,store_name,unit,delete_time,vip_price,top_cate_id') ->find(); if ($find) { + $find = StoreProductGroupPrice::resetProductPrice($find, $user_ship); if ($off_activity == 1) { $this->activity_price = bcadd(bcmul($find['cost'], $item['cart_num'], 2), $this->activity_price, 2); $item['price'] = $find['cost'];