本文整理匯總了PHP中mslib_fe::getCustomerGroupMappedMethods方法的典型用法代碼示例。如果您正苦於以下問題:PHP mslib_fe::getCustomerGroupMappedMethods方法的具體用法?PHP mslib_fe::getCustomerGroupMappedMethods怎麽用?PHP mslib_fe::getCustomerGroupMappedMethods使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類mslib_fe
的用法示例。
在下文中一共展示了mslib_fe::getCustomerGroupMappedMethods方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
}
break;
case 'customers_groups':
if ($this->ms['MODULES']['GROUP_EDIT_METHOD_FILTER']) {
$payment_methods = array();
$shipping_methods = array();
$tmp_user_groups = explode(',', $GLOBALS['TSFE']->fe_user->user['usergroup']);
$user_groups = array();
foreach ($tmp_user_groups as $tmp_user_group) {
if ($tmp_user_group > 0) {
$user_groups[] = $tmp_user_group;
}
}
if (count($user_groups)) {
$payment_methods_group = mslib_fe::getCustomerGroupMappedMethods($user_groups, 'payment', $user_country);
$shipping_methods_group = mslib_fe::getCustomerGroupMappedMethods($user_groups, 'shipping');
if (!count($payment_methods_group)) {
$payment_methods = $payment_methods_product;
}
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'];
示例2: foreach
foreach ($cart['products'] as $key => $array) {
if (is_numeric($array['products_id'])) {
$pids[] = $array['products_id'];
}
}
if (count($pids)) {
$mapped_shipping_methods_product = mslib_fe::getProductMappedMethods($pids, 'shipping', $tmp_countries['cn_iso_nr']);
}
}
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)) {
示例3: foreach
foreach ($cart['products'] as $key => $array) {
if (is_numeric($array['products_id'])) {
$pids[] = $array['products_id'];
}
}
if (count($pids)) {
$payment_methods_product = mslib_fe::getProductMappedMethods($pids, 'payment', $countries_id);
}
}
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)) {