2015-12-08 12:45:18 +00:00
< div class = " wrap woocommerce " >
2015-12-11 14:11:12 +00:00
< h1 >< ? php _e ( 'Shipping Zones' , 'woocommerce' ); ?> </h1>
2015-12-08 12:45:18 +00:00
< p >< ? php _e ( 'Create shipping zones for all of the places you ship products to. Customers who enter a shipping address that isn\'t included in your shipping zones will receive a notice that there is no shipping available to their region.' , 'woocommerce' ); ?> <p>
< form >
2015-12-11 14:11:12 +00:00
< table class = " wc-shipping-zones widefat " >
2015-12-08 12:45:18 +00:00
< thead >
< tr >
< th class = " wc-shipping-zone-sort " >& nbsp ; </ th >
2015-12-11 14:11:12 +00:00
< th class = " wc-shipping-zone-name " >< ? php esc_html_e ( 'Zone Name' , 'woocommerce' ); ?> </th>
< th class = " wc-shipping-zone-region " >< ? php esc_html_e ( 'Region(s)' , 'woocommerce' ); ?> </th>
< th class = " wc-shipping-zone-methods " >< ? php esc_html_e ( 'Shipping Method(s)' , 'woocommerce' ); ?> </th>
2015-12-10 11:55:03 +00:00
< th class = " wc-shipping-zone-actions " >& nbsp ; </ th >
2015-12-08 12:45:18 +00:00
</ tr >
</ thead >
< tfoot >
< tr >
< td colspan = " 5 " >
2015-12-10 11:55:03 +00:00
< a class = " button button-secondary wc-shipping-zone-add " href = " # " >< ? php esc_html_e ( 'Add shipping zone' , 'woocommerce' ); ?> </a>
2015-12-10 17:47:14 +00:00
< input type = " submit " name = " save " class = " button button-primary wc-shipping-zone-save " value = " Save shipping zones " disabled />
2015-12-08 12:45:18 +00:00
</ td >
</ tr >
</ tfoot >
2015-12-10 17:27:25 +00:00
< tbody class = " wc-shipping-zone-rows " ></ tbody >
2015-12-08 12:45:18 +00:00
< tbody >
< tr >
< td width = " 1% " class = " wc-shipping-zone-worldwide " ></ td >
2015-12-15 16:35:33 +00:00
< td class = " wc-shipping-zone-name " >< a href = " <?php echo esc_url( admin_url( 'admin.php?page=wc-shipping&zone_id=0' ) ); ?> " >< ? php esc_html_e ( 'Worldwide' , 'woocommerce' ); ?> </a></td>
2015-12-08 12:45:18 +00:00
< td class = " wc-shipping-zone-region " >< ? php esc_html_e ( 'Shipping methods added here apply to all regions without a zone.' , 'woocommerce' ); ?> </td>
2015-12-15 16:35:33 +00:00
< td >& ndash ; </ td >
2015-12-15 17:54:51 +00:00
< td class = " wc-shipping-zone-actions " >< a class = " wc-shipping-zone-view tips " data - tip = " <?php _e( 'View Zone', 'woocommerce' ); ?> " href = " admin.php?page=wc-shipping&zone_id=0 " >< ? php _e ( 'View' , 'woocommerce' ); ?> </a></td>
2015-12-08 12:45:18 +00:00
</ tr >
</ tbody >
</ table >
</ form >
</ div >
2015-12-10 11:55:03 +00:00
< script type = " text/html " id = " tmpl-wc-shipping-zone-row " >
< tr data - id = " { { data.zone_id }} " >
< td width = " 1% " class = " wc-shipping-zone-sort " ></ td >
< td class = " wc-shipping-zone-name " >
2015-12-15 17:48:03 +00:00
< div class = " view " >< a href = " admin.php?page=wc-shipping&zone_id= { { data.zone_id }} " > {{ data . zone_name }} </ a ></ div >
2015-12-10 15:09:37 +00:00
< div class = " edit " >< input type = " text " name = " zone_name[ { { data.zone_id }}] " data - attribute = " zone_name " value = " { { data.zone_name }} " placeholder = " <?php esc_attr_e( 'Zone Name', 'woocommerce' ); ?> " /></ div >
2015-12-10 11:55:03 +00:00
</ td >
2015-12-10 15:09:37 +00:00
< td class = " wc-shipping-zone-region " >
2015-12-10 17:07:18 +00:00
< div class = " view " > {{ data . formatted_zone_location }} </ div >
2015-12-10 15:09:37 +00:00
< div class = " edit " >
< select multiple = " multiple " name = " zone_locations[ { { data.zone_id }}] " data - attribute = " zone_locations " data - placeholder = " <?php _e( 'Select regions within this zone', 'woocommerce' ); ?> " class = " wc-shipping-zone-region-select " >
< ? php
foreach ( $continents as $continent_code => $continent ) {
echo '<option value="continent:' . esc_attr ( $continent_code ) . '" alt="">' . esc_html ( $continent [ 'name' ] ) . '</option>' ;
$countries = array_intersect ( array_keys ( $allowed_countries ), $continent [ 'countries' ] );
foreach ( $countries as $country_code ) {
echo '<option value="country:' . esc_attr ( $country_code ) . '" alt="' . esc_attr ( $continent [ 'name' ] ) . '">' . esc_html ( ' ' . $allowed_countries [ $country_code ] ) . '</option>' ;
if ( $states = WC () -> countries -> get_states ( $country_code ) ) {
foreach ( $states as $state_code => $state_name ) {
echo '<option value="state:' . esc_attr ( $country_code . ':' . $state_code ) . '" alt="' . esc_attr ( $continent [ 'name' ] . ' ' . $allowed_countries [ $country_code ] ) . '">' . esc_html ( ' ' . $state_name ) . '</option>' ;
}
}
}
}
?>
</ select >
2015-12-10 18:33:59 +00:00
< a class = " wc-shipping-zone-postcodes-toggle " href = " # " >< ? php _e ( 'Limit to specific ZIP/postcodes' , 'woocommerce' ); ?> </a>
< div class = " wc-shipping-zone-postcodes " >
< textarea name = " zone_postcodes[ { { data.zone_id }}] " data - attribute = " zone_postcodes " placeholder = " <?php esc_attr_e( 'List 1 postcode per line', 'woocommerce' ); ?> " class = " input-text large-text " cols = " 25 " rows = " 5 " ></ textarea >
< span class = " description " >< ? php _e ( 'Wildcards and numerical ranges are supported too, for example, 90210-99000 and CB23*' , 'woocommerce' ) ?> </span>
</ div >
2015-12-10 15:09:37 +00:00
</ div >
</ td >
2015-12-11 14:11:12 +00:00
< td class = " wc-shipping-zone-methods " >
< ul ></ ul >
</ td >
2015-12-10 11:55:03 +00:00
< td class = " wc-shipping-zone-actions " >
2015-12-15 17:48:03 +00:00
< a class = " wc-shipping-zone-delete tips " data - tip = " <?php _e( 'Delete', 'woocommerce' ); ?> " href = " # " >< ? php _e ( 'Delete' , 'woocommerce' ); ?> </a><a class="wc-shipping-zone-edit tips" href="#" data-tip="<?php _e( 'Edit', 'woocommerce' ); ?>"><?php _e( 'Edit', 'woocommerce' ); ?></a><a class="wc-shipping-zone-view tips" data-tip="<?php _e( 'View Zone', 'woocommerce' ); ?>" href="admin.php?page=wc-shipping&zone_id={{ data.zone_id }}"><?php _e( 'View', 'woocommerce' ); ?></a>
2015-12-10 11:55:03 +00:00
</ td >
</ tr >
</ script >