當前位置: 首頁>>代碼示例>>PHP>>正文


PHP State::getIdZone方法代碼示例

本文整理匯總了PHP中State::getIdZone方法的典型用法代碼示例。如果您正苦於以下問題:PHP State::getIdZone方法的具體用法?PHP State::getIdZone怎麽用?PHP State::getIdZone使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在State的用法示例。


在下文中一共展示了State::getIdZone方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getCarriersListByIdZone

 public function getCarriersListByIdZone($id_country, $id_state = 0, $zipcode = 0)
 {
     // cookie saving/updating
     $this->context->cookie->id_country = $id_country;
     if ($id_state != 0) {
         $this->context->cookie->id_state = $id_state;
     }
     if ($zipcode != 0) {
         $this->context->cookie->postcode = $zipcode;
     }
     $id_zone = 0;
     if ($id_state != 0) {
         $id_zone = State::getIdZone($id_state);
     }
     if (!$id_zone) {
         $id_zone = Country::getIdZone($id_country);
     }
     $carriers = CarrierCompare::getCarriersByCountry($id_country, $id_state, $zipcode, $this->context->cart, $this->context->customer->id);
     return sizeof($carriers) ? $carriers : array();
 }
開發者ID:TheTypoMaster,項目名稱:neonflexible,代碼行數:20,代碼來源:carriercompare.php

示例2: getCarriersListByIdZone

 public function getCarriersListByIdZone($id_country, $id_state = 0)
 {
     global $cart, $smarty;
     $id_zone = 0;
     if ($id_state != 0) {
         $id_zone = State::getIdZone($id_state);
     }
     if (!$id_zone) {
         $id_zone = Country::getIdZone($id_country);
     }
     $carriers = Carrier::getCarriersForOrder((int) $id_zone);
     return sizeof($carriers) ? $carriers : array();
 }
開發者ID:hecbuma,項目名稱:quali-fisioterapia,代碼行數:13,代碼來源:carriercompare.php

示例3: getCarriersListByIdZone

 public function getCarriersListByIdZone($id_country, $id_state = 0, $zipcode = 0)
 {
     global $cart, $smarty, $cookie;
     // cookie saving/updating
     $cookie->id_country = $id_country;
     if ($id_state != 0) {
         $cookie->id_state = $id_state;
     }
     if ($zipcode != 0) {
         $cookie->postcode = $zipcode;
     }
     $id_zone = 0;
     if ($id_state != 0) {
         $id_zone = State::getIdZone($id_state);
     }
     if (!$id_zone) {
         $id_zone = Country::getIdZone($id_country);
     }
     $carriers = Carrier::getCarriersForOrder((int) $id_zone);
     return sizeof($carriers) ? $carriers : array();
 }
開發者ID:srikanthash09,項目名稱:codetestdatld,代碼行數:21,代碼來源:carriercompare.php

示例4: getCarriersListByIdZone

 public function getCarriersListByIdZone($id_country, $id_state = 0, $zipcode = 0)
 {
     // cookie saving/updating
     $this->context->cookie->id_country = $id_country;
     if ($id_state != 0) {
         $this->context->cookie->id_state = $id_state;
     }
     if ($zipcode != 0) {
         $this->context->cookie->postcode = $zipcode;
     }
     $id_zone = 0;
     if ($id_state != 0) {
         $id_zone = State::getIdZone($id_state);
     }
     if (!$id_zone) {
         $id_zone = Country::getIdZone($id_country);
     }
     // Need to set the infos for carrier module !
     $this->context->cookie->id_country = $id_country;
     $this->context->cookie->id_state = $id_state;
     $this->context->cookie->postcode = $zipcode;
     $carriers = Carrier::getCarriersForOrder((int) $id_zone);
     return sizeof($carriers) ? $carriers : array();
 }
開發者ID:jicheng17,項目名稱:pengwine,代碼行數:24,代碼來源:carriercompare.php

示例5: getCarriersListByIdZone

 public function getCarriersListByIdZone($id_country, $id_state = 0, $zipcode = 0)
 {
     global $cart, $smarty, $cookie;
     // cookie saving/updating
     $cookie->id_country = $id_country;
     if ($id_state != 0) {
         $cookie->id_state = $id_state;
     }
     if ($zipcode !== 0) {
         $cookie->postcode = $zipcode;
     }
     $id_zone = 0;
     if ($id_state != 0) {
         $id_zone = State::getIdZone($id_state);
     }
     if (!$id_zone) {
         $id_zone = Country::getIdZone($id_country);
     }
     // Need to set the infos for carrier module !
     $cookie->id_country = $id_country;
     $cookie->id_state = $id_state;
     $cookie->postcode = $zipcode;
     $carriers = array();
     if ($this->addAddress($id_country, $zipcode)) {
         // Back up the current id_address_delivery
         $current_id_address_delivery = $cart->id_address_delivery;
         // Get the new one created
         $cart->id_address_delivery = Configuration::get(CarrierCompare::VIRTUAL_ADDRESS);
         $cart->id_customer = Configuration::get(CarrierCompare::VIRTUAL_CUSTOMER);
         // Get carriers with good id_zone
         $carriers = Carrier::getCarriersForOrder((int) $id_zone);
         // Delete Address and restore id_address_delivery
         $address = new Address((int) Configuration::get(CarrierCompare::VIRTUAL_ADDRESS));
         $address->delete();
         $cart->id_address_delivery = $current_id_address_delivery;
     }
     return count($carriers) ? $carriers : array();
 }
開發者ID:Evil1991,項目名稱:PrestaShop-1.4,代碼行數:38,代碼來源:carriercompare.php


注:本文中的State::getIdZone方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。