• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP zen_get_shipping_enabled函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中zen_get_shipping_enabled函数的典型用法代码示例。如果您正苦于以下问题:PHP zen_get_shipping_enabled函数的具体用法?PHP zen_get_shipping_enabled怎么用?PHP zen_get_shipping_enabled使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了zen_get_shipping_enabled函数的17个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: sagawaex

 function sagawaex()
 {
     global $order, $db;
     $this->code = 'sagawaex';
     $this->title = MODULE_SHIPPING_SAGAWAEX_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_SAGAWAEX_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_SAGAWAEX_SORT_ORDER;
     //      $this->icon        = DIR_WS_ICONS . 'shipping_sagawaex.gif';
     $this->tax_class = in_array('MODULE_SHIPPING_SAGAWAEX_TAX_CLASS', $this->keys()) ? MODULE_SHIPPING_SAGAWAEX_TAX_CLASS : 0;
     if (zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_SAGAWAEX_STATUS == 'True' ? true : false;
     }
     // only these three are needed since SagawaEx only ships to them
     // convert TEP country id to ISO 3166 id
     $this->sagawaex_countries = array(107 => 'JP');
     $this->sagawaex_countries_nbr = array(107);
     if ($this->enabled == true && (int) MODULE_SHIPPING_SAGAWAEX_ZONE > 0) {
         $check_flag = false;
         $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_SAGAWAEX_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
         while (!$check->EOF) {
             if ($check->fields['zone_id'] < 1) {
                 $check_flag = true;
                 break;
             } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                 $check_flag = true;
                 break;
             }
             $check->MoveNext();
         }
         if ($check_flag == false) {
             $this->enabled = false;
         }
     }
 }
开发者ID:sgkohata,项目名称:zencart-sugu,代码行数:34,代码来源:sagawaex.php


示例2: mzmt

 function mzmt()
 {
     global $order;
     $this->code = 'mzmt';
     $this->title = MODULE_SHIPPING_MZMT_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_MZMT_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_MZMT_SORT_ORDER;
     $this->tax_class = MODULE_SHIPPING_MZMT_TAX_CLASS;
     $this->tax_basis = MODULE_SHIPPING_MZMT_TAX_BASIS;
     $this->num_geozones = MODULE_SHIPPING_MZMT_NUMBER_GEOZONES;
     $this->num_tables = MODULE_SHIPPING_MZMT_NUMBER_TABLES;
     // disable only when entire cart is free shipping
     if (zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_MZMT_STATUS == 'True' ? true : false;
     }
     if ($this->enabled == true) {
         $this->enabled = false;
         for ($n = 1; $n <= $this->num_geozones; $n++) {
             if ((int) constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_ID') > 0 && (int) constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_ID') == $this->getGeoZoneID($order->delivery['country']['id'], $order->delivery['zone_id'])) {
                 $this->enabled = true;
                 $this->delivery_geozone = $n;
                 break;
             } elseif ((int) constant('MODULE_SHIPPING_MZMT_GEOZONE_' . $n . '_ID') == 0 && $n == (int) $this->num_geozones) {
                 $this->enabled = true;
                 $this->delivery_geozone = $n;
                 break;
             }
         }
     }
 }
开发者ID:dalinhuang,项目名称:cameras,代码行数:30,代码来源:mzmt.php


示例3: ems

 function ems()
 {
     global $order;
     $this->code = 'ems';
     $this->title = MODULE_SHIPPING_EMS_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_EMS_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_EMS_SORT_ORDER;
     $this->icon = '';
     $this->tax_class = MODULE_SHIPPING_EMS_TAX_CLASS;
     $this->tax_basis = MODULE_SHIPPING_EMS_TAX_BASIS;
     // disable only when entire cart is free shipping
     if (zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_EMS_STATUS == 'True' ? true : false;
     }
     //##################BOF:limit for delivery to only those countries like DE######
     //added by john 2010-06-21
     $dest_country = $order->delivery['country']['iso_code_2'];
     if (!defined('MODULE_SHIPPING_EMS_DISABLED_COUNTRIES')) {
         $this->enabled = false;
     }
     if ($this->enabled == true && defined('MODULE_SHIPPING_EMS_DISABLED_COUNTRIES')) {
         $disabled2countries = split("[,]", constant('MODULE_SHIPPING_EMS_DISABLED_COUNTRIES'));
         if (is_array($disabled2countries) && in_array($dest_country, $disabled2countries)) {
             $this->enabled = false;
         } else {
             $this->enabled = true;
         }
     }
     //##################EOF:limit for delivery to only those countries like DE######
 }
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:30,代码来源:ems.php


