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

PHP zen_count_shipping_modules函数代码示例

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

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



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

示例1: setShippingMethod

 /**
  * Determine the appropriate shipping method if applicable
  * By default, selects the lowest-cost quote
  */
 function setShippingMethod()
 {
     global $total_count, $total_weight;
     // ensure that cart contents is calculated properly for weight and value
     if (!isset($total_weight)) {
         $total_weight = $_SESSION['cart']->show_weight();
     }
     if (!isset($total_count)) {
         $total_count = $_SESSION['cart']->count_contents();
     }
     // set the shipping method if one is not already set
     // defaults to the cheapest shipping method
     if (!$_SESSION['shipping'] || $_SESSION['shipping'] && $_SESSION['shipping'] == false && zen_count_shipping_modules() > 1) {
         require_once DIR_WS_CLASSES . 'http_client.php';
         require_once DIR_WS_CLASSES . 'shipping.php';
         $shipping_Obj = new shipping();
         // generate the quotes
         $shipping_Obj->quote();
         // set the cheapest one
         $_SESSION['shipping'] = $shipping_Obj->cheapest();
     }
 }
开发者ID:BGCX067,项目名称:ez-commerce-svn-to-git,代码行数:26,代码来源:paypalwpp.php


示例2: zen_image

               </a>
             </div>
		 
             <div class="versan_top_m">
             <?php 
echo zen_image($template->get_template_dir('tu_07.gif', DIR_WS_TEMPLATE, $current_page_base, 'images') . '/tu_07.gif');
?>
              <?php 
echo zen_address_label($_SESSION['customer_id'], $_SESSION['sendto'], true, ' ', '<br />');
?>
             </div>
		</div>
		
		<div class="clear"></div>
 <?php 
if (zen_count_shipping_modules() > 0) {
    ?>
		<div class="verdart">
            <h6><?php 
    echo TEXT_SHIPPING_TITLE;
    ?>
</h6>
            <p><?php 
    echo TEXT_SHIPPING;
    ?>
</p>
            
            <div class="verdart_c">
                <div id="verdart_t">
                   <?php 
    require $template->get_template_dir('tpl_checkout_shipping_block.php', DIR_WS_TEMPLATE, $current_page_base, 'templates') . '/tpl_checkout_shipping_block.php';
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:31,代码来源:tpl_checkout_shipping_default.php


示例3: payment

                $checklist[] = $val['id'] . '_' . $method['id'];
            }
        } else {
            // skip
        }
    }
    $checkval = $_SESSION['shipping']['id'];
    if (!in_array($checkval, $checklist) && $_SESSION['shipping']['id'] != 'free_free') {
        $messageStack->add('checkout_shipping', ERROR_PLEASE_RESELECT_SHIPPING_METHOD, 'error');
    }
}
// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
if (!isset($_SESSION['shipping']) && zen_count_shipping_modules() > 1) {
    $_SESSION['shipping'] = $shipping_modules->cheapest();
}
// Should address-edit button be offered?
$displayAddressEdit = MAX_ADDRESS_BOOK_ENTRIES >= 2;
// if shipping-edit button should be overridden, do so
$editShippingButtonLink = zen_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL');
if (isset($_SESSION['payment']) && method_exists(${$_SESSION}['payment'], 'alterShippingEditButton')) {
    $theLink = ${$_SESSION}['payment']->alterShippingEditButton();
    if ($theLink) {
        $editShippingButtonLink = $theLink;
        $displayAddressEdit = true;
    }
}
require DIR_WS_CLASSES . 'payment.php';
$payment_modules = new payment();
开发者ID:R-Future,项目名称:zencart,代码行数:31,代码来源:header_php.php


