Fixed issue with coupon usage limit

This commit is contained in:
Poghos Boyajyan 2022-07-29 17:27:54 +04:00 committed by GitHub
parent d28d1a693b
commit b0541afb3c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ class CartRuleRepository extends Repository
$this->cartRuleCouponRepository->create([
'cart_rule_id' => $cartRule->id,
'code' => $data['coupon_code'],
'usage_limit' => $data['usage_per_customer'] ?? 0,
'usage_limit' => $data['uses_per_coupon'] ?? 0,
'usage_per_customer' => $data['usage_per_customer'] ?? 0,
'is_primary' => 1,
'expired_at' => $data['ends_till'] ?: null,