2012-01-29 13:36:33 +00:00
|
|
|
<?php
|
|
|
|
/**
|
2012-08-14 18:05:45 +00:00
|
|
|
* Checkout shipping information form
|
|
|
|
*
|
|
|
|
* @author WooThemes
|
|
|
|
* @package WooCommerce/Templates
|
|
|
|
* @version 1.6.4
|
2012-01-29 13:36:33 +00:00
|
|
|
*/
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2012-10-15 10:57:58 +00:00
|
|
|
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
|
|
|
|
|
2012-01-29 13:36:33 +00:00
|
|
|
global $woocommerce;
|
|
|
|
?>
|
2012-04-21 18:30:37 +00:00
|
|
|
|
2013-08-02 15:54:28 +00:00
|
|
|
<?php if ( $woocommerce->cart->needs_shipping() && ! $woocommerce->cart->ship_to_billing_address_only() ) : ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
|
|
|
<?php
|
2013-05-28 13:19:08 +00:00
|
|
|
if ( empty( $_POST ) ) {
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2013-05-28 13:19:08 +00:00
|
|
|
$ship_to_different_address = get_option( 'woocommerce_ship_to_billing' ) == 'no' ? 1 : 0;
|
|
|
|
$ship_to_different_address = apply_filters( 'woocommerce_ship_to_different_address_checked', $ship_to_different_address );
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2013-05-28 13:19:08 +00:00
|
|
|
} else {
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2013-05-28 13:19:08 +00:00
|
|
|
$ship_to_different_address = $checkout->get_value( 'ship_to_different_address' );
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2013-05-28 13:19:08 +00:00
|
|
|
}
|
2012-01-29 13:36:33 +00:00
|
|
|
?>
|
|
|
|
|
2013-05-28 13:19:08 +00:00
|
|
|
<h3 id="ship-to-different-address">
|
|
|
|
<label for="ship-to-different-address-checkbox" class="checkbox"><?php _e( 'Ship to a different address?', 'woocommerce' ); ?></label>
|
|
|
|
<input id="ship-to-different-address-checkbox" class="input-checkbox" <?php checked( $ship_to_different_address, 1 ); ?> type="checkbox" name="ship_to_different_address" value="1" />
|
|
|
|
</h3>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2012-01-29 13:36:33 +00:00
|
|
|
<div class="shipping_address">
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2012-02-03 16:17:35 +00:00
|
|
|
<?php do_action('woocommerce_before_checkout_shipping_form', $checkout); ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2012-02-03 16:17:35 +00:00
|
|
|
<?php foreach ($checkout->checkout_fields['shipping'] as $key => $field) : ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2013-11-25 13:53:18 +00:00
|
|
|
<?php wc_form_field( $key, $field, $checkout->get_value( $key ) ); ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2012-01-29 13:36:33 +00:00
|
|
|
<?php endforeach; ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2012-02-03 16:17:35 +00:00
|
|
|
<?php do_action('woocommerce_after_checkout_shipping_form', $checkout); ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2012-01-29 13:36:33 +00:00
|
|
|
</div>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2012-01-29 13:36:33 +00:00
|
|
|
<?php endif; ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2013-06-05 10:13:36 +00:00
|
|
|
<?php do_action( 'woocommerce_before_order_notes', $checkout ); ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2013-06-05 10:13:36 +00:00
|
|
|
<?php if ( apply_filters( 'woocommerce_enable_order_notes_field', get_option( 'woocommerce_enable_order_comments', 'yes' ) == 'yes' ) ) : ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2013-07-11 15:11:28 +00:00
|
|
|
<?php if ( ! $woocommerce->cart->needs_shipping() || $woocommerce->cart->ship_to_billing_address_only() ) : ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2012-10-16 09:45:33 +00:00
|
|
|
<h3><?php _e( 'Additional Information', 'woocommerce' ); ?></h3>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2012-01-29 13:36:33 +00:00
|
|
|
<?php endif; ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2013-06-05 10:13:36 +00:00
|
|
|
<?php foreach ( $checkout->checkout_fields['order'] as $key => $field ) : ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2013-11-25 13:53:18 +00:00
|
|
|
<?php wc_form_field( $key, $field, $checkout->get_value( $key ) ); ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2012-01-29 13:36:33 +00:00
|
|
|
<?php endforeach; ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2012-01-29 13:36:33 +00:00
|
|
|
<?php endif; ?>
|
2012-08-14 18:05:45 +00:00
|
|
|
|
2013-06-05 10:13:36 +00:00
|
|
|
<?php do_action( 'woocommerce_after_order_notes', $checkout ); ?>
|