示例4: usps

 /**
  * Constructor
  *
  * @return usps
  */
 function usps()
 {
     global $order, $db, $template;
     $this->code = 'usps';
     $this->title = MODULE_SHIPPING_USPS_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_USPS_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_USPS_SORT_ORDER;
     $this->icon = $template->get_template_dir('shipping_usps.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . 'shipping_usps.gif';
     $this->tax_class = MODULE_SHIPPING_USPS_TAX_CLASS;
     $this->tax_basis = MODULE_SHIPPING_USPS_TAX_BASIS;
     // disable only when entire cart is free shipping
     if (zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_USPS_STATUS == 'True' ? true : false;
     }
     if ($this->enabled == true && (int) MODULE_SHIPPING_USPS_ZONE > 0) {
         $check_flag = false;
         $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_USPS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
         while (!$check->EOF) {
             if ($check->fields['zone_id'] < 1) {
                 $check_flag = true;
                 break;
             } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                 $check_flag = true;
                 break;
             }
             $check->MoveNext();
         }
         if ($check_flag == false) {
             $this->enabled = false;
         }
     }
     $this->types = array('Express' => 'Express Mail', 'First Class' => 'First-Class Mail', 'Priority' => 'Priority Mail', 'Parcel' => 'Parcel Post', 'Media' => 'Media Mail', 'BPM' => 'Bound Printed Material', 'Library' => 'Library');
     $this->intl_types = array('GXG Document' => 'Global Express Guaranteed Document Service', 'GXG Non-Document' => 'Global Express Guaranteed Non-Document Service', 'Express' => 'Global Express Mail (EMS)', 'Priority Lg' => 'Global Priority Mail - Flat-rate Envelope (Large)', 'Priority Sm' => 'Global Priority Mail - Flat-rate Envelope (Small)', 'Priority Var' => 'Global Priority Mail - Variable Weight (Single)', 'Airmail Letter' => 'Airmail Letter Post', 'Airmail Parcel' => 'Airmail Parcel Post', 'Surface Letter' => 'Economy (Surface) Letter Post', 'Surface Post' => 'Economy (Surface) Parcel Post');
     $this->countries = $this->country_list();
 }
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:40,代码来源:usps.php


示例5: ups

 /**
  * Constructor
  *
  * @return ups
  */
 function ups()
 {
     global $order, $db, $template;
     $this->code = 'ups';
     $this->title = MODULE_SHIPPING_UPS_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_UPS_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_UPS_SORT_ORDER;
     $this->icon = $template->get_template_dir('shipping_ups.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . 'shipping_ups.gif';
     $this->tax_class = MODULE_SHIPPING_UPS_TAX_CLASS;
     $this->tax_basis = MODULE_SHIPPING_UPS_TAX_BASIS;
     // disable only when entire cart is free shipping
     if (zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_UPS_STATUS == 'True' ? true : false;
     }
     if ($this->enabled == true && (int) MODULE_SHIPPING_UPS_ZONE > 0) {
         $check_flag = false;
         $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_UPS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
         while (!$check->EOF) {
             if ($check->fields['zone_id'] < 1) {
                 $check_flag = true;
                 break;
             } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                 $check_flag = true;
                 break;
             }
             $check->MoveNext();
         }
         if ($check_flag == false) {
             $this->enabled = false;
         }
     }
     $this->types = array('1DM' => 'Next Day Air Early AM', '1DML' => 'Next Day Air Early AM Letter', '1DA' => 'Next Day Air', '1DAL' => 'Next Day Air Letter', '1DAPI' => 'Next Day Air Intra (Puerto Rico)', '1DP' => 'Next Day Air Saver', '1DPL' => 'Next Day Air Saver Letter', '2DM' => '2nd Day Air AM', '2DML' => '2nd Day Air AM Letter', '2DA' => '2nd Day Air', '2DAL' => '2nd Day Air Letter', '3DS' => '3 Day Select', 'GND' => 'Ground', 'GNDCOM' => 'Ground Commercial', 'GNDRES' => 'Ground Residential', 'STD' => 'Canada Standard', 'XPR' => 'Worldwide Express', 'XPRL' => 'worldwide Express Letter', 'XDM' => 'Worldwide Express Plus', 'XDML' => 'Worldwide Express Plus Letter', 'XPD' => 'Worldwide Expedited', 'WXS' => 'Worldwide Saver');
 }
