// because we changed users, we have to remove content cache
    eZContentCacheManager::clearAllContentCache();
}
if ($http->hasPostVariable("RemoveCustomerButton")) {
    if ($http->hasPostVariable("CustomerIDArray")) {
        $customerIDArray = $http->postVariable("CustomerIDArray");
        $db = eZDB::instance();
        $db->begin();
        foreach ($customerIDArray as $customerID) {
            eZUserDiscountRule::removeUser($customerID);
        }
        $db->commit();
    }
    eZContentCacheManager::clearAllContentCache();
}
$membershipList = eZUserDiscountRule::fetchByRuleID($discountGroupID);
$customers = array();
foreach ($membershipList as $membership) {
    $customers[] = eZContentObject::fetch($membership->attribute('contentobject_id'));
}
$ruleList = eZDiscountSubRule::fetchByRuleID($discountGroupID);
$ruleArray = array();
foreach ($ruleList as $rule) {
    $name = $rule->attribute('name');
    $percent = $rule->attribute('discount_percent');
    $limitation = $rule->attribute('limitation');
    $discountRuleID = $rule->attribute('id');
    if ($limitation != '*') {
        $ruleValues = eZDiscountSubRuleValue::fetchBySubRuleID($discountRuleID);
        if ($ruleValues != null) {
            $limitation = ezpI18n::tr('kernel/shop', 'Classes') . ' ';