2012-01-29 13:36:33 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Checkout Shipping Information Form
|
|
|
|
*/
|
|
|
|
global $woocommerce;
|
|
|
|
?>
|
|
|
|
|
|
|
|
<?php if ($woocommerce->cart->needs_shipping() && !$woocommerce->cart->ship_to_billing_address_only()) : ?>
|
|
|
|
|
|
|
|
<?php
|
|
|
|
if (!isset($_POST) || !$_POST) :
|
|
|
|
|
|
|
|
$shiptobilling = (get_option('woocommerce_ship_to_same_address')=='yes') ? 1 : 0;
|
|
|
|
$shiptobilling = apply_filters('woocommerce_shiptobilling_default', $shiptobilling);
|
|
|
|
|
|
|
|
else :
|
|
|
|
|
2012-02-03 16:17:35 +00:00
|
|
|
$shiptobilling = $checkout->get_value('shiptobilling');
|
2012-01-29 13:36:33 +00:00
|
|
|
|
|
|
|
endif;
|
|
|
|
?>
|
|
|
|
|
|
|
|
<p class="form-row" id="shiptobilling">
|
2012-03-01 13:12:56 +00:00
|
|
|
<input id="shiptobilling-checkbox" class="input-checkbox" <?php checked($shiptobilling, 1); ?> type="checkbox" name="shiptobilling" value="1" />
|
|
|
|
<label for="shiptobilling-checkbox" class="checkbox"><?php _e('Ship to same address?', 'woocommerce'); ?></label>
|
2012-01-29 13:36:33 +00:00
|
|
|
</p>
|
|
|
|
|
|
|
|
<h3><?php _e('Shipping Address', 'woocommerce'); ?></h3>
|
|
|
|
|
|
|
|
<div class="shipping_address">
|
|
|
|
|
2012-02-03 16:17:35 +00:00
|
|
|
<?php do_action('woocommerce_before_checkout_shipping_form', $checkout); ?>
|
2012-01-29 13:36:33 +00:00
|
|
|
|
2012-02-03 16:17:35 +00:00
|
|
|
<?php foreach ($checkout->checkout_fields['shipping'] as $key => $field) : ?>
|
2012-01-29 13:36:33 +00:00
|
|
|
|
2012-02-03 16:17:35 +00:00
|
|
|
<?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?>
|
2012-01-29 13:36:33 +00:00
|
|
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
2012-02-03 16:17:35 +00:00
|
|
|
<?php do_action('woocommerce_after_checkout_shipping_form', $checkout); ?>
|
2012-01-29 13:36:33 +00:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
2012-02-03 16:17:35 +00:00
|
|
|
<?php do_action('woocommerce_before_order_notes', $checkout); ?>
|
2012-01-29 13:36:33 +00:00
|
|
|
|
|
|
|
<?php if (get_option('woocommerce_enable_order_comments')!='no') : ?>
|
|
|
|
|
|
|
|
<?php if ($woocommerce->cart->ship_to_billing_address_only()) : ?>
|
|
|
|
|
|
|
|
<h3><?php _e('Additional Information', 'woocommerce'); ?></h3>
|
|
|
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
2012-02-03 16:17:35 +00:00
|
|
|
<?php foreach ($checkout->checkout_fields['order'] as $key => $field) : ?>
|
2012-01-29 13:36:33 +00:00
|
|
|
|
2012-02-03 16:17:35 +00:00
|
|
|
<?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?>
|
2012-01-29 13:36:33 +00:00
|
|
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
2012-02-03 16:17:35 +00:00
|
|
|
<?php do_action('woocommerce_after_order_notes', $checkout); ?>
|