开发者ID:dalinhuang,项目名称:kakayaga,代码行数:38,代码来源:ups.php


示例6: usps

 /**
  * Constructor
  *
  * @return usps
  */
 function usps()
 {
     global $order, $db, $template;
     $this->code = 'usps';
     $this->title = MODULE_SHIPPING_USPS_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_USPS_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_USPS_SORT_ORDER;
     $this->icon = $template->get_template_dir('shipping_usps.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . 'shipping_usps.gif';
     $this->tax_class = MODULE_SHIPPING_USPS_TAX_CLASS;
     $this->tax_basis = MODULE_SHIPPING_USPS_TAX_BASIS;
     // disable only when entire cart is free shipping
     if (zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_USPS_STATUS == 'True' ? true : false;
     }
     if ($this->enabled == true && (int) MODULE_SHIPPING_USPS_ZONE > 0) {
         $check_flag = false;
         $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_USPS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
         while (!$check->EOF) {
             if ($check->fields['zone_id'] < 1) {
                 $check_flag = true;
                 break;
             } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                 $check_flag = true;
                 break;
             }
             $check->MoveNext();
         }
         if ($check_flag == false) {
             $this->enabled = false;
         }
     }
     $this->types = array('EXPRESS' => 'Express Mail', 'FIRST CLASS' => 'First-Class Mail', 'PRIORITY' => 'Priority Mail', 'PARCEL' => 'Parcel Post', 'MEDIA' => 'Media Mail', 'BPM' => 'Bound Printed Material', 'LIBRARY' => 'Library');
     $this->intl_types = array('Global Express' => 'Global Express Guaranteed', 'Global Express Non-Doc Rect' => 'Global Express Guaranteed Non-Document Rectangular', 'Global Express Non-Doc Non-Rect' => 'Global Express Guaranteed Non-Document Non-Rectangular', 'Express Mail Int' => 'Express Mail International (EMS)', 'Express Mail Int Flat Rate Env' => 'Express Mail International (EMS) Flat Rate Envelope', 'Priority Mail International' => 'Priority Mail International', 'Priority Mail Int Flat Rate Env' => 'Priority Mail International Flat Rate Envelope', 'Priority Mail Int Flat Rate Box' => 'Priority Mail International Flat Rate Box', 'First-Class Mail Int' => 'First-Class Mail International');
     $this->countries = $this->country_list();
 }
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:40,代码来源:usps.php


示例7: canadapost

 /**
  * Constructor
  *
  * @return usps
  */
 function canadapost()
 {
     global $order, $gBitDb, $template, $gBitLanguage;
     $this->code = 'canadapost';
     $this->title = tra('Canada Post');
     $this->description = tra('Canada Post Parcel Service<p><strong>CPC Profile Information </strong>can be obtained at http://sellonline.canadapost.ca<br /><a href=http://sellonline.canadapost.ca/servlet/LogonServlet?Language=0 target="_blank">Modify my profile</a>');
     $this->icon = 'shipping_canadapost';
     $this->enabled = zen_get_shipping_enabled($this->code) && CommerceSystem::isConfigActive('MODULE_SHIPPING_CANADAPOST_STATUS');
     if ($this->enabled == true) {
         $this->server = MODULE_SHIPPING_CANADAPOST_SERVERIP;
         $this->port = MODULE_SHIPPING_CANADAPOST_SERVERPOST;
         $this->language = in_array($gBitLanguage->getLanguage(), array('en', 'fr')) ? strtolower($gBitLanguage->getLanguage()) : MODULE_SHIPPING_CANADAPOST_LANGUAGE;
         $this->CPCID = MODULE_SHIPPING_CANADAPOST_CPCID;
         $this->turnaround_time = MODULE_SHIPPING_CANADAPOST_TIME;
         $this->sort_order = MODULE_SHIPPING_CANADAPOST_SORT_ORDER;
         $this->items_qty = 0;
         $this->items_price = 0;
         $this->tax_class = MODULE_SHIPPING_CANADAPOST_TAX_CLASS;
         $this->tax_basis = MODULE_SHIPPING_CANADAPOST_TAX_BASIS;
         $this->cp_online_handling = MODULE_SHIPPING_CANADAPOST_CP_HANDLING == 'True' ? true : false;
         $this->lettermail = MODULE_SHIPPING_CANADAPOST_LETTERMAIL_STATUS == 'True' ? true : false;
         $this->lettermail_max_weight = MODULE_SHIPPING_CANADAPOST_LETTERMAIL_MAX;
         $this->lettermail_available = false;
         if (MODULE_SHIPPING_CANADAPOST_ZONE) {
             $this->enabled = $gBitDb->query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = ?, and zone_country_id = ?", array(MODULE_SHIPPING_CANADAPOST_ZONE, $order->delivery['country']['id']));
         }
     }
 }
开发者ID:bitweaver,项目名称:commerce,代码行数:33,代码来源:canadapost.php


示例8: freeshipper

 function freeshipper()
 {
     global $order, $db;
     $this->code = 'freeshipper';
     $this->title = MODULE_SHIPPING_FREESHIPPER_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_FREESHIPPER_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_FREESHIPPER_SORT_ORDER;
     $this->icon = '';
     $this->tax_class = MODULE_SHIPPING_FREESHIPPER_TAX_CLASS;
     // enable only when entire cart is free shipping
     //      if ($_SESSION['cart']->in_cart_check('product_is_always_free_shipping','1') == $_SESSION['cart']->count_contents()) {
     if (zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_FREESHIPPER_STATUS == 'True' ? true : false;
     }
     if ($this->enabled == true && (int) MODULE_SHIPPING_FREESHIPPER_ZONE > 0) {
         $check_flag = false;
         $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_FREESHIPPER_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
         while (!$check->EOF) {
             if ($check->fields['zone_id'] < 1) {
                 $check_flag = true;
                 break;
             } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                 $check_flag = true;
                 break;
             }
             $check->MoveNext();
         }
         if ($check_flag == false) {
             $this->enabled = false;
         }
     }
 }
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:32,代码来源:freeshipper.php


示例9: item

 function item()
 {
     global $order, $db;
     $this->code = 'item';
     $this->title = MODULE_SHIPPING_ITEM_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_ITEM_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_ITEM_SORT_ORDER;
     $this->icon = '';
     $this->tax_class = MODULE_SHIPPING_ITEM_TAX_CLASS;
     $this->tax_basis = MODULE_SHIPPING_ITEM_TAX_BASIS;
     // disable only when entire cart is free shipping
     if (zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_ITEM_STATUS == 'True' ? true : false;
     }
     if ($this->enabled == true && (int) MODULE_SHIPPING_ITEM_ZONE > 0) {
         $check_flag = false;
         $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_ITEM_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
         while (!$check->EOF) {
             if ($check->fields['zone_id'] < 1) {
                 $check_flag = true;
                 break;
             } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                 $check_flag = true;
                 break;
             }
             $check->MoveNext();
         }
         if ($check_flag == false) {
             $this->enabled = false;
         }
     }
 }
开发者ID:wwxgitcat,项目名称:zencart_v1.0,代码行数:32,代码来源:item.php


