Fixed customer group bug in cart rule and fixed a bug in coupon apply rule
This commit is contained in:
parent
bcdb4efb6c
commit
9e80687960
|
|
@ -41,6 +41,10 @@ class CouponAbleRule extends Discount
|
|||
}
|
||||
}
|
||||
|
||||
if (! isset($applicableRule)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$applicability = $this->checkApplicability($applicableRule);
|
||||
|
||||
if ($applicability) {
|
||||
|
|
|
|||
|
|
@ -85,8 +85,10 @@ abstract class Discount
|
|||
// customer groups based constraints
|
||||
if (auth()->guard('customer')->check()) {
|
||||
foreach ($rule->customer_groups as $customer_group) {
|
||||
if ($customer_group->customer_group_id == auth()->guard('customer')->user()->group->id) {
|
||||
$customerGroupBased = true;
|
||||
if (auth()->guard('customer')->user()->group->exists()) {
|
||||
if ($customer_group->customer_group_id == auth()->guard('customer')->user()->group->id) {
|
||||
$customerGroupBased = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class ProductServiceProvider extends ServiceProvider
|
|||
|
||||
public function registerConfig() {
|
||||
$this->mergeConfigFrom(
|
||||
dirname(__DIR__) . '/Config/product_types.php', 'product_types'
|
||||
dirname(__DIR__) . '/Config/product-types.php', 'product-types'
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue