当前位置: 首页>>代码示例>>PHP>>正文


PHP Cart66Common::getZones方法代码示例

本文整理汇总了PHP中Cart66Common::getZones方法的典型用法代码示例。如果您正苦于以下问题:PHP Cart66Common::getZones方法的具体用法?PHP Cart66Common::getZones怎么用?PHP Cart66Common::getZones使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Cart66Common的用法示例。


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

示例1: _e

">
        </li>

        <li>
          <label for="shipping-state_text" class="short shipping-state_label"><?php 
    _e('State', 'cart66');
    ?>
:</label>
          <input type="text" name="shipping[state_text]" value="<?php 
    Cart66Common::showValue($s['state']);
    ?>
" id="shipping-state_text" class="ajax-tax state_text_field" />
          <select id="shipping-state" class="ajax-tax shipping_countries required" title="State shipping address" name="shipping[state]">
            <option value="0">&nbsp;</option>              
            <?php 
    $zone = Cart66Common::getZones($shippingCountryCode);
    foreach ($zone as $code => $name) {
        $selected = $s['state'] == $code ? 'selected="selected"' : '';
        echo '<option value="' . $code . '" ' . $selected . '>' . $name . '</option>';
    }
    ?>
          </select>
        </li>

        <li>
          <label for="shipping-zip" class="shipping-zip_label"><?php 
    _e('Zip code', 'cart66');
    ?>
:</label>
          <input type="text" id="shipping-zip" name="shipping[zip]" value="<?php 
    Cart66Common::showValue($s['zip']);
开发者ID:arraysoftlab,项目名称:tracy-thedarkroom.com,代码行数:31,代码来源:shipping_address.php

示例2: ob_get_contents

include $checkoutFormFile;
$checkoutFormFileContents = ob_get_contents();
ob_end_clean();
echo Cart66Common::minifyMarkup($checkoutFormFileContents);
// Include the client side javascript validation
$same_as_billing = false;
if ($_SERVER['REQUEST_METHOD'] == 'GET' && Cart66Setting::getValue('sameAsBillingOff') != 1) {
    $same_as_billing = true;
} elseif (isset($_POST['sameAsBilling']) && $_POST['sameAsBilling'] == '1') {
    $same_as_billing = true;
}
$shipping_address_display = !$same_as_billing || $gatewayName == 'Cart66Mijireh' || $gatewayName == 'Cart662Checkout' ? 'block' : 'none';
$billing_country = '';
if (isset($b['country']) && !empty($b['country'])) {
    $billing_country = $b['country'];
    $shipping_country = isset($s['country']) ? $s['country'] : $b['country'];
}
if (Cart66Session::get('Cart66ShippingCountryCode')) {
    $billing_country = Cart66Session::get('Cart66ShippingCountryCode');
    $shipping_country = Cart66Session::get('Cart66ShippingCountryCode');
}
$error_field_names = array();
if (isset($jqErrors) && is_array($jqErrors)) {
    foreach ($jqErrors as $field_name) {
        $error_field_names[] = '#' . $field_name;
    }
}
$checkout_data = array('zones' => Cart66Common::getZones(), 'same_as_billing' => $same_as_billing, 'shipping_address_display' => $shipping_address_display, 'billing_country' => $billing_country, 'shipping_country' => $shipping_country, 'billing_state' => isset($b['state']) ? $b['state'] : '', 'shipping_state' => $s['state'], 'card_type' => isset($p['cardType']) ? $p['cardType'] : '', 'form_name' => '#' . $gatewayName . '_form', 'error_field_names' => $error_field_names, 'text_state' => __('State', 'cart66'), 'text_zip_code' => __('Zip code', 'cart66'), 'text_post_code' => __('Post code', 'cart66'), 'text_province' => __('Province', 'cart66'));
$path = CART66_URL . '/js/checkout.js';
wp_enqueue_script('checkout_js', $path, array('jquery'), false, true);
wp_localize_script('checkout_js', 'C66', $checkout_data);
开发者ID:rbredow,项目名称:allyzabbacart,代码行数:31,代码来源:checkout.php


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