示例10: usps

 function usps()
 {
     global $order, $db, $template, $current_page_base;
     $this->code = 'usps';
     $this->title = MODULE_SHIPPING_USPS_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_USPS_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_USPS_SORT_ORDER;
     $this->icon = $template->get_template_dir('shipping_usps.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . 'shipping_usps.gif';
     $this->tax_class = MODULE_SHIPPING_USPS_TAX_CLASS;
     $this->tax_basis = MODULE_SHIPPING_USPS_TAX_BASIS;
     // disable only when entire cart is free shipping
     if (zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_USPS_STATUS == 'True' ? true : false;
     }
     if ($this->enabled) {
         // check MODULE_SHIPPING_USPS_HANDLING_METHOD is in
         $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_USPS_HANDLING_METHOD'");
         if ($check_query->EOF) {
             $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Handling Per Order or Per Box', 'MODULE_SHIPPING_USPS_HANDLING_METHOD', 'Box', 'Do you want to charge Handling Fee Per Order or Per Box?', '6', '0', 'zen_cfg_select_option(array(\\'Order\\', \\'Box\\'), ', now())");
         }
     }
     if ($this->enabled == true && (int) MODULE_SHIPPING_USPS_ZONE > 0) {
         $check_flag = false;
         $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_USPS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
         while (!$check->EOF) {
             if ($check->fields['zone_id'] < 1) {
                 $check_flag = true;
                 break;
             } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                 $check_flag = true;
                 break;
             }
             $check->MoveNext();
         }
         if ($check_flag == false) {
             $this->enabled = false;
         }
     }
     $this->types = array('EXPRESS' => 'Express Mail', 'FIRST CLASS' => 'First-Class Mail', 'PRIORITY' => 'Priority Mail', 'PARCEL' => 'Parcel Post', 'MEDIA' => 'Media Mail', 'BPM' => 'Bound Printed Matter', 'LIBRARY' => 'Library');
     $this->intl_types = array('Global Express' => 'Global Express Guaranteed (GXG)', 'Global Express Non-Doc Rect' => 'Global Express Guaranteed Non-Document Rectangular', 'Global Express Non-Doc Non-Rect' => 'Global Express Guaranteed Non-Document Non-Rectangular', 'Global Express Envelopes' => 'USPS GXG Envelopes', 'Express Mail Int' => 'Express Mail International', 'Express Mail Int Flat Rate Env' => 'Express Mail International Flat Rate Envelope', 'Priority Mail International' => 'Priority Mail International', 'Priority Mail Int Flat Rate Env' => 'Priority Mail International Flat Rate Envelope', 'Priority Mail Int Flat Rate Box' => 'Priority Mail International Flat Rate Box', 'Priority Mail Int Flat Rate Small Box' => 'Priority Mail International Small Flat Rate Box', 'Priority Mail Int Flat Rate Med Box' => 'Priority Mail International Medium Flat Rate Box', 'Priority Mail Int Flat Rate Lrg Box' => 'Priority Mail International Large Flat Rate Box', 'First Class Mail Int Lrg Env' => 'First-Class Mail International Large Envelope', 'First Class Mail Int Package' => 'First-Class Mail International Package', 'First Class Mail Int Letter' => 'First-Class Mail International Letter');
     $this->countries = $this->country_list();
     // use USPS translations for US shops
     $this->usps_countries = $this->usps_translation();
 }
开发者ID:dalinhuang,项目名称:yijinhuanxiang,代码行数:44,代码来源:usps.php


示例11: zasilkovna

 function zasilkovna()
 {
     global $order, $db;
     /** injected code cleanup (for mailing, etc) **/
     if (preg_match('/^Zásilkovna/', $order->info['shipping_method'])) {
         $order->info['shipping_method'] = MODULE_SHIPPING_ZAS_TEXT_WAY;
     }
     if (preg_match('/^Zásilkovna/', $_SESSION['shipping']['title'])) {
         $_SESSION['shipping']['title'] = MODULE_SHIPPING_ZAS_TEXT_WAY;
     }
     $this->code = 'zasilkovna';
     $this->title = MODULE_SHIPPING_ZAS_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_ZAS_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_ZAS_SORT_ORDER;
     $this->api_key = MODULE_SHIPPING_ZAS_API_KEY;
     $this->country = MODULE_SHIPPING_ZAS_COUNTRY == 'Vše' ? '' : (MODULE_SHIPPING_ZAS_COUNTRY == 'Slovenská republika' ? 'sk' : 'cz');
     $this->icon = '';
     $this->tax_class = MODULE_SHIPPING_ZAS_TAX_CLASS;
     $this->tax_basis = MODULE_SHIPPING_ZAS_TAX_BASIS == 'Doprava' ? 'Shipping' : (MODULE_SHIPPING_ZAS_TAX_BASIS == 'Fakturace' ? 'Billing' : 'Store');
     // disable only when entire cart is free shipping
     if (zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_ZAS_STATUS == 'Povolit' && $this->api_key ? true : false;
     }
     if ($this->enabled == true && (int) MODULE_SHIPPING_ZAS_ZONE > 0) {
         $check_flag = false;
         $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_ZAS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
         while (!$check->EOF) {
             if ($check->fields['zone_id'] < 1) {
                 $check_flag = true;
                 break;
             } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                 $check_flag = true;
                 break;
             }
             $check->MoveNext();
         }
         if ($check_flag == false) {
             $this->enabled = false;
         }
     }
     if ($order->info['shipping_module_code'] == 'zasilkovna_' . $this->code) {
         $order->info['shipping_method'] = $this->title . ' (' . $this->description . ')';
     }
 }
