Merge pull request #1090 from shreesh-webkul/gli-1876
Fixed: cart rule restricted to a single customer is accessable to all customer when group restriction is applied
This commit is contained in:
@@ -294,6 +294,13 @@ class CartRuleCore extends ObjectModel
|
||||
return array();
|
||||
}
|
||||
|
||||
// Remove cart rule that does not match the id_customer
|
||||
foreach ($result as $key => $cart_rule) {
|
||||
if ($cart_rule['id_customer'] && $cart_rule['id_customer'] != $id_customer) {
|
||||
unset($result[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
// Remove cart rule that does not match the customer groups
|
||||
$customerGroups = Customer::getGroupsStatic($id_customer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user