} if (!count($shipping_methods_group)) { $shipping_methods = $shipping_methods_product; } } } break; case 'customers': if ($this->ms['MODULES']['CUSTOMER_EDIT_METHOD_FILTER']) { $payment_methods = array(); $shipping_methods = array(); $user_id = array(); $user_id = $GLOBALS['TSFE']->fe_user->user['uid']; if (is_numeric($user_id)) { $payment_methods_user = mslib_fe::getCustomerMappedMethods($user_id, 'payment', $user_country); $shipping_methods_user = mslib_fe::getCustomerMappedMethods($user_id, 'shipping'); if (!count($payment_methods_user)) { $payment_methods = $payment_methods_group; } if (!count($shipping_methods)) { $shipping_methods = $shipping_methods_group; } } } break; } } if (!count($payment_methods)) { // nothing is loaded. this cant be valid so let's load the default methods. // loading payment methods $payment_methods = mslib_fe::loadPaymentMethods(0, $user_country, true, true);
break; case 'customers_groups': if (mslib_fe::loggedin() && $this->ms['MODULES']['GROUP_EDIT_METHOD_FILTER']) { $user_groups = array(); $user_groups = explode(',', $GLOBALS['TSFE']->fe_user->user['usergroup']); if (count($user_groups)) { $mapped_shipping_methods_group = mslib_fe::getCustomerGroupMappedMethods($user_groups, 'shipping', $tmp_countries['cn_iso_nr']); } } break; case 'customers': if (mslib_fe::loggedin() && $this->ms['MODULES']['CUSTOMER_EDIT_METHOD_FILTER']) { $user_id = array(); $user_id = $GLOBALS['TSFE']->fe_user->user['uid']; if (is_numeric($user_id)) { $mapped_shipping_methods_user = mslib_fe::getCustomerMappedMethods($user_id, 'shipping', $tmp_countries['cn_iso_nr']); } } break; } } if (count($mapped_shipping_methods_user)) { $mapped_shipping_methods = $mapped_shipping_methods_user; } else { if (count($mapped_shipping_methods_group)) { $mapped_shipping_methods = $mapped_shipping_methods_group; } else { if (count($mapped_shipping_methods_product)) { $mapped_shipping_methods = $mapped_shipping_methods_product; } }
break; case 'customers_groups': if (mslib_fe::loggedin() && $this->ms['MODULES']['GROUP_EDIT_METHOD_FILTER']) { $user_groups = array(); $user_groups = explode(',', $GLOBALS['TSFE']->fe_user->user['usergroup']); if (count($user_groups)) { $payment_methods_group = mslib_fe::getCustomerGroupMappedMethods($user_groups, 'payment', $countries_id); } } break; case 'customers': if (mslib_fe::loggedin() && $this->ms['MODULES']['CUSTOMER_EDIT_METHOD_FILTER']) { $user_id = array(); $user_id = $GLOBALS['TSFE']->fe_user->user['uid']; if (is_numeric($user_id)) { $payment_methods_user = mslib_fe::getCustomerMappedMethods($user_id, 'payment', $countries_id); } } break; } } if (count($payment_methods_user)) { $payment_methods = $payment_methods_user; } else { if (count($payment_methods_group)) { $payment_methods = $payment_methods_group; } else { $payment_methods = $payment_methods_product; } } if (!count($payment_methods)) {