示例4: zen_href_link

         $db->Execute($sql);
     } else {
         // do not update referral was added before
     }
 }
 if (isset(${$_SESSION}['payment']->form_action_url)) {
     $form_action_url = ${$_SESSION}['payment']->form_action_url;
 } else {
     $form_action_url = zen_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL');
 }
 // process the selected shipping method
 if (zen_not_null($_POST['comments'])) {
     $_SESSION['comments'] = zen_db_prepare_input($_POST['comments']);
 }
 $comments = $_SESSION['comments'];
 if (zen_count_shipping_modules() > 0 || $free_shipping == true) {
     if (isset($_POST['insurance_checked']) && $_POST['insurance_checked'] == "false") {
         $insurance_checked = $_SESSION['insurance']['price'];
         $_SESSION['coupons']['insurance_checked'] = "true";
     }
     if (isset($_POST['coupon_prices']) && $_POST['coupon_prices'] != "") {
         $_SESSION['coupons']['prices'] = $_POST['coupon_prices'];
     }
     if (isset($_POST['shipping']) && strpos($_POST['shipping'], '_')) {
         $_SESSION['shipping'] = $_POST['shipping'];
         list($module, $method) = explode('_', $_SESSION['shipping']);
         if (is_object(${$module}) || $_SESSION['shipping'] == 'free_free') {
             if ($_SESSION['shipping'] == 'free_free') {
                 $quote[0]['methods'][0]['title'] = FREE_SHIPPING_TITLE;
                 $quote[0]['methods'][0]['cost'] = '0';
             } else {
开发者ID:happyxlq,项目名称:lt_svn,代码行数:31,代码来源:header_php.php


示例5: array

    $checklist = array();
    foreach ($quotes as $key => $val) {
        foreach ($val['methods'] as $key2 => $method) {
            $checklist[] = $val['id'] . '_' . $method['id'];
        }
    }
    $checkval = is_array($_SESSION['shipping']) ? $_SESSION['shipping']['id'] : $_SESSION['shipping'];
    if (!in_array($checkval, $checklist)) {
        $messageStack->add('checkout_shipping', ERROR_PLEASE_RESELECT_SHIPPING_METHOD, 'error');
    }
}
// if no shipping method has been selected, automatically select the cheapest method.
// if the modules status was changed when none were available, to save on implementing
// a javascript force-selection method, also automatically select the cheapest shipping
// method if more than one module is now enabled
if (!$_SESSION['shipping'] || $_SESSION['shipping'] && $_SESSION['shipping'] == false && zen_count_shipping_modules() > 1) {
    $_SESSION['shipping'] = $shipping_modules->cheapest();
}
// Should address-edit button be offered?
$displayAddressEdit = MAX_ADDRESS_BOOK_ENTRIES >= 2;
// if shipping-edit button should be overridden, do so
$editShippingButtonLink = zen_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'SSL');
if (isset($_SESSION['payment']) && method_exists(${$_SESSION}['payment'], 'alterShippingEditButton')) {
    $theLink = ${$_SESSION}['payment']->alterShippingEditButton();
    if ($theLink) {
        $editShippingButtonLink = $theLink;
        $displayAddressEdit = true;
    }
}
$breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
$breadcrumb->add(NAVBAR_TITLE_2);
开发者ID:zenmagick,项目名称:zencart,代码行数:31,代码来源:header_php.php


示例6: zen_redirect

                $gBitSmarty->assign('errors', "Please select a shipping method");
            }
        } else {
            // not virtual product, but no shipping cost.
            $_SESSION['shipping'] = !$free_shipping ? 'free_free' : false;
            zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
        }
    }
    if ($gBitUser->isRegistered() && zen_count_shipping_modules() && !empty($_SESSION['sendto']) && empty($_REQUEST['change_address'])) {
        // get all available shipping quotes
        $quotes = array();
        if (empty($free_shipping)) {
            $quotes = $shipping->quote($gBitCustomer->mCart->show_weight());
        }
        // if no shipping method has been selected, automatically select the cheapest method.
        // if the modules status was changed when none were available, to save on implementing
        // a javascript force-selection method, also automatically select the cheapest shipping
        // method if more than one module is now enabled
        if (empty($_SESSION['shipping']) || $_SESSION['shipping'] && $_SESSION['shipping'] == false && zen_count_shipping_modules() > 1) {
            $_SESSION['shipping'] = $shipping->cheapest();
        }
        $breadcrumb->add(NAVBAR_TITLE_1, zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL'));
        $breadcrumb->add(NAVBAR_TITLE_2);
        $gBitSmarty->assign('shippingModules', TRUE);
        $gBitSmarty->assign('quotes', $quotes);
        $gBitSmarty->register_object('currencies', $currencies, array(), true, array('formatAddTax'));
        $gBitSmarty->assign('freeShipping', $free_shipping);
        $gBitSmarty->assign('sessionShippingId', $_SESSION['shipping']);
    }
}
print $gBitSmarty->fetch('bitpackage:bitcommerce/page_checkout_shipping.tpl');
开发者ID:bitweaver,项目名称:commerce,代码行数:31,代码来源:checkout_shipping.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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