...
|
...
|
@@ -594,11 +594,17 @@ class CartModel |
|
|
// 优惠券数据
|
|
|
$coupons = array(
|
|
|
'couponName' => '',
|
|
|
'isCoupon' => false,
|
|
|
'count' => self::getValidCouponCount($uid)
|
|
|
);
|
|
|
if (isset($orderCompute['coupon_amount']) && (!empty($orderCompute['coupon_amount']) || ($orderCompute['coupon_amount'] === 0 && $orderCompute['shipping_cost'] === 0))) {
|
|
|
$coupons['couponName'] = $orderInfo['couponName'];
|
|
|
}
|
|
|
//选中已使用的优惠劵,则剩余多少张优惠劵,不提示
|
|
|
if (empty($coupons['couponName']) || $coupons['count'] === 0) {
|
|
|
$coupons['isCoupon'] = true;
|
|
|
}
|
|
|
|
|
|
$result['coupon'] = $coupons;
|
|
|
}
|
|
|
while (false);
|
...
|
...
|
|