本文整理匯總了PHP中country::getIsoById方法的典型用法代碼示例。如果您正苦於以下問題:PHP country::getIsoById方法的具體用法?PHP country::getIsoById怎麽用?PHP country::getIsoById使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類country
的用法示例。
在下文中一共展示了country::getIsoById方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: hookDisplayCarrierList
public function hookDisplayCarrierList($params)
{
$parcelStoresAllInOne = DpdDeliveryPoints::collectDeliveryPoints(country::getIsoById(country::getIdByName(null, $params['address']->country)), false, false);
$parcelStoresAllInOne = $this->parcelSort($parcelStoresAllInOne, 'company');
$parcel_stores_city = array();
foreach ($parcelStoresAllInOne as $company) {
$parcel_stores_city[trim($company['city'])][] = $company;
}
ksort($parcel_stores_city);
self::setKeyPriority($parcel_stores_city, self::stringToarray(',', ',' . Configuration::get(self::CONST_PREFIX . 'CITY_PRIORITY')));
$carrier_id = (int) $this->context->cart->id_carrier;
if ($carrier_id == Configuration::get('DELIVERYPOINTS_CARRIER_ID')) {
$this->context->smarty->assign(array('id_carrier' => $params['cart']->id_carrier, 'id_address' => $params['address']->id, 'delivery_terminals' => $parcel_stores_city, 'delivery_option' => $params['address']->id, 'current_city' => $params['address']->city, 'carrier_name' => $this->getCarrierName($carrier_id), 'type_parcel_display' => Configuration::get(self::CONST_PREFIX . 'TYPE_PARCEL_DISPLAY'), 'short_office_name' => Configuration::get(self::CONST_PREFIX . 'SHORT_OFFICE_NAME')));
//$this->context->controller->addJS(_PS_MODULE_DIR_.'dynamicparceldistribution/views/js/script.js', 'all');
//$this->context->controller->addJS(_PS_MODULE_DIR_.'dynamicparceldistribution/views/js/script.js');
//print_r(_PS_MODULE_DIR_.'dynamicparceldistribution/views/js/script.js');
//$this->context->controller->addCSS($this->_path.'/views/css/mycss.css');
if (count($parcel_stores_city)) {
//return $this->display(__FILE__, 'views/templates/hook/deliverypoints.tpl');
$output = $this->context->smarty->fetch($this->local_path . 'views/templates/hook/deliverypoints.tpl');
return $output;
} else {
self::log('hookDisplayCarrierList -> Not found any parcel stores. maybe user and password is not correct?');
}
return '';
}
if ($carrier_id == Configuration::get('COURIERSERVICE_CARRIER_ID')) {
if (Configuration::get(self::CONST_PREFIX . 'SHOW_DELIVERY_TIME')) {
$this->getDeliveryTimeAvailable($params['address']->city);
//Leave only available times
if (empty(self::$delivery_time)) {
//Last check for how much available
return '';
}
$this->context->smarty->assign(array('delivery_option' => $params['address']->id, 'id_carrier' => $params['cart']->id_carrier, 'id_address' => $params['address']->id, 'carrier_name' => $this->getCarrierName($carrier_id), 'delivery_time' => self::$delivery_time));
if (count(self::$delivery_time)) {
//return $this->display(__FILE__, 'views/templates/hook/courierservice.tpl');
$output = $this->context->smarty->fetch($this->local_path . 'views/templates/hook/courierservice.tpl');
return $output;
} else {
self::log('hookDisplayCarrierList -> Not found any delivery time');
}
}
}
return '';
}
開發者ID:uab-balticode,項目名稱:dpd-shipping-module-prestashop-2,代碼行數:46,代碼來源:dynamicparceldistribution.php