address_select.php 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. <?php
  2. /**
  3. * FecShop file.
  4. *
  5. * @link http://www.fecshop.com/
  6. * @copyright Copyright (c) 2016 FecShop Software LLC
  7. * @license http://www.fecshop.com/license/
  8. */
  9. ?>
  10. <?php $address_list = $parentThis['address_list']; ?>
  11. <?php $cart_address_id = $parentThis['cart_address_id']; ?>
  12. <?php $country_select = $parentThis['country_select']; ?>
  13. <?php $state_html = $parentThis['state_html']; ?>
  14. <?php $cart_address = $parentThis['cart_address']; ?>
  15. <div id="billing_address">
  16. <ul>
  17. <li>
  18. <p class="onestepcheckout-numbers onestepcheckout-numbers-1"><?= Yii::$service->page->translate->__('Shipping Address');?></p>
  19. </li>
  20. <li>
  21. <div>
  22. <select name="address_id" class="address_list">
  23. <?php if(is_array($address_list) && !empty($address_list)): ?>
  24. <?php foreach($address_list as $address_id => $info): ?>
  25. <?php if($cart_address_id == $address_id ):
  26. $str = 'selected="true;"';
  27. else:
  28. $str = '';
  29. endif;
  30. ?>
  31. <option <?= $str ?> value="<?= $address_id ?>"><?= $info['address'] ?></option>
  32. <?php endforeach; ?>
  33. <?php endif; ?>
  34. <option value=""> <?= Yii::$service->page->translate->__('New Address');?> </option>
  35. </select>
  36. <ul id="billing_address_list" class="billing_address_list_new" style="display:none;">
  37. <li class="clearfix">
  38. <div class="input-box input-firstname">
  39. <label for="billing:firstname"><?= Yii::$service->page->translate->__('First Name');?><span class="required">*</span></label>
  40. <input value="<?= $cart_address['first_name'] ?>" id="billing:firstname" name="billing[first_name]" class="required-entry input-text" type="text">
  41. </div>
  42. <div class="input-box input-lastname">
  43. <label for="billing:lastname"><?= Yii::$service->page->translate->__('Last Name');?> <span class="required">*</span></label>
  44. <input value="<?= $cart_address['last_name'] ?>" id="billing:lastname" name="billing[last_name]" class="required-entry input-text" type="text">
  45. </div>
  46. <div class="clear"></div>
  47. </li>
  48. <li class="clearfix">
  49. <div class=" input-box input-email">
  50. <label for="billing:email"><?= Yii::$service->page->translate->__('Email Address');?> <span class="required">*</span></label>
  51. <input value="<?= $cart_address['email'] ?>" class="validate-email required-entry input-text" title="Email Address" id="billing:email" name="billing[email]" type="text">
  52. <div class="customer_email_validation">
  53. </div>
  54. </div>
  55. </li>
  56. <li>
  57. <div class="input-box input-telephone">
  58. <label for="billing:telephone"><?= Yii::$service->page->translate->__('Telephone');?> <span class="required">*</span></label>
  59. <input value="<?= $cart_address['telephone'] ?>" id="billing:telephone" class="required-entry input-text" title="Telephone" name="billing[telephone]" type="text">
  60. </div>
  61. </li>
  62. <li class="clearfix">
  63. <div class="input-box input-address">
  64. <label for="billing:street1"><?= Yii::$service->page->translate->__('Street');?><span class="required">*</span></label>
  65. <input value="<?= $cart_address['street1'] ?>" class="required-entry input-text onestepcheckout-address-line" id="billing:street1" name="billing[street1]" title="Street Address 1" type="text">
  66. <input value="<?= $cart_address['street2'] ?>" class="input-text onestepcheckout-address-line" id="billing:street2" name="billing[street2]" title="Street Address 2" type="text">
  67. </div>
  68. </li>
  69. <li class="clearfix">
  70. <div class="input-box input-country">
  71. <label for="billing:country"><?= Yii::$service->page->translate->__('Country');?> <span class="required">*</span></label>
  72. <select title="Country" class="billing_country validate-select" id="billing:country" name="billing[country]">
  73. <?= $country_select ?>
  74. </select>
  75. </div>
  76. </li>
  77. <li class="clearfix">
  78. <div class="input-box input-state"><label for="billing:state" class="required"><?= Yii::$service->page->translate->__('State');?> <span class="required">*</span></label>
  79. <div class="state_html">
  80. <?= $state_html ?>
  81. </div>
  82. </div>
  83. </li>
  84. <li class="clearfix">
  85. <div class="input-box input-city">
  86. <label for="billing:city"><?= Yii::$service->page->translate->__('City');?> <span class="required">*</span></label>
  87. <input value="<?= $cart_address['city'] ?>" id="billing:city" class="required-entry input-text" title="City" name="billing[city]" type="text">
  88. </div>
  89. </li>
  90. <li class="clearfix">
  91. <div class="input-box input-zip">
  92. <label for="billing:zip"><?= Yii::$service->page->translate->__('Zip Code');?> <span class="required">*</span></label>
  93. <input value="<?= $cart_address['zip'] ?>" class="validate-zip-international required-entry input-text" id="billing:zip" name="billing[zip]" title="Zip Code" type="text">
  94. </div>
  95. </li>
  96. </ul>
  97. </div>
  98. </li>
  99. </ul>
  100. </div>