Version Notes
First release of extention
Download this release
Release Info
| Developer | Magento Core Team |
| Extension | Amar_Address |
| Version | 0.1.1 |
| Comparing to | |
| See all releases | |
Code changes from version 0.1.0 to 0.1.1
- app/design/frontend/default/default/layout/address.xml +21 -0
- app/design/frontend/default/default/template/address/checkout/onepage/billing.phtml +188 -0
- app/design/frontend/default/default/template/address/checkout/onepage/shipping.phtml +136 -0
- app/design/frontend/default/default/template/address/customer/address/edit.phtml +163 -0
- app/design/frontend/default/default/template/address/persistent/checkout/onepage/billing.phtml +224 -0
- app/design/frontend/default/default/template/address/persistent/customer/form/register.phtml +164 -0
- package.xml +4 -4
app/design/frontend/default/default/layout/address.xml
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<layout version="0.1.0">
|
| 3 |
+
<customer_account_create>
|
| 4 |
+
<reference name='customer_form_register'>
|
| 5 |
+
<action method='setTemplate'><template>address/persistent/customer/form/register.phtml</template></action>
|
| 6 |
+
</reference>
|
| 7 |
+
</customer_account_create>
|
| 8 |
+
<customer_address_form>
|
| 9 |
+
<reference name='customer_address_edit'>
|
| 10 |
+
<action method='setTemplate'><template>address/customer/address/edit.phtml</template></action>
|
| 11 |
+
</reference>
|
| 12 |
+
</customer_address_form>
|
| 13 |
+
<checkout_onepage_index>
|
| 14 |
+
<reference name='checkout.onepage.billing'>
|
| 15 |
+
<action method='setTemplate'><template>address/checkout/onepage/billing.phtml</template></action>
|
| 16 |
+
</reference>
|
| 17 |
+
<reference name='checkout.onepage.shipping'>
|
| 18 |
+
<action method='setTemplate'><template>address/checkout/onepage/shipping.phtml</template></action>
|
| 19 |
+
</reference>
|
| 20 |
+
</checkout_onepage_index>
|
| 21 |
+
</layout>
|
app/design/frontend/default/default/template/address/checkout/onepage/billing.phtml
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<form id="co-billing-form" action="">
|
| 2 |
+
<fieldset>
|
| 3 |
+
<ul class="form-list">
|
| 4 |
+
<?php if ($this->customerHasAddresses()): ?>
|
| 5 |
+
<li class="wide">
|
| 6 |
+
<label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
|
| 7 |
+
<div class="input-box">
|
| 8 |
+
<?php echo $this->getAddressesHtmlSelect('billing') ?>
|
| 9 |
+
</div>
|
| 10 |
+
</li>
|
| 11 |
+
<?php endif; ?>
|
| 12 |
+
<li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
|
| 13 |
+
<fieldset>
|
| 14 |
+
<input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
|
| 15 |
+
<ul>
|
| 16 |
+
<li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li>
|
| 17 |
+
<li class="fields">
|
| 18 |
+
<div class="field">
|
| 19 |
+
<label for="billing:company"><?php echo $this->__('Company') ?></label>
|
| 20 |
+
<div class="input-box">
|
| 21 |
+
<input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->htmlEscape($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
|
| 22 |
+
</div>
|
| 23 |
+
</div>
|
| 24 |
+
<?php if(!$this->isCustomerLoggedIn()): ?>
|
| 25 |
+
<div class="field">
|
| 26 |
+
<label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
| 27 |
+
<div class="input-box">
|
| 28 |
+
<input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->htmlEscape($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
|
| 29 |
+
</div>
|
| 30 |
+
</div>
|
| 31 |
+
<?php endif ?>
|
| 32 |
+
</li>
|
| 33 |
+
<li class="wide">
|
| 34 |
+
<label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
|
| 35 |
+
<div class="input-box">
|
| 36 |
+
<input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(1)) ?>" class="input-text required-entry" />
|
| 37 |
+
</div>
|
| 38 |
+
</li>
|
| 39 |
+
<?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
|
| 40 |
+
<li class="wide">
|
| 41 |
+
<div class="input-box">
|
| 42 |
+
<input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i?>" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet($_i)) ?>" class="input-text" />
|
| 43 |
+
</div>
|
| 44 |
+
</li>
|
| 45 |
+
<?php endfor ?>
|
| 46 |
+
<li class="fields">
|
| 47 |
+
<div class="field">
|
| 48 |
+
<label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
| 49 |
+
<div class="input-box">
|
| 50 |
+
<input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->htmlEscape($this->getAddress()->getCity()) ?>" class="input-text required-entry" id="billing:city" />
|
| 51 |
+
</div>
|
| 52 |
+
</div>
|
| 53 |
+
<div class="field">
|
| 54 |
+
<label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
| 55 |
+
<div class="input-box">
|
| 56 |
+
<select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
| 57 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
| 58 |
+
</select>
|
| 59 |
+
<script type="text/javascript">
|
| 60 |
+
//<![CDATA[
|
| 61 |
+
$('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
|
| 62 |
+
//]]>
|
| 63 |
+
</script>
|
| 64 |
+
<input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->htmlEscape($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
|
| 65 |
+
</div>
|
| 66 |
+
</div>
|
| 67 |
+
</li>
|
| 68 |
+
<li class="fields">
|
| 69 |
+
<div class="field">
|
| 70 |
+
<label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
| 71 |
+
<div class="input-box">
|
| 72 |
+
<input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->htmlEscape($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international required-entry" />
|
| 73 |
+
</div>
|
| 74 |
+
</div>
|
| 75 |
+
<div class="field">
|
| 76 |
+
<label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
| 77 |
+
<div class="input-box">
|
| 78 |
+
<?php echo $this->getCountryHtmlSelect('billing') ?>
|
| 79 |
+
</div>
|
| 80 |
+
</div>
|
| 81 |
+
</li>
|
| 82 |
+
<li class="fields">
|
| 83 |
+
<div class="field">
|
| 84 |
+
<label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
| 85 |
+
<div class="input-box">
|
| 86 |
+
<input type="text" name="billing[telephone]" value="<?php echo $this->htmlEscape($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" id="billing:telephone" />
|
| 87 |
+
</div>
|
| 88 |
+
</div>
|
| 89 |
+
<div class="field">
|
| 90 |
+
<label for="billing:fax"><?php echo $this->__('Fax') ?></label>
|
| 91 |
+
<div class="input-box">
|
| 92 |
+
<input type="text" name="billing[fax]" value="<?php echo $this->htmlEscape($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text" id="billing:fax" />
|
| 93 |
+
</div>
|
| 94 |
+
</div>
|
| 95 |
+
</li>
|
| 96 |
+
<li class="fields">
|
| 97 |
+
<div class="field">
|
| 98 |
+
<label for="govt_id" class="required"><em>*</em><?php echo $this->__('Govt ID#') ?></label>
|
| 99 |
+
<div class="input-box">
|
| 100 |
+
<input type="text" name="billing[govt_id]" value="<?php echo $this->htmlEscape($this->getAddress()->getGovtId()) ?>" title="<?php echo $this->__('Govt ID#') ?>" id="billing:govt_id" class="input-text required-entry" />
|
| 101 |
+
</div>
|
| 102 |
+
</div>
|
| 103 |
+
</li>
|
| 104 |
+
|
| 105 |
+
|
| 106 |
+
<?php if(!$this->isCustomerLoggedIn()): ?>
|
| 107 |
+
|
| 108 |
+
<?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
|
| 109 |
+
<?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
|
| 110 |
+
<?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
|
| 111 |
+
<li class="fields">
|
| 112 |
+
<?php if ($_dob->isEnabled()): ?>
|
| 113 |
+
<div class="field">
|
| 114 |
+
<?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
| 115 |
+
</div>
|
| 116 |
+
<?php endif; ?>
|
| 117 |
+
<?php if ($_gender->isEnabled()): ?>
|
| 118 |
+
<div class="field">
|
| 119 |
+
<?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
| 120 |
+
</div>
|
| 121 |
+
<?php endif ?>
|
| 122 |
+
</li>
|
| 123 |
+
<?php endif ?>
|
| 124 |
+
|
| 125 |
+
<?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
|
| 126 |
+
<?php if ($_taxvat->isEnabled()): ?>
|
| 127 |
+
<li>
|
| 128 |
+
<?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
| 129 |
+
</li>
|
| 130 |
+
<?php endif ?>
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
<li class="fields" id="register-customer-password">
|
| 134 |
+
<div class="field">
|
| 135 |
+
<label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
| 136 |
+
<div class="input-box">
|
| 137 |
+
<input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
|
| 138 |
+
</div>
|
| 139 |
+
</div>
|
| 140 |
+
<div class="field">
|
| 141 |
+
<label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
|
| 142 |
+
<div class="input-box">
|
| 143 |
+
<input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
|
| 144 |
+
</div>
|
| 145 |
+
</div>
|
| 146 |
+
</li>
|
| 147 |
+
<?php endif; ?>
|
| 148 |
+
<?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
|
| 149 |
+
<li class="control">
|
| 150 |
+
<input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="billing:save_in_address_book" onchange="if(window.shipping) shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
|
| 151 |
+
</li>
|
| 152 |
+
<?php else:?>
|
| 153 |
+
<li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
|
| 154 |
+
<?php endif; ?>
|
| 155 |
+
</ul>
|
| 156 |
+
</fieldset>
|
| 157 |
+
</li>
|
| 158 |
+
<?php if ($this->canShip()): ?>
|
| 159 |
+
<li class="control">
|
| 160 |
+
<input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to this address') ?></label></li>
|
| 161 |
+
<li class="control">
|
| 162 |
+
<input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to different address') ?>" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /><label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label>
|
| 163 |
+
</li>
|
| 164 |
+
<?php endif; ?>
|
| 165 |
+
</ul>
|
| 166 |
+
<?php if (!$this->canShip()): ?>
|
| 167 |
+
<input type="hidden" name="billing[use_for_shipping]" value="1" />
|
| 168 |
+
<?php endif; ?>
|
| 169 |
+
<div class="buttons-set" id="billing-buttons-container">
|
| 170 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
| 171 |
+
<button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
|
| 172 |
+
<span class="please-wait" id="billing-please-wait" style="display:none;">
|
| 173 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
|
| 174 |
+
</span>
|
| 175 |
+
</div>
|
| 176 |
+
</fieldset>
|
| 177 |
+
</form>
|
| 178 |
+
<script type="text/javascript">
|
| 179 |
+
//<![CDATA[
|
| 180 |
+
var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
|
| 181 |
+
var billingForm = new VarienForm('co-billing-form');
|
| 182 |
+
|
| 183 |
+
//billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
|
| 184 |
+
$('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
|
| 185 |
+
|
| 186 |
+
var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', countryRegions, undefined, 'billing:postcode');
|
| 187 |
+
//]]>
|
| 188 |
+
</script>
|
app/design/frontend/default/default/template/address/checkout/onepage/shipping.phtml
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<form action="" id="co-shipping-form">
|
| 2 |
+
<ul class="form-list">
|
| 3 |
+
<?php if ($this->customerHasAddresses()): ?>
|
| 4 |
+
<li class="wide">
|
| 5 |
+
<label for="shipping-address-select"><?php echo $this->__('Select a shipping address from your address book or enter a new address.') ?></label>
|
| 6 |
+
<div class="input-box">
|
| 7 |
+
<?php echo $this->getAddressesHtmlSelect('shipping') ?>
|
| 8 |
+
</div>
|
| 9 |
+
</li>
|
| 10 |
+
<?php endif ?>
|
| 11 |
+
<li id="shipping-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif ?>>
|
| 12 |
+
<fieldset>
|
| 13 |
+
<input type="hidden" name="shipping[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="shipping:address_id" />
|
| 14 |
+
<ul>
|
| 15 |
+
<li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress())->setFieldIdFormat('shipping:%s')->setFieldNameFormat('shipping[%s]')->setFieldParams('onchange="shipping.setSameAsBilling(false)"')->toHtml() ?></li>
|
| 16 |
+
<li class="fields">
|
| 17 |
+
<div class="fields">
|
| 18 |
+
<label for="shipping:company"><?php echo $this->__('Company') ?></label>
|
| 19 |
+
<div class="input-box">
|
| 20 |
+
<input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->htmlEscape($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" onchange="shipping.setSameAsBilling(false);" />
|
| 21 |
+
</div>
|
| 22 |
+
</div>
|
| 23 |
+
<?php if(false): ?>
|
| 24 |
+
<div class="fields">
|
| 25 |
+
<label for="shipping:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
| 26 |
+
<div class="input-box">
|
| 27 |
+
<input type="text" name="shipping[email]" id="shipping:email" value="<?php echo $this->htmlEscape($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
|
| 28 |
+
</div>
|
| 29 |
+
</div>
|
| 30 |
+
<?php endif ?>
|
| 31 |
+
</li>
|
| 32 |
+
<li class="wide">
|
| 33 |
+
<label for="shipping:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
|
| 34 |
+
<div class="input-box">
|
| 35 |
+
<input type="text" title="<?php echo $this->__('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(1)) ?>" class="input-text required-entry" onchange="shipping.setSameAsBilling(false);" />
|
| 36 |
+
</div>
|
| 37 |
+
</li>
|
| 38 |
+
<?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
|
| 39 |
+
<li class="wide">
|
| 40 |
+
<div class="input-box">
|
| 41 |
+
<input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="shipping[street][]" id="shipping:street<?php echo $_i?>" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet($_i)) ?>" class="input-text" onchange="shipping.setSameAsBilling(false);" />
|
| 42 |
+
</div>
|
| 43 |
+
</li>
|
| 44 |
+
<?php endfor ?>
|
| 45 |
+
<li class="fields">
|
| 46 |
+
<div class="field">
|
| 47 |
+
<label for="shipping:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
| 48 |
+
<div class="input-box">
|
| 49 |
+
<input type="text" title="<?php echo $this->__('City') ?>" name="shipping[city]" value="<?php echo $this->htmlEscape($this->getAddress()->getCity()) ?>" class="input-text required-entry" id="shipping:city" onchange="shipping.setSameAsBilling(false);" />
|
| 50 |
+
</div>
|
| 51 |
+
</div>
|
| 52 |
+
<div class="field">
|
| 53 |
+
<label for="shipping:region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
| 54 |
+
<div class="input-box">
|
| 55 |
+
<select id="shipping:region_id" name="shipping[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
| 56 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
| 57 |
+
</select>
|
| 58 |
+
<script type="text/javascript">
|
| 59 |
+
//<![CDATA[
|
| 60 |
+
$('shipping:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
|
| 61 |
+
//]]>
|
| 62 |
+
</script>
|
| 63 |
+
<input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->htmlEscape($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
|
| 64 |
+
</div>
|
| 65 |
+
</div>
|
| 66 |
+
</li>
|
| 67 |
+
<li class="fields">
|
| 68 |
+
<div class="field">
|
| 69 |
+
<label for="shipping:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
| 70 |
+
<div class="input-box">
|
| 71 |
+
<input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->htmlEscape($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international required-entry" onchange="shipping.setSameAsBilling(false);" />
|
| 72 |
+
</div>
|
| 73 |
+
</div>
|
| 74 |
+
<div class="field">
|
| 75 |
+
<label for="shipping:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
| 76 |
+
<div class="input-box">
|
| 77 |
+
<?php echo $this->getCountryHtmlSelect('shipping') ?>
|
| 78 |
+
</div>
|
| 79 |
+
</div>
|
| 80 |
+
</li>
|
| 81 |
+
<li class="fields">
|
| 82 |
+
<div class="field">
|
| 83 |
+
<label for="shipping:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
| 84 |
+
<div class="input-box">
|
| 85 |
+
<input type="text" name="shipping[telephone]" value="<?php echo $this->htmlEscape($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" id="shipping:telephone" onchange="shipping.setSameAsBilling(false);" />
|
| 86 |
+
</div>
|
| 87 |
+
</div>
|
| 88 |
+
<div class="field">
|
| 89 |
+
<label for="shipping:fax"><?php echo $this->__('Fax') ?></label>
|
| 90 |
+
<div class="input-box">
|
| 91 |
+
<input type="text" name="shipping[fax]" value="<?php echo $this->htmlEscape($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text" id="shipping:fax" onchange="shipping.setSameAsBilling(false);" />
|
| 92 |
+
</div>
|
| 93 |
+
</div>
|
| 94 |
+
</li>
|
| 95 |
+
<li class="fields">
|
| 96 |
+
<div class="field">
|
| 97 |
+
<label for="govt_id" class="required"><em>*</em><?php echo $this->__('Govt ID#') ?></label>
|
| 98 |
+
<div class="input-box">
|
| 99 |
+
<input type="text" name="shipping[govt_id]" value="<?php echo $this->htmlEscape($this->getAddress()->getGovtId()) ?>" title="<?php echo $this->__('Govt ID#') ?>" id="shipping:govt_id" class="input-text required-entry" />
|
| 100 |
+
</div>
|
| 101 |
+
</div>
|
| 102 |
+
</li>
|
| 103 |
+
<?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
|
| 104 |
+
<li class="control">
|
| 105 |
+
<input type="checkbox" name="shipping[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="shipping:save_in_address_book" onchange="shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="shipping:save_in_address_book"><?php echo $this->__('Save in address book') ?></label></li>
|
| 106 |
+
<?php else:?>
|
| 107 |
+
<li class="no-display"><input type="hidden" name="shipping[save_in_address_book]" value="1" /></li>
|
| 108 |
+
<?php endif;?>
|
| 109 |
+
</ul>
|
| 110 |
+
</fieldset>
|
| 111 |
+
</li>
|
| 112 |
+
<li class="control">
|
| 113 |
+
<input type="checkbox" name="shipping[same_as_billing]" id="shipping:same_as_billing" value="1"<?php if($this->getAddress()->getSameAsBilling()): ?> checked="checked"<?php endif; ?> title="<?php echo $this->__('Use Billing Address') ?>" onclick="shipping.setSameAsBilling(this.checked)" class="checkbox" /><label for="shipping:same_as_billing"><?php echo $this->__('Use Billing Address') ?></label>
|
| 114 |
+
</li>
|
| 115 |
+
</ul>
|
| 116 |
+
<div class="buttons-set" id="shipping-buttons-container">
|
| 117 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
| 118 |
+
<p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
| 119 |
+
<button type="button" class="button" title="<?php echo $this->__('Continue') ?>" onclick="shipping.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
|
| 120 |
+
<span id="shipping-please-wait" class="please-wait" style="display:none;">
|
| 121 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
|
| 122 |
+
</span>
|
| 123 |
+
</div>
|
| 124 |
+
</form>
|
| 125 |
+
<script type="text/javascript">
|
| 126 |
+
//<![CDATA[
|
| 127 |
+
var shipping = new Shipping('co-shipping-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveShipping') ?>',
|
| 128 |
+
'<?php echo $this->getUrl('checkout/onepage/shippingMethod') ?>');
|
| 129 |
+
var shippingForm = new VarienForm('co-shipping-form');
|
| 130 |
+
shippingForm.extraChildParams = ' onchange="shipping.setSameAsBilling(false);"';
|
| 131 |
+
//shippingForm.setElementsRelation('shipping:country_id', 'shipping:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
|
| 132 |
+
$('shipping-address-select') && shipping.newAddress(!$('shipping-address-select').value);
|
| 133 |
+
|
| 134 |
+
var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', countryRegions, undefined, 'shipping:postcode');
|
| 135 |
+
//]]>
|
| 136 |
+
</script>
|
app/design/frontend/default/default/template/address/customer/address/edit.phtml
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Magento
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 9 |
+
* It is also available through the world-wide-web at this URL:
|
| 10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
| 11 |
+
* If you did not receive a copy of the license and are unable to
|
| 12 |
+
* obtain it through the world-wide-web, please send an email
|
| 13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
+
*
|
| 15 |
+
* DISCLAIMER
|
| 16 |
+
*
|
| 17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
| 18 |
+
* versions in the future. If you wish to customize Magento for your
|
| 19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
| 20 |
+
*
|
| 21 |
+
* @category design
|
| 22 |
+
* @package base_default
|
| 23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 25 |
+
*/
|
| 26 |
+
?>
|
| 27 |
+
<?php
|
| 28 |
+
/**
|
| 29 |
+
* Edit customer address template
|
| 30 |
+
*
|
| 31 |
+
* @see Mage_Customer_Block_Address_Edit
|
| 32 |
+
*/
|
| 33 |
+
?>
|
| 34 |
+
<?php if($this->getTitle()): ?>
|
| 35 |
+
<div class="page-title">
|
| 36 |
+
<h1><?php echo $this->getTitle() ?></h1>
|
| 37 |
+
</div>
|
| 38 |
+
<?php endif; ?>
|
| 39 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
| 40 |
+
<form action="<?php echo $this->getSaveUrl() ?>" method="post" id="form-validate">
|
| 41 |
+
<div class="fieldset">
|
| 42 |
+
<?php echo $this->getBlockHtml('formkey')?>
|
| 43 |
+
<input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
|
| 44 |
+
<input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
|
| 45 |
+
<h2 class="legend"><?php echo $this->__('Contact Information') ?></h2>
|
| 46 |
+
<ul class="form-list">
|
| 47 |
+
<li class="fields">
|
| 48 |
+
<?php echo $this->getNameBlockHtml() ?>
|
| 49 |
+
</li>
|
| 50 |
+
<li class="wide">
|
| 51 |
+
<label for="company"><?php echo $this->__('Company') ?></label>
|
| 52 |
+
<div class="input-box">
|
| 53 |
+
<input type="text" name="company" id="company" title="<?php echo $this->__('Company') ?>" value="<?php echo $this->htmlEscape($this->getAddress()->getCompany()) ?>" class="input-text" />
|
| 54 |
+
</div>
|
| 55 |
+
</li>
|
| 56 |
+
<li class="fields">
|
| 57 |
+
<div class="field">
|
| 58 |
+
<label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
| 59 |
+
<div class="input-box">
|
| 60 |
+
<input type="text" name="telephone" value="<?php echo $this->htmlEscape($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" id="telephone" />
|
| 61 |
+
</div>
|
| 62 |
+
</div>
|
| 63 |
+
<div class="field">
|
| 64 |
+
<label for="fax"><?php echo $this->__('Fax') ?></label>
|
| 65 |
+
<div class="input-box">
|
| 66 |
+
<input type="text" name="fax" id="fax" title="<?php echo $this->__('Fax') ?>" value="<?php echo $this->htmlEscape($this->getAddress()->getFax()) ?>" class="input-text" />
|
| 67 |
+
</div>
|
| 68 |
+
</div>
|
| 69 |
+
</li>
|
| 70 |
+
</ul>
|
| 71 |
+
</div>
|
| 72 |
+
<div class="fieldset">
|
| 73 |
+
<h2 class="legend"><?php echo $this->__('Address') ?></h2>
|
| 74 |
+
<ul class="form-list">
|
| 75 |
+
<li class="wide">
|
| 76 |
+
<label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
|
| 77 |
+
<div class="input-box">
|
| 78 |
+
<input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text required-entry" />
|
| 79 |
+
</div>
|
| 80 |
+
</li>
|
| 81 |
+
<?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
|
| 82 |
+
<li class="wide">
|
| 83 |
+
<div class="input-box">
|
| 84 |
+
<input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i?>" class="input-text" />
|
| 85 |
+
</div>
|
| 86 |
+
</li>
|
| 87 |
+
<?php endfor ?>
|
| 88 |
+
<li class="fields">
|
| 89 |
+
<div class="field">
|
| 90 |
+
<label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
| 91 |
+
<div class="input-box">
|
| 92 |
+
<input type="text" name="city" value="<?php echo $this->htmlEscape($this->getAddress()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
|
| 93 |
+
</div>
|
| 94 |
+
</div>
|
| 95 |
+
<div class="field">
|
| 96 |
+
<label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
| 97 |
+
<div class="input-box">
|
| 98 |
+
<select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
| 99 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
| 100 |
+
</select>
|
| 101 |
+
<script type="text/javascript">
|
| 102 |
+
//<![CDATA[
|
| 103 |
+
$('region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
|
| 104 |
+
//]]>
|
| 105 |
+
</script>
|
| 106 |
+
<input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" />
|
| 107 |
+
</div>
|
| 108 |
+
</div>
|
| 109 |
+
</li>
|
| 110 |
+
<li class="fields">
|
| 111 |
+
<div class="field">
|
| 112 |
+
<label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
| 113 |
+
<div class="input-box">
|
| 114 |
+
<input type="text" name="postcode" value="<?php echo $this->htmlEscape($this->getAddress()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
|
| 115 |
+
</div>
|
| 116 |
+
</div>
|
| 117 |
+
<div class="field">
|
| 118 |
+
<label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
| 119 |
+
<div class="input-box">
|
| 120 |
+
<?php echo $this->getCountryHtmlSelect() ?>
|
| 121 |
+
</div>
|
| 122 |
+
</div>
|
| 123 |
+
</li>
|
| 124 |
+
<li class="fields">
|
| 125 |
+
<div class="field">
|
| 126 |
+
<label for="govt_id" class="required"><em>*</em><?php echo $this->__('Govt ID#') ?></label>
|
| 127 |
+
<div class="input-box">
|
| 128 |
+
<input type="text" name="govt_id" value="<?php echo $this->htmlEscape($this->getAddress()->getGovtId()) ?>" title="<?php echo $this->__('Govt ID#') ?>" id="govt_id" class="input-text required-entry" />
|
| 129 |
+
</div>
|
| 130 |
+
</div>
|
| 131 |
+
</li>
|
| 132 |
+
<li<?php if($this->canSetAsDefaultBilling()) echo ' class="control"' ?>>
|
| 133 |
+
<?php if($this->isDefaultBilling()): ?>
|
| 134 |
+
<strong><?php echo $this->__('Default Billing Address') ?></strong>
|
| 135 |
+
<?php elseif($this->canSetAsDefaultBilling()): ?>
|
| 136 |
+
<input type="checkbox" id="primary_billing" name="default_billing" value="1" title="<?php echo $this->__('Use as My Default Billing Address') ?>" class="checkbox" /><label for="primary_billing"><?php echo $this->__('Use as my default billing address') ?></label>
|
| 137 |
+
<?php else: ?>
|
| 138 |
+
<input type="hidden" name="default_billing" value="1" />
|
| 139 |
+
<?php endif; ?>
|
| 140 |
+
</li>
|
| 141 |
+
<li<?php if($this->canSetAsDefaultShipping()) echo ' class="control"' ?>>
|
| 142 |
+
<?php if($this->isDefaultShipping()): ?>
|
| 143 |
+
<strong><?php echo $this->__('Default Shipping Address') ?></strong>
|
| 144 |
+
<?php elseif($this->canSetAsDefaultShipping()): ?>
|
| 145 |
+
<input type="checkbox" id="primary_shipping" name="default_shipping" value="1" title="<?php echo $this->__('Use as My Default Shipping Address') ?>" class="checkbox" /><label for="primary_shipping"><?php echo $this->__('Use as my default shipping address') ?></label>
|
| 146 |
+
<?php else: ?>
|
| 147 |
+
<input type="hidden" name="default_shipping" value="1" />
|
| 148 |
+
<?php endif; ?>
|
| 149 |
+
</li>
|
| 150 |
+
</ul>
|
| 151 |
+
</div>
|
| 152 |
+
<div class="buttons-set">
|
| 153 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
| 154 |
+
<p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
| 155 |
+
<button type="submit" title="<?php echo $this->__('Save Address') ?>" class="button"><span><span><?php echo $this->__('Save Address') ?></span></span></button>
|
| 156 |
+
</div>
|
| 157 |
+
</form>
|
| 158 |
+
<script type="text/javascript">
|
| 159 |
+
//<![CDATA[
|
| 160 |
+
var dataForm = new VarienForm('form-validate', true);
|
| 161 |
+
new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
|
| 162 |
+
//]]>
|
| 163 |
+
</script>
|
app/design/frontend/default/default/template/address/persistent/checkout/onepage/billing.phtml
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Magento
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the Academic Free License (AFL 3.0)
|
| 8 |
+
* that is bundled with this package in the file LICENSE_AFL.txt.
|
| 9 |
+
* It is also available through the world-wide-web at this URL:
|
| 10 |
+
* http://opensource.org/licenses/afl-3.0.php
|
| 11 |
+
* If you did not receive a copy of the license and are unable to
|
| 12 |
+
* obtain it through the world-wide-web, please send an email
|
| 13 |
+
* to license@magentocommerce.com so we can send you a copy immediately.
|
| 14 |
+
*
|
| 15 |
+
* DISCLAIMER
|
| 16 |
+
*
|
| 17 |
+
* Do not edit or add to this file if you wish to upgrade Magento to newer
|
| 18 |
+
* versions in the future. If you wish to customize Magento for your
|
| 19 |
+
* needs please refer to http://www.magentocommerce.com for more information.
|
| 20 |
+
*
|
| 21 |
+
* @category design
|
| 22 |
+
* @package base_default
|
| 23 |
+
* @copyright Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
|
| 24 |
+
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
| 25 |
+
*/
|
| 26 |
+
/** @var Mage_Checkout_Block_Onepage_Billing $this */
|
| 27 |
+
?>
|
| 28 |
+
<form id="co-billing-form" action="">
|
| 29 |
+
<fieldset>
|
| 30 |
+
<ul class="form-list">
|
| 31 |
+
<?php if ($this->customerHasAddresses()): ?>
|
| 32 |
+
<li class="wide">
|
| 33 |
+
<label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
|
| 34 |
+
<div class="input-box">
|
| 35 |
+
<?php echo $this->getAddressesHtmlSelect('billing') ?>
|
| 36 |
+
</div>
|
| 37 |
+
</li>
|
| 38 |
+
<?php endif; ?>
|
| 39 |
+
<li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
|
| 40 |
+
<fieldset>
|
| 41 |
+
<input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
|
| 42 |
+
<ul>
|
| 43 |
+
<li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li>
|
| 44 |
+
<li class="fields">
|
| 45 |
+
<div class="field">
|
| 46 |
+
<label for="billing:company"><?php echo $this->__('Company') ?></label>
|
| 47 |
+
<div class="input-box">
|
| 48 |
+
<input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->htmlEscape($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
|
| 49 |
+
</div>
|
| 50 |
+
</div>
|
| 51 |
+
<?php if(!$this->isCustomerLoggedIn()): ?>
|
| 52 |
+
<div class="field">
|
| 53 |
+
<label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
| 54 |
+
<div class="input-box">
|
| 55 |
+
<input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->htmlEscape($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
|
| 56 |
+
</div>
|
| 57 |
+
</div>
|
| 58 |
+
<?php endif ?>
|
| 59 |
+
</li>
|
| 60 |
+
<li class="wide">
|
| 61 |
+
<label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
|
| 62 |
+
<div class="input-box">
|
| 63 |
+
<input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(1)) ?>" class="input-text required-entry" />
|
| 64 |
+
</div>
|
| 65 |
+
</li>
|
| 66 |
+
<?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
|
| 67 |
+
<li class="wide">
|
| 68 |
+
<div class="input-box">
|
| 69 |
+
<input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i?>" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet($_i)) ?>" class="input-text" />
|
| 70 |
+
</div>
|
| 71 |
+
</li>
|
| 72 |
+
<?php endfor ?>
|
| 73 |
+
<li class="fields">
|
| 74 |
+
<div class="field">
|
| 75 |
+
<label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
| 76 |
+
<div class="input-box">
|
| 77 |
+
<input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->htmlEscape($this->getAddress()->getCity()) ?>" class="input-text required-entry" id="billing:city" />
|
| 78 |
+
</div>
|
| 79 |
+
</div>
|
| 80 |
+
<div class="field">
|
| 81 |
+
<label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
| 82 |
+
<div class="input-box">
|
| 83 |
+
<select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
| 84 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
| 85 |
+
</select>
|
| 86 |
+
<script type="text/javascript">
|
| 87 |
+
//<![CDATA[
|
| 88 |
+
$('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
|
| 89 |
+
//]]>
|
| 90 |
+
</script>
|
| 91 |
+
<input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->htmlEscape($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
|
| 92 |
+
</div>
|
| 93 |
+
</div>
|
| 94 |
+
</li>
|
| 95 |
+
<li class="fields">
|
| 96 |
+
<div class="field">
|
| 97 |
+
<label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
| 98 |
+
<div class="input-box">
|
| 99 |
+
<input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->htmlEscape($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international required-entry" />
|
| 100 |
+
</div>
|
| 101 |
+
</div>
|
| 102 |
+
<div class="field">
|
| 103 |
+
<label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
| 104 |
+
<div class="input-box">
|
| 105 |
+
<?php echo $this->getCountryHtmlSelect('billing') ?>
|
| 106 |
+
</div>
|
| 107 |
+
</div>
|
| 108 |
+
</li>
|
| 109 |
+
<li class="fields">
|
| 110 |
+
<div class="field">
|
| 111 |
+
<label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
| 112 |
+
<div class="input-box">
|
| 113 |
+
<input type="text" name="billing[telephone]" value="<?php echo $this->htmlEscape($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" id="billing:telephone" />
|
| 114 |
+
</div>
|
| 115 |
+
</div>
|
| 116 |
+
<div class="field">
|
| 117 |
+
<label for="billing:fax"><?php echo $this->__('Fax') ?></label>
|
| 118 |
+
<div class="input-box">
|
| 119 |
+
<input type="text" name="billing[fax]" value="<?php echo $this->htmlEscape($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text" id="billing:fax" />
|
| 120 |
+
</div>
|
| 121 |
+
</div>
|
| 122 |
+
</li>
|
| 123 |
+
<li class="fields">
|
| 124 |
+
<div class="field">
|
| 125 |
+
<label for="govt_id" class="required"><em>*</em><?php echo $this->__('Govt ID#') ?></label>
|
| 126 |
+
<div class="input-box">
|
| 127 |
+
<input type="text" name="billing[govt_id]" value="<?php echo $this->htmlEscape($this->getAddress()->getGovtId()) ?>" title="<?php echo $this->__('Govt ID#') ?>" id="billing:govt_id" class="input-text required-entry" />
|
| 128 |
+
</div>
|
| 129 |
+
</div>
|
| 130 |
+
</li>
|
| 131 |
+
|
| 132 |
+
|
| 133 |
+
<?php if(!$this->isCustomerLoggedIn()): ?>
|
| 134 |
+
|
| 135 |
+
<?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
|
| 136 |
+
<?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
|
| 137 |
+
<?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
|
| 138 |
+
<li class="fields">
|
| 139 |
+
<?php if ($_dob->isEnabled()): ?>
|
| 140 |
+
<div class="field">
|
| 141 |
+
<?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
| 142 |
+
</div>
|
| 143 |
+
<?php endif; ?>
|
| 144 |
+
<?php if ($_gender->isEnabled()): ?>
|
| 145 |
+
<div class="field">
|
| 146 |
+
<?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
| 147 |
+
</div>
|
| 148 |
+
<?php endif ?>
|
| 149 |
+
</li>
|
| 150 |
+
<?php endif ?>
|
| 151 |
+
|
| 152 |
+
<?php if ($this->isTaxvatEnabled()):?>
|
| 153 |
+
<li><?php echo $this->getTaxvatHtml() ?></li>
|
| 154 |
+
<?php endif; ?>
|
| 155 |
+
|
| 156 |
+
<li class="fields" id="register-customer-password">
|
| 157 |
+
<div class="field">
|
| 158 |
+
<label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
| 159 |
+
<div class="input-box">
|
| 160 |
+
<input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
|
| 161 |
+
</div>
|
| 162 |
+
</div>
|
| 163 |
+
<div class="field">
|
| 164 |
+
<label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
|
| 165 |
+
<div class="input-box">
|
| 166 |
+
<input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
|
| 167 |
+
</div>
|
| 168 |
+
</div>
|
| 169 |
+
</li>
|
| 170 |
+
<?php echo $this->getChildHtml('persistent.remember.me'); ?>
|
| 171 |
+
<?php endif; ?>
|
| 172 |
+
<?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
|
| 173 |
+
<li class="control">
|
| 174 |
+
<input type="checkbox" name="billing[save_in_address_book]" value="1" title="<?php echo $this->__('Save in address book') ?>" id="billing:save_in_address_book" onchange="if(window.shipping) shipping.setSameAsBilling(false);"<?php if ($this->getAddress()->getSaveInAddressBook()):?> checked="checked"<?php endif;?> class="checkbox" /><label for="billing:save_in_address_book"><?php echo $this->__('Save in address book') ?></label>
|
| 175 |
+
</li>
|
| 176 |
+
<?php else:?>
|
| 177 |
+
<li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
|
| 178 |
+
<?php endif; ?>
|
| 179 |
+
</ul>
|
| 180 |
+
<?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
|
| 181 |
+
</fieldset>
|
| 182 |
+
</li>
|
| 183 |
+
<?php if ($this->canShip()): ?>
|
| 184 |
+
<li class="control">
|
| 185 |
+
<input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_yes" value="1"<?php if ($this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to this address') ?>" onclick="$('shipping:same_as_billing').checked = true;" class="radio" /><label for="billing:use_for_shipping_yes"><?php echo $this->__('Ship to this address') ?></label></li>
|
| 186 |
+
<li class="control">
|
| 187 |
+
<input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_no" value="0"<?php if (!$this->isUseBillingAddressForShipping()) {?> checked="checked"<?php }?> title="<?php echo $this->__('Ship to different address') ?>" onclick="$('shipping:same_as_billing').checked = false;" class="radio" /><label for="billing:use_for_shipping_no"><?php echo $this->__('Ship to different address') ?></label>
|
| 188 |
+
</li>
|
| 189 |
+
<?php endif; ?>
|
| 190 |
+
</ul>
|
| 191 |
+
<?php if (!$this->canShip()): ?>
|
| 192 |
+
<input type="hidden" name="billing[use_for_shipping]" value="1" />
|
| 193 |
+
<?php endif; ?>
|
| 194 |
+
<div class="buttons-set" id="billing-buttons-container">
|
| 195 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
| 196 |
+
<button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
|
| 197 |
+
<span class="please-wait" id="billing-please-wait" style="display:none;">
|
| 198 |
+
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>" alt="<?php echo $this->__('Loading next step...') ?>" title="<?php echo $this->__('Loading next step...') ?>" class="v-middle" /> <?php echo $this->__('Loading next step...') ?>
|
| 199 |
+
</span>
|
| 200 |
+
</div>
|
| 201 |
+
</fieldset>
|
| 202 |
+
</form>
|
| 203 |
+
<script type="text/javascript">
|
| 204 |
+
//<![CDATA[
|
| 205 |
+
var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
|
| 206 |
+
var billingForm = new VarienForm('co-billing-form');
|
| 207 |
+
|
| 208 |
+
//billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
|
| 209 |
+
$('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
|
| 210 |
+
|
| 211 |
+
var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', countryRegions, undefined, 'billing:postcode');
|
| 212 |
+
Event.observe($('onepage-guest-register-button'), 'click', function(event) {
|
| 213 |
+
var billingRememberMe = $$('#billing-new-address-form li #remember-me-box');
|
| 214 |
+
if(billingRememberMe.length > 0) {
|
| 215 |
+
billingRememberMe = $(billingRememberMe[0].parentNode);
|
| 216 |
+
if ($('login:guest') && $('login:guest').checked) {
|
| 217 |
+
billingRememberMe.hide();
|
| 218 |
+
} else if ($('login:register') && ($('login:register').checked || $('login:register').type == 'hidden')) {
|
| 219 |
+
billingRememberMe.show();
|
| 220 |
+
}
|
| 221 |
+
}
|
| 222 |
+
})
|
| 223 |
+
//]]>
|
| 224 |
+
</script>
|
app/design/frontend/default/default/template/address/persistent/customer/form/register.phtml
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<div class="account-create">
|
| 2 |
+
<div class="page-title">
|
| 3 |
+
<h1><?php echo $this->__('Create an Account') ?></h1>
|
| 4 |
+
</div>
|
| 5 |
+
<?php echo $this->getChildHtml('form_fields_before')?>
|
| 6 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
| 7 |
+
<form action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate">
|
| 8 |
+
<div class="fieldset">
|
| 9 |
+
<input type="hidden" name="success_url" value="<?php echo $this->getSuccessUrl() ?>" />
|
| 10 |
+
<input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />
|
| 11 |
+
<h2 class="legend"><?php echo $this->__('Personal Information') ?></h2>
|
| 12 |
+
<ul class="form-list">
|
| 13 |
+
<li class="fields">
|
| 14 |
+
<?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getFormData())->setForceUseCustomerAttributes(true)->toHtml() ?>
|
| 15 |
+
</li>
|
| 16 |
+
<li>
|
| 17 |
+
<label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
| 18 |
+
<div class="input-box">
|
| 19 |
+
<input type="text" name="email" id="email_address" value="<?php echo $this->htmlEscape($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
|
| 20 |
+
</div>
|
| 21 |
+
</li>
|
| 22 |
+
<?php if ($this->isNewsletterEnabled()): ?>
|
| 23 |
+
<li class="control">
|
| 24 |
+
<div class="input-box">
|
| 25 |
+
<input type="checkbox" name="is_subscribed" title="<?php echo $this->__('Sign Up for Newsletter') ?>" value="1" id="is_subscribed"<?php if($this->getFormData()->getIsSubscribed()): ?> checked="checked"<?php endif; ?> class="checkbox" />
|
| 26 |
+
</div>
|
| 27 |
+
<label for="is_subscribed"><?php echo $this->__('Sign Up for Newsletter') ?></label>
|
| 28 |
+
</li>
|
| 29 |
+
<?php endif ?>
|
| 30 |
+
<?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
|
| 31 |
+
<?php if ($_dob->isEnabled()): ?>
|
| 32 |
+
<li><?php echo $_dob->setDate($this->getFormData()->getDob())->toHtml() ?></li>
|
| 33 |
+
<?php endif ?>
|
| 34 |
+
<?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
|
| 35 |
+
<?php if ($_taxvat->isEnabled()): ?>
|
| 36 |
+
<li><?php echo $_taxvat->setTaxvat($this->getFormData()->getTaxvat())->toHtml() ?></li>
|
| 37 |
+
<?php endif ?>
|
| 38 |
+
<?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
|
| 39 |
+
<?php if ($_gender->isEnabled()): ?>
|
| 40 |
+
<li><?php echo $_gender->setGender($this->getFormData()->getGender())->toHtml() ?></li>
|
| 41 |
+
<?php endif ?>
|
| 42 |
+
</ul>
|
| 43 |
+
</div>
|
| 44 |
+
<?php $this->setShowAddressFields(true);?>
|
| 45 |
+
<?php if($this->getShowAddressFields()): ?>
|
| 46 |
+
<div class="fieldset">
|
| 47 |
+
<input type="hidden" name="create_address" value="1" />
|
| 48 |
+
<h2 class="legend"><?php echo $this->__('Address Information') ?></h2>
|
| 49 |
+
<ul class="form-list">
|
| 50 |
+
<li class="fields">
|
| 51 |
+
<div class="field">
|
| 52 |
+
<label for="company"><?php echo $this->__('Company') ?></label>
|
| 53 |
+
<div class="input-box">
|
| 54 |
+
<input type="text" name="company" id="company" value="<?php echo $this->htmlEscape($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text" />
|
| 55 |
+
</div>
|
| 56 |
+
</div>
|
| 57 |
+
<div class="field">
|
| 58 |
+
<label for="telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
| 59 |
+
<div class="input-box">
|
| 60 |
+
<input type="text" name="telephone" id="telephone" value="<?php echo $this->htmlEscape($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text required-entry" />
|
| 61 |
+
</div>
|
| 62 |
+
</div>
|
| 63 |
+
</li>
|
| 64 |
+
<li class="wide">
|
| 65 |
+
<label for="street_1" class="required"><em>*</em><?php echo $this->__('Street Address') ?></label>
|
| 66 |
+
<div class="input-box">
|
| 67 |
+
<input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet(1)) ?>" title="<?php echo $this->__('Street Address') ?>" id="street_1" class="input-text required-entry" />
|
| 68 |
+
</div>
|
| 69 |
+
</li>
|
| 70 |
+
<?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
|
| 71 |
+
<li class="wide">
|
| 72 |
+
<div class="input-box">
|
| 73 |
+
<input type="text" name="street[]" value="<?php echo $this->htmlEscape($this->getFormData()->getStreet($_i)) ?>" title="<?php echo $this->__('Street Address %s', $_i) ?>" id="street_<?php echo $_i?>" class="input-text" />
|
| 74 |
+
</div>
|
| 75 |
+
</li>
|
| 76 |
+
<?php endfor ?>
|
| 77 |
+
<li class="fields">
|
| 78 |
+
<div class="field">
|
| 79 |
+
<label for="city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
| 80 |
+
<div class="input-box">
|
| 81 |
+
<input type="text" name="city" value="<?php echo $this->htmlEscape($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" class="input-text required-entry" id="city" />
|
| 82 |
+
</div>
|
| 83 |
+
</div>
|
| 84 |
+
<div class="field">
|
| 85 |
+
<label for="region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
| 86 |
+
<div class="input-box">
|
| 87 |
+
<select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
| 88 |
+
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
| 89 |
+
</select>
|
| 90 |
+
<script type="text/javascript">
|
| 91 |
+
//<![CDATA[
|
| 92 |
+
$('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
|
| 93 |
+
//]]>
|
| 94 |
+
</script>
|
| 95 |
+
<input type="text" id="region" name="region" value="<?php echo $this->htmlEscape($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
|
| 96 |
+
</div>
|
| 97 |
+
</div>
|
| 98 |
+
</li>
|
| 99 |
+
<li class="fields">
|
| 100 |
+
<div class="field">
|
| 101 |
+
<label for="zip" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
| 102 |
+
<div class="input-box">
|
| 103 |
+
<input type="text" name="postcode" value="<?php echo $this->htmlEscape($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" id="zip" class="input-text validate-zip-international required-entry" />
|
| 104 |
+
</div>
|
| 105 |
+
</div>
|
| 106 |
+
<div class="field">
|
| 107 |
+
<label for="country" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
| 108 |
+
<div class="input-box">
|
| 109 |
+
<?php echo $this->getCountryHtmlSelect() ?>
|
| 110 |
+
</div>
|
| 111 |
+
</div>
|
| 112 |
+
</li>
|
| 113 |
+
<li class="fields">
|
| 114 |
+
<div class="field">
|
| 115 |
+
<label for="govt_id" class="required"><em>*</em><?php echo $this->__('Govt ID#') ?></label>
|
| 116 |
+
<div class="input-box">
|
| 117 |
+
<input type="text" name="govt_id" value="<?php echo $this->htmlEscape($this->getFormData()->getGovtId()) ?>" title="<?php echo $this->__('Govt ID#') ?>" id="govt_id" class="input-text required-entry" />
|
| 118 |
+
</div>
|
| 119 |
+
</div>
|
| 120 |
+
</li>
|
| 121 |
+
</ul>
|
| 122 |
+
<input type="hidden" name="default_billing" value="1" />
|
| 123 |
+
<input type="hidden" name="default_shipping" value="1" />
|
| 124 |
+
</div>
|
| 125 |
+
<?php endif; ?>
|
| 126 |
+
<div class="fieldset">
|
| 127 |
+
<h2 class="legend"><?php echo $this->__('Login Information') ?></h2>
|
| 128 |
+
<ul class="form-list">
|
| 129 |
+
<li class="fields">
|
| 130 |
+
<div class="field">
|
| 131 |
+
<label for="password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
| 132 |
+
<div class="input-box">
|
| 133 |
+
<input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
|
| 134 |
+
</div>
|
| 135 |
+
</div>
|
| 136 |
+
<div class="field">
|
| 137 |
+
<label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
|
| 138 |
+
<div class="input-box">
|
| 139 |
+
<input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
|
| 140 |
+
</div>
|
| 141 |
+
</div>
|
| 142 |
+
</li>
|
| 143 |
+
<?php echo $this->getChildHtml('persistent.remember.me'); ?>
|
| 144 |
+
</ul>
|
| 145 |
+
<?php echo $this->getChildHtml('persistent.remember.me.tooltip'); ?>
|
| 146 |
+
</div>
|
| 147 |
+
<div class="buttons-set">
|
| 148 |
+
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
| 149 |
+
<p class="back-link"><a href="<?php echo $this->escapeUrl($this->getBackUrl()) ?>" class="back-link"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
| 150 |
+
<button type="submit" title="<?php echo $this->__('Submit') ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
|
| 151 |
+
</div>
|
| 152 |
+
<?php if (Mage::helper('checkout')->isContextCheckout()): ?>
|
| 153 |
+
<input name="context" type="hidden" value="checkout" />
|
| 154 |
+
<?php endif; ?>
|
| 155 |
+
</form>
|
| 156 |
+
<script type="text/javascript">
|
| 157 |
+
//<![CDATA[
|
| 158 |
+
var dataForm = new VarienForm('form-validate', true);
|
| 159 |
+
<?php if($this->getShowAddressFields()): ?>
|
| 160 |
+
new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
|
| 161 |
+
<?php endif; ?>
|
| 162 |
+
//]]>
|
| 163 |
+
</script>
|
| 164 |
+
</div>
|
package.xml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Amar_Address</name>
|
| 4 |
-
<version>0.1.
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
|
@@ -10,9 +10,9 @@
|
|
| 10 |
<description>Add new address attribute in named Govt ID# in address in admin, customer registration form, customer edit address and checkout pages.</description>
|
| 11 |
<notes>First release of extention</notes>
|
| 12 |
<authors><author><name>jaimin</name><user>auto-converted</user><email>jaimin85india@yahoo.com</email></author></authors>
|
| 13 |
-
<date>2012-07-
|
| 14 |
-
<time>
|
| 15 |
-
<contents><target name="magelocal"><dir name="Amar"><dir name="Address"><dir name="Block"><file name="Address.php" hash="998b6d6189deef45541f1b6cc727dba1"/></dir><dir name="Helper"><file name="Data.php" hash="c7c9e812cf2b939509bdd9fce8f78732"/></dir><dir name="etc"><file name="config.xml" hash="b3a589695a862de5468339ef329310f2"/></dir><dir name="sql"><dir name="address_setup"><file name="mysql4-install-0.1.0.php" hash="66e62f5822815783e105bac5e06d4d81"/></dir></dir></dir></dir><dir name="
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
| 1 |
<?xml version="1.0"?>
|
| 2 |
<package>
|
| 3 |
<name>Amar_Address</name>
|
| 4 |
+
<version>0.1.1</version>
|
| 5 |
<stability>stable</stability>
|
| 6 |
<license uri="http://www.opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
| 7 |
<channel>community</channel>
|
| 10 |
<description>Add new address attribute in named Govt ID# in address in admin, customer registration form, customer edit address and checkout pages.</description>
|
| 11 |
<notes>First release of extention</notes>
|
| 12 |
<authors><author><name>jaimin</name><user>auto-converted</user><email>jaimin85india@yahoo.com</email></author></authors>
|
| 13 |
+
<date>2012-07-10</date>
|
| 14 |
+
<time>11:23:46</time>
|
| 15 |
+
<contents><target name="magelocal"><dir name="Amar"><dir name="Address"><dir name="Block"><file name="Address.php" hash="998b6d6189deef45541f1b6cc727dba1"/></dir><dir name="Helper"><file name="Data.php" hash="c7c9e812cf2b939509bdd9fce8f78732"/></dir><dir name="etc"><file name="config.xml" hash="b3a589695a862de5468339ef329310f2"/></dir><dir name="sql"><dir name="address_setup"><file name="mysql4-install-0.1.0.php" hash="66e62f5822815783e105bac5e06d4d81"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Amar_Address.xml" hash="80597bd9f3c6ed2e92c26588567c5116"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="address.xml" hash="8d2fb30ea9194f7ac408459d2335db2c"/></dir><dir name="template"><dir name="address"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="97a6dd62870d080caa8cbedace946f8f"/><file name="shipping.phtml" hash="ed6b9daeb069f4771f9a9a79c7a7ab2a"/></dir></dir><dir name="customer"><dir name="address"><file name="edit.phtml" hash="eb642a156f8b1c9055c61258f7811464"/></dir></dir><dir name="persistent"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="1036ba5a7f220b7de80ea7fc4bb0cefd"/></dir></dir><dir name="customer"><dir name="form"><file name="register.phtml" hash="f373a168be9ea037bd7a19e7e70498e8"/></dir></dir></dir></dir></dir></dir></dir></dir></target></contents>
|
| 16 |
<compatible/>
|
| 17 |
<dependencies/>
|
| 18 |
</package>
|
