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

PHP tep_count_shipping_modules函数代码示例

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

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



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

示例1: tep_address_label

echo TITLE_SHIPPING_ADDRESS;
?>
</div>
        <div class="panel-body">
          <?php 
echo tep_address_label($customer_id, $sendto, true, ' ', '<br />');
?>
        </div>
      </div>
    </div>
  </div>

  <div class="clearfix"></div>

<?php 
if (tep_count_shipping_modules() > 0) {
    ?>

  <h2><?php 
    echo TABLE_HEADING_SHIPPING_METHOD;
    ?>
</h2>

<?php 
    if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
        ?>

  <div class="contentText">
    <div class="alert alert-warning">
      <div class="row">
        <div class="col-xs-8">
开发者ID:skarred,项目名称:Responsive-osCommerce,代码行数:31,代码来源:checkout_shipping.php


示例2: tep_session_register

             }
             break;
         case 'both':
             $pass = true;
             break;
     }
     if ($pass == true && $order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) {
         $free_shipping = true;
         include DIR_WS_LANGUAGES . $language . '/ot_shipping.php';
     }
 }
 if (!tep_session_is_registered('shipping')) {
     tep_session_register('shipping');
 }
 $shipping = false;
 if (tep_count_shipping_modules() > 0 || $free_shipping == true) {
     if ($free_shipping == true) {
         $shipping = 'free_free';
     } else {
         // get all available shipping quotes
         $quotes = $shipping_modules->quote();
         // select cheapest shipping method
         $shipping = $shipping_modules->cheapest();
         $shipping = $shipping['id'];
     }
 }
 if (strpos($shipping, '_')) {
     list($module, $method) = explode('_', $shipping);
     if (is_object(${$module}) || $shipping == 'free_free') {
         if ($shipping == 'free_free') {
             $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:express_uk.php


示例3: setShippingMethod

 function setShippingMethod($method = '')
 {
     global $shipping_modules, $language, $order, $cart, $shipping, $onepage;
     if (defined('MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING') && MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING == 'true') {
         $pass = false;
         switch (MODULE_ORDER_TOTAL_SHIPPING_DESTINATION) {
             case 'national':
                 if ($order->delivery['country_id'] == STORE_COUNTRY) {
                     $pass = true;
                 }
                 break;
             case 'international':
                 if ($order->delivery['country_id'] != STORE_COUNTRY) {
                     $pass = true;
                 }
                 break;
             case 'both':
                 $pass = true;
                 break;
         }
         // disable free shipping for Alaska and Hawaii
         $zone_code = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], '');
         if (in_array($zone_code, array('AK', 'HI'))) {
             $pass = false;
         }
         $free_shipping = false;
         if ($pass == true && $order->info['total'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) {
             $free_shipping = true;
             include DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php';
         }
     } else {
         $free_shipping = false;
     }
     if (!tep_session_is_registered('shipping')) {
         tep_session_register('shipping');
     }
     $shipping = false;
     $onepage['info']['shipping_method'] = false;
     if (tep_count_shipping_modules() > 0 || $free_shipping == true) {
         if (strpos($method, '_')) {
             $shipping = $method;
             list($module, $method) = explode('_', $shipping);
             global ${$module};
             if (is_object(${$module}) || $shipping == 'free_free') {
                 $quote = $shipping_modules->quote($method, $module);
                 if (isset($quote['error'])) {
                     unset($shipping);
                 } else {
                     if (isset($quote[0]['methods'][0]['title']) && isset($quote[0]['methods'][0]['cost']) || $shipping == 'free_free') {
                         $shipping = array('id' => $shipping, 'title' => $shipping == 'free_free' ? FREE_SHIPPING_TITLE : $quote[0]['module'], 'description' => $shipping == 'free_free' ? FREE_SHIPPING_TITLE : $quote[0]['module'] . ':<br />' . $quote[0]['methods'][0]['title'], 'cost' => $shipping == 'free_free' ? '0' : $quote[0]['methods'][0]['cost']);
                         $onepage['info']['shipping_method'] = $shipping;
                     }
                 }
             } else {
                 unset($shipping);
             }
         }
     }
     return '{
     "success": "true"
   }';
 }
开发者ID:CristianCCIT,项目名称:shop4office,代码行数:62,代码来源:onepage_checkout.php


示例4: _process

 function _process()
 {
     global $osC_Session, $free_shipping, $shipping_modules;
     if (tep_not_null($_POST['comments'])) {
         $osC_Session->set('comments', tep_sanitize_string($_POST['comments']));
     }
     if (tep_count_shipping_modules() > 0 || $free_shipping == true) {
         if (isset($_POST['shipping']) && strpos($_POST['shipping'], '_')) {
             $osC_Session->set('shipping', $_POST['shipping']);
             list($module, $method) = explode('_', $osC_Session->value('shipping'));
             if (is_object($GLOBALS[$module]) || $osC_Session->value('shipping') == 'free_free') {
                 if ($osC_Session->value('shipping') == 'free_free') {
                     $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
                     $quote[0]['methods'][0]['cost'] = '0';
                 } else {
                     $quote = $shipping_modules->quote($method, $module);
                 }
                 if (isset($quote['error'])) {
                     $osC_Session->remove('shipping');
                 } else {
                     if (isset($quote[0]['methods'][0]['title']) && isset($quote[0]['methods'][0]['cost'])) {
                         $shipping = array('id' => $osC_Session->value('shipping'), 'title' => $free_shipping == true ? $quote[0]['methods'][0]['title'] : $quote[0]['module'] . ' (' . $quote[0]['methods'][0]['title'] . ')', 'cost' => $quote[0]['methods'][0]['cost']);
                         $osC_Session->set('shipping', $shipping);
                         tep_redirect(tep_href_link(FILENAME_CHECKOUT, 'payment', 'SSL'));
                     }
                 }
             } else {
                 $osC_Session->remove('shipping');
             }
         }
     } else {
         $osC_Session->set('shipping', false);
         tep_redirect(tep_href_link(FILENAME_CHECKOUT, 'payment', 'SSL'));
     }
 }
开发者ID:itnovator,项目名称:oscommerce_cvs,代码行数:35,代码来源:shipping.php


示例5: tep_address_label

                  <?php 
    echo '<h3 class="no-margin-top">' . TITLE_SHIPPING_ADDRESS . '</h3>';
    ?>
                  <?php 
    echo tep_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, ' ', '<br>');
    ?>
		 </div>
		</div>
  	  </div>

     <div class="row"  >
        <div class="col-sm-12 col-lg-12 well clearfix" style="margin-left:-4px">
			 <div  >

			<?php 
    if (tep_count_shipping_modules() > 0 || MVS_STATUS == 'true') {
        if (MVS_STATUS == 'true') {
            require DIR_WS_MODULES . 'vendor_shipping.php';
        } else {
            if (SHOW_HEADING_TITLE_ORIGINAL == 'yes') {
                ?>
        <tr>
          <td><table border="0" width="100%" cellspacing="0" cellpadding="0">
            <tr>
              <td class="pageHeading"><h3 class="no-margin-top"><?php 
                echo TABLE_HEADING_SHIPPING_METHOD;
                ?>
</h3></td>
            </tr>
          </table></td>
        </tr>
开发者ID:resultsonlyweb,项目名称:loaded6-template,代码行数:31,代码来源:order_checkout.tpl.php


示例6: tep_get_zone_code

    }
    // disable free shipping for Alaska and Hawaii
    $zone_code = tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], '');
    if (in_array($zone_code, array('AK', 'HI'))) {
        $pass = false;
    }
    $free_shipping = false;
    if ($pass == true && $order->info['total'] - $order->info['shipping_cost'] >= MODULE_ORDER_TOTAL_SHIPPING_FREE_SHIPPING_OVER) {
        $free_shipping = true;
        //include(DIR_WS_LANGUAGES . $language . '/modules/order_total/ot_shipping.php');
    }
} else {
    $free_shipping = false;
}
$quotes = $shipping_modules->quote();
if (!tep_session_is_registered('shipping') || tep_session_is_registered('shipping') && $shipping == false && tep_count_shipping_modules() > 1) {
    if (tep_session_is_registered('shipping')) {
        tep_session_unregister('shipping');
    }
    tep_session_register('shipping');
    if ($free_shipping == false) {
        $shipping = $shipping_modules->cheapest();
    } else {
        $shipping = array('id' => 'free_free', 'title' => FREE_SHIPPING_TITLE, 'cost' => '0');
    }
}
?>
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php 
if (sizeof($quotes) > 1 && sizeof($quotes[0]) > 1) {
    ?>
开发者ID:digideskio,项目名称:oscmax2,代码行数:31,代码来源:shipping_method.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP tep_create_random_value函数代码示例发布时间:2022-05-23
下一篇:
PHP tep_count_products_in_category函数代码示例发布时间: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