/checkout/form-billing.php

  1. <?php 
  2. /** 
  3. * Checkout billing information form 
  4. * 
  5. * @author WooThemes 
  6. * @package WooCommerce/Templates 
  7. * @version 2.0.0 
  8. */ 
  9.  
  10. if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly 
  11.  
  12. global $woocommerce; 
  13. ?> 
  14. <?php if ( $woocommerce->cart->ship_to_billing_address_only() && $woocommerce->cart->needs_shipping() ) : ?> 
  15.  
  16. <h3><?php _e( 'Billing & Shipping', 'woocommerce' ); ?></h3> 
  17.  
  18. <?php else : ?> 
  19.  
  20. <h3><?php _e( 'Billing Address', 'woocommerce' ); ?></h3> 
  21.  
  22. <?php endif; ?> 
  23.  
  24. <?php do_action('woocommerce_before_checkout_billing_form', $checkout ); ?> 
  25.  
  26. <?php /**foreach ($checkout->checkout_fields['billing'] as $key => $field) : ?> 
  27.   
  28. <?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?> 
  29.   
  30. <?php endforeach;*/ 
  31. /** 
  32. *  
  33. * */?> 
  34. <p class="form-row form-row-wide address-field update_totals_on_change validate-required woocommerce-validated" id="billing_country_field" style="display: none;"> 
  35. <label for="billing_country" class="">**** <abbr class="required" title="*****">*</abbr></label> 
  36. <!--<select name="billing_country" id="billing_country" class="country_to_state country_select chzn-done" style="display: none; "> 
  37. <option value="IR" selected="selected">*****</option> 
  38. </select>--> 
  39. </p> 
  40.  
  41. <p class="form-row form-row-first validate-required" id="billing_first_name_field"><label for="billing_first_name" class="">*** <abbr class="required" title="*****">*</abbr></label><input type="text" class="input-text" name="billing_first_name" id="billing_first_name" placeholder="" value="<?php echo $checkout->get_value( 'billing_first_name' ) ?>"/> 
  42. </p> 
  43.  
  44. <p class="form-row form-row-last validate-required woocommerce-invalid woocommerce-invalid-required-field" id="billing_last_name_field"><label for="billing_last_name" class="">*** ******** <abbr class="required" title="*****">*</abbr></label><input type="text" class="input-text" name="billing_last_name" id="billing_last_name" placeholder="" value="<?php echo $checkout->get_value( 'billing_last_name' ) ?>"> 
  45. </p><div class="clear"></div> 
  46.  
  47. <p class="form-row form-row-wide" id="billing_company_field"><label for="billing_company" class="">*** ****</label><input type="text" class="input-text" name="billing_company" id="billing_company" placeholder="" value="<?php echo $checkout->get_value( 'billing_company' ) ?>"> 
  48. </p> 
  49.  
  50. <style> 
  51. select{font:12px tahoma; padding: 2px 1px;} 
  52. </style> 
  53.  
  54. <input type="hidden" name="billing_state" id="billing_state" value="<?php echo $woocommerce->customer->get_shipping_state(); ?>" /> 
  55. <input type="hidden" name="billing_city" id="billing_city" value="<?php echo $woocommerce->customer->get_shipping_city() ?>" /> 
  56.  
  57.  
  58. <p class="form-row form-row-wide validate-required" id="billing_address_1_field"><label for="billing_address_1" class="">**** <abbr class="required" title="*****">*</abbr></label><input type="text" class="input-text" name="billing_address_1" id="billing_address_1" placeholder="******" value="<?php echo $checkout->get_value( 'billing_address_1' ) ?>" autocomplete="no"> 
  59. </p> 
  60.  
  61. <p class="form-row form-row-wide" id="billing_address_2_field"><input type="text" class="input-text" name="billing_address_2" id="billing_address_2" placeholder="***** ***** ***** **** " value="<?php echo $checkout->get_value( 'billing_address_2' ) ?>" autocomplete="no"> 
  62. </p> 
  63.  
  64.  
  65.  
  66.  
  67.  
  68. <p class="form-row form-row-wide validate-required" id="billing_postcode_field" data-o_class="form-row form-row-wide address-field validate-required"><label for="billing_postcode" class="">** **** <abbr class="required" title="*****">*</abbr></label><input type="text" class="input-text" name="billing_postcode" id="billing_postcode" placeholder="******" value="<?php echo $checkout->get_value( 'billing_postcode' ) ?>" autocomplete="no"> 
  69. </p> 
  70.  
  71. <div class="clear"></div> 
  72.  
  73. <p class="form-row form-row-first validate-required validate-email" id="billing_email_field"><label for="billing_email" class="">**** ***** <abbr class="required" title="*****">*</abbr></label><input type="text" class="input-text" name="billing_email" id="billing_email" placeholder="" value="<?php echo $checkout->get_value( 'billing_email' ) ?>"> 
  74. </p> 
  75.  
  76. <p class="form-row form-row-last validate-required" id="billing_phone_field"><label for="billing_phone" class="">**** <abbr class="required" title="*****">*</abbr></label><input type="text" class="input-text" name="billing_phone" id="billing_phone" placeholder="" value="<?php echo $checkout->get_value( 'billing_phone' ) ?>"> 
  77. </p><div class="clear"></div> 
  78.  
  79. <?php 
  80. /** 
  81. *  
  82. * */ 
  83. ?> 
  84.  
  85.  
  86. <?php do_action('woocommerce_after_checkout_billing_form', $checkout ); ?> 
  87.  
  88.  
  89.  
  90. <?php if ( ! is_user_logged_in() && $checkout->enable_signup ) : ?> 
  91.  
  92. <?php if ( $checkout->enable_guest_checkout ) : ?> 
  93.  
  94. <p class="form-row form-row-wide"> 
  95. <input class="input-checkbox" id="createaccount" <?php checked($checkout->get_value('createaccount'), true) ?> type="checkbox" name="createaccount" value="1" /> <label for="createaccount" class="checkbox"><?php _e( 'Create an account?', 'woocommerce' ); ?></label> 
  96. </p> 
  97.  
  98. <?php endif; ?> 
  99.  
  100. <?php do_action( 'woocommerce_before_checkout_registration_form', $checkout ); ?> 
  101.  
  102. <div class="create-account"> 
  103.  
  104. <p><?php _e( 'Create an account by entering the information below. If you are a returning customer please login at the top of the page.', 'woocommerce' ); ?></p> 
  105.  
  106. <?php foreach ($checkout->checkout_fields['account'] as $key => $field) : ?> 
  107.  
  108. <?php woocommerce_form_field( $key, $field, $checkout->get_value( $key ) ); ?> 
  109.  
  110. <?php endforeach; ?> 
  111.  
  112. <div class="clear"></div> 
  113.  
  114. </div> 
  115.  
  116. <?php do_action( 'woocommerce_after_checkout_registration_form', $checkout ); ?> 
  117.  
  118. <?php endif; ?> 
.