开发者ID:Zasilkovna,项目名称:zencart,代码行数:44,代码来源:zasilkovna.php


示例12: __construct

 function __construct()
 {
     global $order, $customer_id;
     parent::__construct();
     @define('MODULE_SHIPPING_FEDEX_WEB_SERVICES_INSURE', 0);
     $this->code = "fedexwebservices";
     $this->title = tra('FedEx');
     $this->description = 'You will need to have registered an account with FedEx and proper approval from FedEx identity to use this module. Please see the README.TXT file for other requirements.';
     $this->icon = 'shipping_fedex';
     if (MODULE_SHIPPING_FEDEX_WEB_SERVICES_FREE_SHIPPING == 'true' || zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_FEDEX_WEB_SERVICES_STATUS == 'true' ? true : false;
     }
     if (defined("SHIPPING_ORIGIN_COUNTRY")) {
         if ((int) SHIPPING_ORIGIN_COUNTRY > 0) {
             $countries_array = zen_get_countries(SHIPPING_ORIGIN_COUNTRY, true);
             $this->country = $countries_array['countries_iso_code_2'];
         } else {
             $this->country = SHIPPING_ORIGIN_COUNTRY;
         }
     } else {
         $this->country = STORE_ORIGIN_COUNTRY;
     }
     if ($this->enabled == true && (int) MODULE_SHIPPING_FEDEX_WEB_SERVICES_ZONE > 0) {
         $this->sort_order = MODULE_SHIPPING_FEDEX_WEB_SERVICES_SORT_ORDER;
         $this->tax_class = MODULE_SHIPPING_FEDEX_WEB_SERVICES_TAX_CLASS;
         $check_flag = false;
         $check = $this->mDb->query("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_FEDEX_WEB_SERVICES_ZONE . "' and zone_country_id = '" . $order->delivery['country']['countries_id'] . "' order by zone_id");
         while (!$check->EOF) {
             if ($check->fields['zone_id'] < 1) {
                 $check_flag = true;
                 break;
             } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                 $check_flag = true;
                 break;
             }
             $check->MoveNext();
         }
         if ($check_flag == false) {
             $this->enabled = false;
         }
     }
 }
开发者ID:bitweaver,项目名称:commerce,代码行数:42,代码来源:fedexwebservices.php


