请问有什么办法可以设置会员可以0元购,有些商品想直接赠送会员用户
public function getOrderSumPrice($cartInfo, $key = 'truePrice', $is_unit = true){ $SumPrice = 0; foreach ($cartInfo as $cart) { if (isset($cart['cart_info'])) $cart = $cart['cart_info']; if ($is_unit) { if ($key == 'level' || $key == 'member') { //member if ($cart['price_type'] == $key) { $SumPrice = bcadd($SumPrice, bcmul($cart['cart_num'], $cart['vip_truePrice'], 2), 2); } } else { $SumPrice = bcadd($SumPrice, bcmul($cart['cart_num'], $cart[$key], 2), 2); } } else { $SumPrice = bcadd($SumPrice, $cart[$key], 2); } } return $SumPrice;}