本文整理汇总了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