コード例 #1
0
">
        </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']);
コード例 #2
0
ファイル: checkout.php プロジェクト: rbredow/allyzabbacart
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);