示例13: zones

 function zones()
 {
     $this->code = 'zones';
     $this->title = MODULE_SHIPPING_ZONES_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_ZONES_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_ZONES_SORT_ORDER;
     $this->icon = '';
     $this->tax_class = MODULE_SHIPPING_ZONES_TAX_CLASS;
     $this->tax_basis = MODULE_SHIPPING_ZONES_TAX_BASIS;
     // disable only when entire cart is free shipping
     if (zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_ZONES_STATUS == 'True' ? true : false;
     }
     // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
     $this->num_zones = 3;
     if (IS_ADMIN_FLAG === true) {
         // build in admin only additional zones if missing in the configuration table due to customization of default $this->num_zones = 3
         global $db;
         for ($i = 1; $i <= $this->num_zones; $i++) {
             $check = $db->Execute("select * from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_ZONES_COUNTRIES_" . $i . "'");
             if ($this->enabled && $check->EOF) {
                 $default_countries = '';
                 $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Zone " . $i . " Countries', 'MODULE_SHIPPING_ZONES_COUNTRIES_" . $i . "', '" . $default_countries . "', 'Comma separated list of two character ISO country codes that are part of Zone " . $i . ".<br />Set as 00 to indicate all two character ISO country codes that are not specifically defined.', '6', '0', 'zen_cfg_textarea(', now())");
                 $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Zone " . $i . " Shipping Table', 'MODULE_SHIPPING_ZONES_COST_" . $i . "', '3:8.50,7:10.50,99:20.00', 'Shipping rates to Zone " . $i . " destinations based on a group of maximum order weights/prices. Example: 3:8.50,7:10.50,... Weight/Price less than or equal to 3 would cost 8.50 for Zone " . $i . " destinations.<br />You can end the last amount as 10000:7% to charge 7% of the Order Total', '6', '0', 'zen_cfg_textarea(', now())");
                 $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Zone " . $i . " Handling Fee', 'MODULE_SHIPPING_ZONES_HANDLING_" . $i . "', '0', 'Handling Fee for this shipping zone', '6', '0', now())");
                 $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Handling Per Order or Per Box Zone " . $i . "  (when by weight)' , 'MODULE_SHIPPING_ZONES_HANDLING_METHOD_" . $i . "', 'Order', 'Do you want to charge Handling Fee Per Order or Per Box?', '6', '0', 'zen_cfg_select_option(array(\\'Order\\', \\'Box\\'), ', now())");
             }
         }
     }
     // build in admin only
     if ($this->enabled) {
         global $db;
         for ($i = 1; $i <= $this->num_zones; $i++) {
             // check MODULE_SHIPPING_TABLE_HANDLING_METHOD is in
             $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_ZONES_HANDLING_METHOD_" . $i . "'");
             if ($check_query->EOF) {
                 $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Handling Per Order or Per Box Zone " . $i . "  (when by weight)' , 'MODULE_SHIPPING_ZONES_HANDLING_METHOD_" . $i . "', 'Order', 'Do you want to charge Handling Fee Per Order or Per Box?', '6', '0', 'zen_cfg_select_option(array(\\'Order\\', \\'Box\\'), ', now())");
             }
         }
     }
 }
开发者ID:wwxgitcat,项目名称:zencart_v1.0,代码行数:41,代码来源:zones.php


示例14: ups

 /**
  * Constructor
  *
  * @return ups
  */
 function ups()
 {
     global $order, $db, $template, $current_page_base;
     $this->code = 'ups';
     $this->title = MODULE_SHIPPING_UPS_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_UPS_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_UPS_SORT_ORDER;
     $this->icon = $template->get_template_dir('shipping_ups.gif', DIR_WS_TEMPLATE, $current_page_base, 'images/icons') . '/' . 'shipping_ups.gif';
     $this->tax_class = MODULE_SHIPPING_UPS_TAX_CLASS;
     $this->tax_basis = MODULE_SHIPPING_UPS_TAX_BASIS;
     // disable only when entire cart is free shipping
     if (zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_UPS_STATUS == 'True' ? true : false;
     }
     if ($this->enabled) {
         // check MODULE_SHIPPING_UPS_HANDLING_METHOD is in
         $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_UPS_HANDLING_METHOD'");
         if ($check_query->EOF) {
             $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Handling Per Order or Per Box', 'MODULE_SHIPPING_UPS_HANDLING_METHOD', 'Box', 'Do you want to charge Handling Fee Per Order or Per Box?', '6', '0', 'zen_cfg_select_option(array(\\'Order\\', \\'Box\\'), ', now())");
         }
     }
     if ($this->enabled == true && (int) MODULE_SHIPPING_UPS_ZONE > 0) {
         $check_flag = false;
         $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_UPS_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
         while (!$check->EOF) {
             if ($check->fields['zone_id'] < 1) {
                 $check_flag = true;
                 break;
             } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                 $check_flag = true;
                 break;
             }
             $check->MoveNext();
         }
         if ($check_flag == false) {
             $this->enabled = false;
         }
     }
     $this->types = array('1DM' => 'Next Day Air Early AM', '1DML' => 'Next Day Air Early AM Letter', '1DA' => 'Next Day Air', '1DAL' => 'Next Day Air Letter', '1DAPI' => 'Next Day Air Intra (Puerto Rico)', '1DP' => 'Next Day Air Saver', '1DPL' => 'Next Day Air Saver Letter', '2DM' => '2nd Day Air AM', '2DML' => '2nd Day Air AM Letter', '2DA' => '2nd Day Air', '2DAL' => '2nd Day Air Letter', '3DS' => '3 Day Select', 'GND' => 'Ground', 'GNDCOM' => 'Ground Commercial', 'GNDRES' => 'Ground Residential', 'STD' => 'Canada Standard', 'XPR' => 'Worldwide Express', 'XPRL' => 'Worldwide Express Letter', 'XDM' => 'Worldwide Express Plus', 'XDML' => 'Worldwide Express Plus Letter', 'XPD' => 'Worldwide Expedited', 'WXS' => 'Worldwide Saver');
 }
开发者ID:dalinhuang,项目名称:yijinhuanxiang,代码行数:45,代码来源:ups.php


示例15: table

 /**
  * Enter description here...
  *
  * @return table
  */
 function table()
 {
     global $order, $db;
     $this->code = 'table';
     $this->title = MODULE_SHIPPING_TABLE_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_TABLE_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_TABLE_SORT_ORDER;
     $this->icon = '';
     $this->tax_class = MODULE_SHIPPING_TABLE_TAX_CLASS;
     $this->tax_basis = MODULE_SHIPPING_TABLE_TAX_BASIS;
     // disable only when entire cart is free shipping
     if (zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_TABLE_STATUS == 'True' ? true : false;
     }
     if ($this->enabled) {
         // check MODULE_SHIPPING_TABLE_HANDLING_METHOD is in
         $check_query = $db->Execute("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_SHIPPING_TABLE_HANDLING_METHOD'");
         if ($check_query->EOF) {
             $db->Execute("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Handling Per Order or Per Box', 'MODULE_SHIPPING_TABLE_HANDLING_METHOD', 'Order', 'Do you want to charge Handling Fee Per Order or Per Box?', '6', '0', 'zen_cfg_select_option(array(\\'Order\\', \\'Box\\'), ', now())");
         }
     }
     if ($this->enabled == true && (int) MODULE_SHIPPING_TABLE_ZONE > 0) {
         $check_flag = false;
         $check = $db->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . MODULE_SHIPPING_TABLE_ZONE . "' and zone_country_id = '" . $order->delivery['country']['id'] . "' order by zone_id");
         while (!$check->EOF) {
             if ($check->fields['zone_id'] < 1) {
                 $check_flag = true;
                 break;
             } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                 $check_flag = true;
                 break;
             }
             $check->MoveNext();
         }
         if ($check_flag == false) {
             $this->enabled = false;
         }
     }
 }
开发者ID:kirkbauer2,项目名称:kirkzc,代码行数:44,代码来源:table.php


示例16: zones

 function zones()
 {
     $this->code = 'zones';
     $this->title = MODULE_SHIPPING_ZONES_TEXT_TITLE;
     $this->description = MODULE_SHIPPING_ZONES_TEXT_DESCRIPTION;
     $this->sort_order = MODULE_SHIPPING_ZONES_SORT_ORDER;
     $this->icon = '';
     $this->tax_class = MODULE_SHIPPING_ZONES_TAX_CLASS;
     $this->tax_class = MODULE_SHIPPING_ZONES_TAX_CLASS;
     // disable only when entire cart is free shipping
     if (zen_get_shipping_enabled($this->code)) {
         $this->enabled = MODULE_SHIPPING_ZONES_STATUS == 'True' ? true : false;
     }
     // CUSTOMIZE THIS SETTING FOR THE NUMBER OF ZONES NEEDED
     $this->num_zones = 3;
 }
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:16,代码来源:zones.php


示例17: update_status

 /**
  * check whether this module should be enabled or disabled based on zone assignments and any other rules
  */
 function update_status()
 {
     global $order, $db;
     if (defined('IS_ADMIN_FLAG')) {
         return;
     }
     // disable only when entire cart is free shipping
     if (zen_get_shipping_enabled($this->code) == FALSE) {
         $this->enabled = FALSE;
     }
     if ($this->enabled == true) {
         if ((int) MODULE_SHIPPING_USPS_ZONE > 0) {
             $check_flag = false;
             $check = $this->mDb->Execute("select zone_id from " . TABLE_ZONES_TO_GEO_ZONES . " where geo_zone_id = '" . (int) MODULE_SHIPPING_USPS_ZONE . "' and zone_country_id = '" . (int) $order->delivery['country']['countries_id'] . "' order by zone_id");
             while (!$check->EOF) {
                 if ($check->fields['zone_id'] < 1) {
                     $check_flag = true;
                     break;
                 } elseif ($check->fields['zone_id'] == $order->delivery['zone_id']) {
                     $check_flag = true;
                     break;
                 }
                 $check->MoveNext();
             }
             if ($check_flag == false) {
                 $this->enabled = false;
             }
         }
         global $template, $current_page_base;
         // CUSTOMIZED CONDITIONS GO HERE
         // Optionally add additional code here to change $this->enabled to false based on whatever custom rules you require.
         // -----
         // -----
         // eof: optional additional code
     }
 }
开发者ID:bitweaver,项目名称:commerce,代码行数:39,代码来源:usps.php



注:本文中的zen_get_shipping_enabled函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP zen_get_show_product_switch函数代码示例发布时间:2022-05-23
下一篇:
PHP zen_get_products_url函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap