feat(CartList.php): 修改购物车价格计算逻辑
This commit is contained in:
parent
151c24fdf3
commit
995443f666
@ -74,7 +74,7 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists
|
||||
|
||||
if ($find) {
|
||||
if($off_activity==1){
|
||||
$this->activity_price = bcadd(bcmul($find['cost'],$find['cart_num'], 2), $this->activity_price, 2);
|
||||
$this->activity_price = bcadd(bcmul($find['cost'],$item['cart_num'], 2), $this->activity_price, 2);
|
||||
}else{
|
||||
if ($user && $user['user_ship'] == 1) {
|
||||
//更新 会员为1的时候原价减去会员价
|
||||
@ -128,8 +128,9 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists
|
||||
];
|
||||
if($this->off_activity==1){
|
||||
$data['pay_price']=$this->activity_price;
|
||||
if($this->activity_price<500){
|
||||
$data['msg']='还差'.bcsub(500,$this->activity_price,2).'元可参与满减活动';
|
||||
if($this->total_price<500){
|
||||
$data['msg']='还差'.bcsub(500,$this->total_price,2).'元可参与满减活动';
|
||||
$data['pay_price']= $this->total_price;
|
||||
}
|
||||
}
|
||||
return $data;
|
||||
|
Loading…
x
Reference in New Issue
Block a user