当前位置: 首页>>代码示例>>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;未经允许,请勿转载。