Version Notes
Add compatibility for One Step Checkout (http://www.magentocommerce.com/magento-connect/one-step-checkout-v4.html).
Download this release
Release Info
Developer | Lexel Software |
Extension | Lexel_UkAddressFinder |
Version | 0.3.0 |
Comparing to | |
See all releases |
Code changes from version 0.2.1 to 0.3.0
- app/code/community/Lexel/UkAddressFinder/controllers/IndexController.php +17 -90
- app/code/community/Lexel/UkAddressFinder/etc/config.xml +1 -1
- app/design/frontend/base/default/layout/addressfinder.xml +23 -9
- app/design/frontend/base/default/template/addressfinder/billing.phtml +0 -269
- app/design/frontend/base/default/template/addressfinder/lookup_onepage.phtml +119 -0
- app/design/frontend/base/default/template/addressfinder/lookup_onestepcheckout.phtml +119 -0
- app/design/frontend/base/default/template/addressfinder/shipping.phtml +0 -208
- package.xml +5 -5
- skin/frontend/base/default/css/lexel/addressfinder/onepage.css +22 -0
- skin/frontend/base/default/css/lexel/addressfinder/onestepcheckout.css +25 -0
app/code/community/Lexel/UkAddressFinder/controllers/IndexController.php
CHANGED
@@ -19,86 +19,15 @@
|
|
19 |
|
20 |
class Lexel_UkAddressFinder_IndexController extends Mage_Core_Controller_Front_Action
|
21 |
{
|
22 |
-
public function
|
23 |
{
|
24 |
-
$postCode
|
|
|
|
|
25 |
$userName = Mage::getStoreConfig('addressfinder/license/username'); // get username from backend system configuration
|
26 |
$password = Mage::getStoreConfig('addressfinder/license/password'); // get password from backend system configuration
|
27 |
$licenseKey = Mage::getStoreConfig('addressfinder/license/license_key'); // get license key from backend system configuration
|
28 |
|
29 |
-
/* call to lexel PAF API via curl */
|
30 |
-
|
31 |
-
$url = "http://services.lexel.co.uk/paf/";
|
32 |
-
|
33 |
-
$queryString = "?Username=".$userName."&Password=".$password."&LicenceKey=".$licenseKey."&LookupType=ByPostcodeList&ID=".urlencode($postCode);
|
34 |
-
$response = file_get_contents($url.$queryString);
|
35 |
-
$dom = new DOMDocument('1.0', 'iso-8859-1');
|
36 |
-
$dom->loadXML($response);
|
37 |
-
$infoNode = $dom->getElementsByTagName('Information')->item(0);
|
38 |
-
|
39 |
-
$errorNode = $infoNode->getElementsByTagName('Error')->item(0);
|
40 |
-
if ($errorNode->getElementsByTagName('ErrorNo')->item(0)->nodeValue != '0') {
|
41 |
-
$message = $errorNode->getElementsByTagName('ErrorMsg')->item(0)->nodeValue;
|
42 |
-
echo "<div>We apologize, we cannot find this address in our database, please check that your postcode is correct</div>";
|
43 |
-
}
|
44 |
-
echo "<select id='addressLookUp' onchange='billingExactAddressFinder(this.value);'>";
|
45 |
-
echo "<option>----- please select your address ----</option>";
|
46 |
-
$addressParentNode = $infoNode->childNodes->item(1);
|
47 |
-
foreach ($addressParentNode->childNodes as $addressNode)
|
48 |
-
{
|
49 |
-
echo "<option value=".$addressNode->getAttribute('AddressID').">".$addressNode->getAttribute('Description')."</option>";
|
50 |
-
}
|
51 |
-
echo "</select>";
|
52 |
-
}
|
53 |
-
|
54 |
-
public function billingexactaddressfinderAction()
|
55 |
-
{
|
56 |
-
$addressId = $this->getRequest()->getPost('addressid');
|
57 |
-
$userName = Mage::getStoreConfig('addressfinder/license/username'); // get username from backend system configuration
|
58 |
-
$password = Mage::getStoreConfig('addressfinder/license/password'); // get password from backend system configuration
|
59 |
-
$licenseKey = Mage::getStoreConfig('addressfinder/license/license_key'); // get license key from backend system configuration
|
60 |
-
|
61 |
-
/* call to lexel PAF API via curl */
|
62 |
-
|
63 |
-
|
64 |
-
$url = "http://services.lexel.co.uk/paf/";
|
65 |
-
|
66 |
-
$queryString = "?Username=".$userName."&Password=".$password."&LicenceKey=".$licenseKey."&LookupType=ByAddressID&ID=".urlencode($addressId);
|
67 |
-
print $url . $queryString;
|
68 |
-
$response = file_get_contents($url.$queryString);
|
69 |
-
//$xml_object = simplexml_load_file($response);
|
70 |
-
#print_r(htmlspecialchars($response));
|
71 |
-
$dom = new DOMDocument('1.0', 'iso-8859-1');
|
72 |
-
$dom->loadXML($response);
|
73 |
-
$infoNode = $dom->getElementsByTagName('Information')->item(0);
|
74 |
-
|
75 |
-
$errorNode = $infoNode->getElementsByTagName('Error')->item(0);
|
76 |
-
if ($errorNode->getElementsByTagName('ErrorNo')->item(0)->nodeValue != '0') {
|
77 |
-
$message = $errorNode->getElementsByTagName('ErrorMsg')->item(0)->nodeValue;
|
78 |
-
echo "<div>We apologize, we cannot find this address in our database, please check that your postcode is correct</div>";
|
79 |
-
}
|
80 |
-
|
81 |
-
$addressParentNode = $infoNode->getElementsByTagName('Address')->item(0);
|
82 |
-
|
83 |
-
$OrganisationName = $addressParentNode->getElementsByTagName('OrganisationName')->item(0)->nodeValue;
|
84 |
-
$AddressLine1 = $addressParentNode->getElementsByTagName('AddressLine1')->item(0)->nodeValue;
|
85 |
-
$AddressLine2 = $addressParentNode->getElementsByTagName('AddressLine2')->item(0)->nodeValue;
|
86 |
-
$County = $addressParentNode->getElementsByTagName('County')->item(0)->nodeValue;
|
87 |
-
$PostTown = $addressParentNode->getElementsByTagName('PostTown')->item(0)->nodeValue;
|
88 |
-
$PostCode = $addressParentNode->getElementsByTagName('PostCode')->item(0)->nodeValue;
|
89 |
-
$totalString = '~'.$OrganisationName.'~'.$AddressLine1.'~'.$AddressLine2.'~'.$County.'~'.$PostTown.'~'.$PostCode;
|
90 |
-
echo $totalString;
|
91 |
-
}
|
92 |
-
|
93 |
-
public function shippingaddresslistfinderAction()
|
94 |
-
{
|
95 |
-
$postCode = $this->getRequest()->getPost('postcode');
|
96 |
-
$userName = Mage::getStoreConfig('addressfinder/license/username'); // get username from backend system configuration
|
97 |
-
$password = Mage::getStoreConfig('addressfinder/license/password'); // get password from backend system configuration
|
98 |
-
$licenseKey = Mage::getStoreConfig('addressfinder/license/license_key'); // get license key from backend system configuration
|
99 |
-
|
100 |
-
/* call to lexel PAF API via curl */
|
101 |
-
|
102 |
$url = "http://services.lexel.co.uk/paf/";
|
103 |
|
104 |
$queryString = "?Username=".$userName."&Password=".$password."&LicenceKey=".$licenseKey."&LookupType=ByPostcodeList&ID=".urlencode($postCode);
|
@@ -110,35 +39,32 @@ class Lexel_UkAddressFinder_IndexController extends Mage_Core_Controller_Front_A
|
|
110 |
$errorNode = $infoNode->getElementsByTagName('Error')->item(0);
|
111 |
if ($errorNode->getElementsByTagName('ErrorNo')->item(0)->nodeValue != '0') {
|
112 |
$message = $errorNode->getElementsByTagName('ErrorMsg')->item(0)->nodeValue;
|
113 |
-
|
|
|
114 |
}
|
115 |
-
echo
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
|
|
121 |
}
|
122 |
-
|
123 |
}
|
124 |
|
125 |
-
public function
|
126 |
{
|
127 |
$addressId = $this->getRequest()->getPost('addressid');
|
128 |
$userName = Mage::getStoreConfig('addressfinder/license/username'); // get username from backend system configuration
|
129 |
$password = Mage::getStoreConfig('addressfinder/license/password'); // get password from backend system configuration
|
130 |
$licenseKey = Mage::getStoreConfig('addressfinder/license/license_key'); // get license key from backend system configuration
|
131 |
|
132 |
-
/* call to lexel PAF API via curl */
|
133 |
-
|
134 |
-
|
135 |
$url = "http://services.lexel.co.uk/paf/";
|
136 |
|
137 |
$queryString = "?Username=".$userName."&Password=".$password."&LicenceKey=".$licenseKey."&LookupType=ByAddressID&ID=".urlencode($addressId);
|
138 |
print $url . $queryString;
|
139 |
$response = file_get_contents($url.$queryString);
|
140 |
-
//$xml_object = simplexml_load_file($response);
|
141 |
-
#print_r(htmlspecialchars($response));
|
142 |
$dom = new DOMDocument('1.0', 'iso-8859-1');
|
143 |
$dom->loadXML($response);
|
144 |
$infoNode = $dom->getElementsByTagName('Information')->item(0);
|
@@ -146,7 +72,8 @@ class Lexel_UkAddressFinder_IndexController extends Mage_Core_Controller_Front_A
|
|
146 |
$errorNode = $infoNode->getElementsByTagName('Error')->item(0);
|
147 |
if ($errorNode->getElementsByTagName('ErrorNo')->item(0)->nodeValue != '0') {
|
148 |
$message = $errorNode->getElementsByTagName('ErrorMsg')->item(0)->nodeValue;
|
149 |
-
echo "<div>We
|
|
|
150 |
}
|
151 |
|
152 |
$addressParentNode = $infoNode->getElementsByTagName('Address')->item(0);
|
19 |
|
20 |
class Lexel_UkAddressFinder_IndexController extends Mage_Core_Controller_Front_Action
|
21 |
{
|
22 |
+
public function findAddressFromPostcodeAction()
|
23 |
{
|
24 |
+
$postCode = $this->getRequest()->getPost('postcode');
|
25 |
+
$addressType = $this->getRequest()->getPost('addressType') === 'billing' ? 'billing' : 'shipping';
|
26 |
+
|
27 |
$userName = Mage::getStoreConfig('addressfinder/license/username'); // get username from backend system configuration
|
28 |
$password = Mage::getStoreConfig('addressfinder/license/password'); // get password from backend system configuration
|
29 |
$licenseKey = Mage::getStoreConfig('addressfinder/license/license_key'); // get license key from backend system configuration
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
$url = "http://services.lexel.co.uk/paf/";
|
32 |
|
33 |
$queryString = "?Username=".$userName."&Password=".$password."&LicenceKey=".$licenseKey."&LookupType=ByPostcodeList&ID=".urlencode($postCode);
|
39 |
$errorNode = $infoNode->getElementsByTagName('Error')->item(0);
|
40 |
if ($errorNode->getElementsByTagName('ErrorNo')->item(0)->nodeValue != '0') {
|
41 |
$message = $errorNode->getElementsByTagName('ErrorMsg')->item(0)->nodeValue;
|
42 |
+
echo '<p>We cannot find this address in our database, please check that your postcode is correct</p>';
|
43 |
+
exit;
|
44 |
}
|
45 |
+
echo '<label for="billing:addressFinderList">' . __('Select Your Address') . '</label>';
|
46 |
+
echo '<div class="input-box">';
|
47 |
+
echo '<select id="addressLookUp" onchange="populateAddressFields(this.value, \'' . $addressType . '\');">';
|
48 |
+
echo '<option>' . __('Please select your address') . '...</option>';
|
49 |
+
$addressParentNode = $infoNode->childNodes->item(1);
|
50 |
+
foreach ($addressParentNode->childNodes as $addressNode) {
|
51 |
+
echo '<option value="' . $addressNode->getAttribute('AddressID') . '">' . $addressNode->getAttribute('Description') . '</option>';
|
52 |
}
|
53 |
+
echo '</select>';
|
54 |
}
|
55 |
|
56 |
+
public function getFullAddressAction()
|
57 |
{
|
58 |
$addressId = $this->getRequest()->getPost('addressid');
|
59 |
$userName = Mage::getStoreConfig('addressfinder/license/username'); // get username from backend system configuration
|
60 |
$password = Mage::getStoreConfig('addressfinder/license/password'); // get password from backend system configuration
|
61 |
$licenseKey = Mage::getStoreConfig('addressfinder/license/license_key'); // get license key from backend system configuration
|
62 |
|
|
|
|
|
|
|
63 |
$url = "http://services.lexel.co.uk/paf/";
|
64 |
|
65 |
$queryString = "?Username=".$userName."&Password=".$password."&LicenceKey=".$licenseKey."&LookupType=ByAddressID&ID=".urlencode($addressId);
|
66 |
print $url . $queryString;
|
67 |
$response = file_get_contents($url.$queryString);
|
|
|
|
|
68 |
$dom = new DOMDocument('1.0', 'iso-8859-1');
|
69 |
$dom->loadXML($response);
|
70 |
$infoNode = $dom->getElementsByTagName('Information')->item(0);
|
72 |
$errorNode = $infoNode->getElementsByTagName('Error')->item(0);
|
73 |
if ($errorNode->getElementsByTagName('ErrorNo')->item(0)->nodeValue != '0') {
|
74 |
$message = $errorNode->getElementsByTagName('ErrorMsg')->item(0)->nodeValue;
|
75 |
+
echo "<div>We cannot find this address in our database, please check that your postcode is correct</div>";
|
76 |
+
exit;
|
77 |
}
|
78 |
|
79 |
$addressParentNode = $infoNode->getElementsByTagName('Address')->item(0);
|
app/code/community/Lexel/UkAddressFinder/etc/config.xml
CHANGED
@@ -21,7 +21,7 @@
|
|
21 |
<config>
|
22 |
<modules>
|
23 |
<Lexel_UkAddressFinder>
|
24 |
-
<version>0.
|
25 |
</Lexel_UkAddressFinder>
|
26 |
</modules>
|
27 |
|
21 |
<config>
|
22 |
<modules>
|
23 |
<Lexel_UkAddressFinder>
|
24 |
+
<version>0.3.0</version>
|
25 |
</Lexel_UkAddressFinder>
|
26 |
</modules>
|
27 |
|
app/design/frontend/base/default/layout/addressfinder.xml
CHANGED
@@ -1,11 +1,25 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
-
<layout version="0.
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
10 |
</checkout_onepage_index>
|
11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?xml version="1.0"?>
|
2 |
+
<layout version="0.3.0">
|
3 |
+
<checkout_onepage_index>
|
4 |
+
<reference name="head">
|
5 |
+
<action method="addItem">
|
6 |
+
<type>skin_css</type>
|
7 |
+
<name>css/lexel/addressfinder/onepage.css</name>
|
8 |
+
</action>
|
9 |
+
</reference>
|
10 |
+
<reference name="content">
|
11 |
+
<block type="core/template" name="addressfinder.lookup_onepage" template="addressfinder/lookup_onepage.phtml" />
|
12 |
+
</reference>
|
13 |
</checkout_onepage_index>
|
14 |
+
<onestepcheckout_index_index>
|
15 |
+
<reference name="head">
|
16 |
+
<action method="addItem">
|
17 |
+
<type>skin_css</type>
|
18 |
+
<name>css/lexel/addressfinder/onestepcheckout.css</name>
|
19 |
+
</action>
|
20 |
+
</reference>
|
21 |
+
<reference name="content">
|
22 |
+
<block type="core/template" name="addressfinder.lookup_onestepcheckout" template="addressfinder/lookup_onestepcheckout.phtml" />
|
23 |
+
</reference>
|
24 |
+
</onestepcheckout_index_index>
|
25 |
+
</layout>
|
app/design/frontend/base/default/template/addressfinder/billing.phtml
DELETED
@@ -1,269 +0,0 @@
|
|
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) 2012 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 |
-
<form id="co-billing-form" action="">
|
28 |
-
<fieldset>
|
29 |
-
<ul class="form-list">
|
30 |
-
<li>
|
31 |
-
<div style="display:inline; width:100%;" id="billing-findAddress" class="field">
|
32 |
-
<input type="text" title="Enter Your Post Code" class="input-text postcode-finder required-entry" name="billing-addressFinder" onfocus="javascript:if(this.value == 'Enter Your Post Code'){ this.value= ''; }" onblur="javascript:if(this.value == ''){ this.value= 'Enter Your Post Code'; }" value="Enter Your Post Code" id="billing-addressFinder">
|
33 |
-
|
34 |
-
<button class="button" title="Find Address" onclick="billingAddressListFinder($('billing-addressFinder').value);" type="button"><span><span>Find Address</span></span></button>
|
35 |
-
</div>
|
36 |
-
</li>
|
37 |
-
<li id="billingAddressList"></li>
|
38 |
-
<?php if ($this->customerHasAddresses()): ?>
|
39 |
-
<li class="wide">
|
40 |
-
<label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
|
41 |
-
<div class="input-box">
|
42 |
-
<?php echo $this->getAddressesHtmlSelect('billing') ?>
|
43 |
-
</div>
|
44 |
-
</li>
|
45 |
-
<?php endif; ?>
|
46 |
-
<li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
|
47 |
-
<fieldset>
|
48 |
-
<input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
|
49 |
-
<ul>
|
50 |
-
<li class="fields"><?php echo $this->getLayout()->createBlock('customer/widget_name')->setObject($this->getAddress()->getFirstname() ? $this->getAddress() : $this->getQuote()->getCustomer())->setForceUseCustomerRequiredAttributes(!$this->isCustomerLoggedIn())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?></li>
|
51 |
-
<li class="fields">
|
52 |
-
<div class="field">
|
53 |
-
<label for="billing:company"><?php echo $this->__('Company') ?></label>
|
54 |
-
<div class="input-box">
|
55 |
-
<input type="text" id="billing:company" name="billing[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" />
|
56 |
-
</div>
|
57 |
-
</div>
|
58 |
-
<?php if(!$this->isCustomerLoggedIn()): ?>
|
59 |
-
<div class="field">
|
60 |
-
<label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
|
61 |
-
<div class="input-box">
|
62 |
-
<input type="text" name="billing[email]" id="billing:email" value="<?php echo $this->escapeHtml($this->getAddress()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" />
|
63 |
-
</div>
|
64 |
-
</div>
|
65 |
-
<?php endif; ?>
|
66 |
-
</li>
|
67 |
-
<?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
|
68 |
-
<li class="wide">
|
69 |
-
<label for="billing:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
|
70 |
-
<div class="input-box">
|
71 |
-
<input type="text" title="<?php echo $this->__('Street Address') ?>" name="billing[street][]" id="billing:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
|
72 |
-
</div>
|
73 |
-
</li>
|
74 |
-
<?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
|
75 |
-
<?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
|
76 |
-
<li class="wide">
|
77 |
-
<div class="input-box">
|
78 |
-
<input type="text" title="<?php echo $this->__('Street Address %s', $_i) ?>" name="billing[street][]" id="billing:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
|
79 |
-
</div>
|
80 |
-
</li>
|
81 |
-
<?php endfor; ?>
|
82 |
-
<?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
|
83 |
-
<li class="wide">
|
84 |
-
<label for="billing:vat_id"><?php echo $this->__('VAT Number') ?></label>
|
85 |
-
<div class="input-box">
|
86 |
-
<input type="text" id="billing:vat_id" name="billing[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()) ?>" title="<?php echo $this->__('VAT Number') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
|
87 |
-
</div>
|
88 |
-
</li>
|
89 |
-
<?php endif; ?>
|
90 |
-
<li class="fields">
|
91 |
-
<div class="field">
|
92 |
-
<label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
93 |
-
<div class="input-box">
|
94 |
-
<input type="text" title="<?php echo $this->__('City') ?>" name="billing[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="billing:city" />
|
95 |
-
</div>
|
96 |
-
</div>
|
97 |
-
<div class="field">
|
98 |
-
<label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
99 |
-
<div class="input-box">
|
100 |
-
<select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
101 |
-
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
102 |
-
</select>
|
103 |
-
<script type="text/javascript">
|
104 |
-
//<![CDATA[
|
105 |
-
$('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
|
106 |
-
//]]>
|
107 |
-
</script>
|
108 |
-
<input type="text" id="billing:region" name="billing[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
|
109 |
-
</div>
|
110 |
-
</div>
|
111 |
-
</li>
|
112 |
-
<li class="fields">
|
113 |
-
<div class="field">
|
114 |
-
<label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
115 |
-
<div class="input-box">
|
116 |
-
<input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" />
|
117 |
-
</div>
|
118 |
-
</div>
|
119 |
-
<div class="field">
|
120 |
-
<label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
121 |
-
<div class="input-box">
|
122 |
-
<?php echo $this->getCountryHtmlSelect('billing') ?>
|
123 |
-
</div>
|
124 |
-
</div>
|
125 |
-
</li>
|
126 |
-
<li class="fields">
|
127 |
-
<div class="field">
|
128 |
-
<label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
129 |
-
<div class="input-box">
|
130 |
-
<input type="text" name="billing[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="billing:telephone" />
|
131 |
-
</div>
|
132 |
-
</div>
|
133 |
-
<div class="field">
|
134 |
-
<label for="billing:fax"><?php echo $this->__('Fax') ?></label>
|
135 |
-
<div class="input-box">
|
136 |
-
<input type="text" name="billing[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="billing:fax" />
|
137 |
-
</div>
|
138 |
-
</div>
|
139 |
-
</li>
|
140 |
-
<?php if(!$this->isCustomerLoggedIn()): ?>
|
141 |
-
|
142 |
-
<?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
|
143 |
-
<?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
|
144 |
-
<?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
|
145 |
-
<li class="fields">
|
146 |
-
<?php if ($_dob->isEnabled()): ?>
|
147 |
-
<div class="field">
|
148 |
-
<?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
149 |
-
</div>
|
150 |
-
<?php endif; ?>
|
151 |
-
<?php if ($_gender->isEnabled()): ?>
|
152 |
-
<div class="field">
|
153 |
-
<?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
154 |
-
</div>
|
155 |
-
<?php endif ?>
|
156 |
-
</li>
|
157 |
-
<?php endif ?>
|
158 |
-
|
159 |
-
<?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
|
160 |
-
<?php if ($_taxvat->isEnabled()): ?>
|
161 |
-
<li>
|
162 |
-
<?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
|
163 |
-
</li>
|
164 |
-
<?php endif ?>
|
165 |
-
|
166 |
-
<li class="fields" id="register-customer-password">
|
167 |
-
<div class="field">
|
168 |
-
<label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
|
169 |
-
<div class="input-box">
|
170 |
-
<input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
|
171 |
-
</div>
|
172 |
-
</div>
|
173 |
-
<div class="field">
|
174 |
-
<label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
|
175 |
-
<div class="input-box">
|
176 |
-
<input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
|
177 |
-
</div>
|
178 |
-
</div>
|
179 |
-
</li>
|
180 |
-
<?php endif; ?>
|
181 |
-
<?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
|
182 |
-
<li class="control">
|
183 |
-
<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>
|
184 |
-
</li>
|
185 |
-
<?php else:?>
|
186 |
-
<li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
|
187 |
-
<?php endif; ?>
|
188 |
-
<?php echo $this->getChildHtml('form.additional.info'); ?>
|
189 |
-
</ul>
|
190 |
-
</fieldset>
|
191 |
-
</li>
|
192 |
-
<?php /* Extensions placeholder */ ?>
|
193 |
-
<?php echo $this->getChildHtml('checkout.onepage.billing.extra')?>
|
194 |
-
<?php if ($this->canShip()): ?>
|
195 |
-
<li class="control">
|
196 |
-
<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>
|
197 |
-
<li class="control">
|
198 |
-
<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>
|
199 |
-
</li>
|
200 |
-
<?php endif; ?>
|
201 |
-
</ul>
|
202 |
-
<?php if (!$this->canShip()): ?>
|
203 |
-
<input type="hidden" name="billing[use_for_shipping]" value="1" />
|
204 |
-
<?php endif; ?>
|
205 |
-
<div class="buttons-set" id="billing-buttons-container">
|
206 |
-
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
207 |
-
<button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
|
208 |
-
<span class="please-wait" id="billing-please-wait" style="display:none;">
|
209 |
-
<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...') ?>
|
210 |
-
</span>
|
211 |
-
</div>
|
212 |
-
</fieldset>
|
213 |
-
</form>
|
214 |
-
<script type="text/javascript">
|
215 |
-
//<![CDATA[
|
216 |
-
var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
|
217 |
-
var billingForm = new VarienForm('co-billing-form');
|
218 |
-
|
219 |
-
//billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
|
220 |
-
$('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
|
221 |
-
|
222 |
-
var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
|
223 |
-
//]]>
|
224 |
-
</script>
|
225 |
-
|
226 |
-
<script type="text/javascript">
|
227 |
-
//<![CDATA[
|
228 |
-
function billingAddressListFinder (code) {
|
229 |
-
new Ajax.Request(
|
230 |
-
'<?php echo $this->getUrl('addressfinder/index/billingaddresslistfinder')?>',
|
231 |
-
{
|
232 |
-
method:'post',
|
233 |
-
parameters: {postcode:code},
|
234 |
-
onSuccess: function (transport) {
|
235 |
-
var response = transport.responseText || "no response text";
|
236 |
-
$('billingAddressList').innerHTML = response;
|
237 |
-
},
|
238 |
-
onFailure: function() {
|
239 |
-
alert('Something went wrong...')
|
240 |
-
}
|
241 |
-
}
|
242 |
-
);
|
243 |
-
|
244 |
-
}
|
245 |
-
|
246 |
-
function billingExactAddressFinder (id) {
|
247 |
-
new Ajax.Request(
|
248 |
-
'<?php echo $this->getUrl('addressfinder/index/billingexactaddressfinder')?>',
|
249 |
-
{
|
250 |
-
method:'post',
|
251 |
-
parameters: {addressid:id},
|
252 |
-
onSuccess: function (transport) {
|
253 |
-
var response = transport.responseText || "no response text";
|
254 |
-
var fullAddress = response.split('~');
|
255 |
-
$('billing:company').value = fullAddress[1];
|
256 |
-
$('billing:street1').value = fullAddress[2];
|
257 |
-
$('billing:street2').value = fullAddress[3];
|
258 |
-
$('billing:region').value = fullAddress[4];
|
259 |
-
$('billing:city').value = fullAddress[5];
|
260 |
-
$('billing:postcode').value = fullAddress[6];
|
261 |
-
},
|
262 |
-
onFailure: function() {
|
263 |
-
alert('Something went wrong...')
|
264 |
-
}
|
265 |
-
}
|
266 |
-
);
|
267 |
-
}
|
268 |
-
//]]>
|
269 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/design/frontend/base/default/template/addressfinder/lookup_onepage.phtml
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="addressFinderBilling" class="addressFinder">
|
2 |
+
<div class="postcode clearfix" style="display: none;">
|
3 |
+
<label for="billing:addressFinderPostcode"><?php echo $this->__('Address Finder') ?></label>
|
4 |
+
<div class="input-box">
|
5 |
+
<input type="text" id="billing:addressFinderPostcode" class="input-text" name="billing[addressFinderPostcode]" title="<?php echo $this->__('Enter Your Post Code') ?>" value="<?php echo $this->__('Enter Your Post Code') ?>" onfocus="javascript:if(this.value == '<?php echo $this->__('Enter Your Post Code') ?>'){ this.value= ''; }" onblur="javascript:if(this.value == ''){ this.value= '<?php echo $this->__('Enter Your Post Code') ?>'; }" />
|
6 |
+
</div>
|
7 |
+
<button class="button" title="<?php echo $this->__('Find Address') ?>" type="button" onclick="findAddressFromPostcode($('billing:addressFinderPostcode').value, 'billing');">
|
8 |
+
<span><span><?php echo $this->__('Find Address') ?></span></span>
|
9 |
+
</button>
|
10 |
+
</div>
|
11 |
+
<div class="addressList clearfix"></div>
|
12 |
+
</div>
|
13 |
+
|
14 |
+
<div id="addressFinderShipping" class="addressFinder">
|
15 |
+
<div class="postcode clearfix" style="display: none;">
|
16 |
+
<label for="shipping:addressFinderPostcode"><?php echo $this->__('Address Finder') ?></label>
|
17 |
+
<div class="input-box">
|
18 |
+
<input type="text" id="shipping:addressFinderPostcode" class="input-text" name="shipping[addressFinderPostcode]" title="<?php echo $this->__('Enter Your Post Code') ?>" value="<?php echo $this->__('Enter Your Post Code') ?>" onfocus="javascript:if(this.value == '<?php echo $this->__('Enter Your Post Code') ?>'){ this.value= ''; }" onblur="javascript:if(this.value == ''){ this.value= '<?php echo $this->__('Enter Your Post Code') ?>'; }" />
|
19 |
+
</div>
|
20 |
+
<button class="button" title="<?php echo $this->__('Find Address') ?>" type="button" onclick="findAddressFromPostcode($('shipping:addressFinderPostcode').value, 'shipping');">
|
21 |
+
<span><span><?php echo $this->__('Find Address') ?></span></span>
|
22 |
+
</button>
|
23 |
+
</div>
|
24 |
+
<div class="addressList clearfix"></div>
|
25 |
+
</div>
|
26 |
+
|
27 |
+
<script type="text/javascript">
|
28 |
+
//<![CDATA[
|
29 |
+
var $billingAddressForm = $('billing-new-address-form');
|
30 |
+
var $addressFinderBilling = $('addressFinderBilling');
|
31 |
+
var $billingPostcode = $addressFinderBilling.select('.postcode')[0];
|
32 |
+
var $billingAddressList = $addressFinderBilling.select('.addressList')[0];
|
33 |
+
|
34 |
+
$billingAddressForm.insert({
|
35 |
+
'top' : $addressFinderBilling
|
36 |
+
});
|
37 |
+
|
38 |
+
$billingPostcode.show();
|
39 |
+
|
40 |
+
var $shippingAddressForm = $('shipping-new-address-form');
|
41 |
+
var $addressFinderShipping = $('addressFinderShipping');
|
42 |
+
var $shippingPostcode = $addressFinderShipping.select('.postcode')[0];
|
43 |
+
var $shippingAddressList = $addressFinderShipping.select('.addressList')[0];
|
44 |
+
|
45 |
+
$shippingAddressForm.insert({
|
46 |
+
'top' : $addressFinderShipping
|
47 |
+
});
|
48 |
+
|
49 |
+
$shippingPostcode.show();
|
50 |
+
|
51 |
+
function findAddressFromPostcode(postcode, addressType) {
|
52 |
+
new Ajax.Request(
|
53 |
+
'<?php echo $this->getUrl('addressfinder/index/findAddressFromPostcode')?>',
|
54 |
+
{
|
55 |
+
method: 'post',
|
56 |
+
parameters: {
|
57 |
+
'postcode' : postcode,
|
58 |
+
'addressType' : addressType
|
59 |
+
},
|
60 |
+
onSuccess: function (transport) {
|
61 |
+
if (addressType === 'shipping') {
|
62 |
+
$shippingAddressList.innerHTML = transport.responseText;
|
63 |
+
}
|
64 |
+
else {
|
65 |
+
$billingAddressList.innerHTML = transport.responseText;
|
66 |
+
}
|
67 |
+
},
|
68 |
+
onFailure: function() {
|
69 |
+
if (addressType === 'shipping') {
|
70 |
+
$shippingAddressList.innerHTML = '<p>Sorry there has been an error.</p>';
|
71 |
+
}
|
72 |
+
else {
|
73 |
+
$billingAddressList.innerHTML = '<p>Sorry there has been an error.</p>';
|
74 |
+
}
|
75 |
+
}
|
76 |
+
}
|
77 |
+
);
|
78 |
+
}
|
79 |
+
|
80 |
+
function populateAddressFields(addressId, addressType) {
|
81 |
+
new Ajax.Request(
|
82 |
+
'<?php echo $this->getUrl('addressfinder/index/getFullAddress')?>',
|
83 |
+
{
|
84 |
+
method:'post',
|
85 |
+
parameters: {
|
86 |
+
'addressid' : addressId
|
87 |
+
},
|
88 |
+
onSuccess: function (transport) {
|
89 |
+
var fullAddress = transport.responseText.split('~');
|
90 |
+
if (addressType === 'shipping') {
|
91 |
+
$('shipping:company').value = fullAddress[1];
|
92 |
+
$('shipping:street1').value = fullAddress[2];
|
93 |
+
$('shipping:street2').value = fullAddress[3];
|
94 |
+
$('shipping:region').value = fullAddress[4];
|
95 |
+
$('shipping:city').value = fullAddress[5];
|
96 |
+
$('shipping:postcode').value = fullAddress[6];
|
97 |
+
}
|
98 |
+
else {
|
99 |
+
$('billing:company').value = fullAddress[1];
|
100 |
+
$('billing:street1').value = fullAddress[2];
|
101 |
+
$('billing:street2').value = fullAddress[3];
|
102 |
+
$('billing:region').value = fullAddress[4];
|
103 |
+
$('billing:city').value = fullAddress[5];
|
104 |
+
$('billing:postcode').value = fullAddress[6];
|
105 |
+
}
|
106 |
+
},
|
107 |
+
onFailure: function() {
|
108 |
+
if (addressType === 'shipping') {
|
109 |
+
$shippingAddressList.innerHTML = '<p>Sorry there has been an error.</p>'
|
110 |
+
}
|
111 |
+
else {
|
112 |
+
$billingAddressList.innerHTML = '<p>Sorry there has been an error.</p>';
|
113 |
+
}
|
114 |
+
}
|
115 |
+
}
|
116 |
+
);
|
117 |
+
}
|
118 |
+
//]]>
|
119 |
+
</script>
|
app/design/frontend/base/default/template/addressfinder/lookup_onestepcheckout.phtml
ADDED
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<div id="addressFinderBilling" class="addressFinder">
|
2 |
+
<div class="postcode clearfix" style="display: none;">
|
3 |
+
<label for="billing:addressFinderPostcode"><?php echo $this->__('Address Finder') ?></label>
|
4 |
+
<div class="input-box">
|
5 |
+
<input type="text" id="billing:addressFinderPostcode" class="input-text" name="billing[addressFinderPostcode]" title="<?php echo $this->__('Enter Your Post Code') ?>" value="<?php echo $this->__('Enter Your Post Code') ?>" onfocus="javascript:if(this.value == '<?php echo $this->__('Enter Your Post Code') ?>'){ this.value= ''; }" onblur="javascript:if(this.value == ''){ this.value= '<?php echo $this->__('Enter Your Post Code') ?>'; }" />
|
6 |
+
</div>
|
7 |
+
<button class="button" title="<?php echo $this->__('Find Address') ?>" type="button" onclick="findAddressFromPostcode($('billing:addressFinderPostcode').value, 'billing');">
|
8 |
+
<span><span><?php echo $this->__('Find Address') ?></span></span>
|
9 |
+
</button>
|
10 |
+
</div>
|
11 |
+
<div class="addressList clearfix"></div>
|
12 |
+
</div>
|
13 |
+
|
14 |
+
<div id="addressFinderShipping" class="addressFinder">
|
15 |
+
<div class="postcode clearfix" style="display: none;">
|
16 |
+
<label for="shipping:addressFinderPostcode"><?php echo $this->__('Address Finder') ?></label>
|
17 |
+
<div class="input-box">
|
18 |
+
<input type="text" id="shipping:addressFinderPostcode" class="input-text" name="shipping[addressFinderPostcode]" title="<?php echo $this->__('Enter Your Post Code') ?>" value="<?php echo $this->__('Enter Your Post Code') ?>" onfocus="javascript:if(this.value == '<?php echo $this->__('Enter Your Post Code') ?>'){ this.value= ''; }" onblur="javascript:if(this.value == ''){ this.value= '<?php echo $this->__('Enter Your Post Code') ?>'; }" />
|
19 |
+
</div>
|
20 |
+
<button class="button" title="<?php echo $this->__('Find Address') ?>" type="button" onclick="findAddressFromPostcode($('shipping:addressFinderPostcode').value, 'shipping');">
|
21 |
+
<span><span><?php echo $this->__('Find Address') ?></span></span>
|
22 |
+
</button>
|
23 |
+
</div>
|
24 |
+
<div class="addressList clearfix"></div>
|
25 |
+
</div>
|
26 |
+
|
27 |
+
<script type="text/javascript">
|
28 |
+
//<![CDATA[
|
29 |
+
var $billingAddressForm = $$('#billing_address_list div.input-box.input-address')[0];
|
30 |
+
var $addressFinderBilling = $('addressFinderBilling');
|
31 |
+
var $billingPostcode = $addressFinderBilling.select('.postcode')[0];
|
32 |
+
var $billingAddressList = $addressFinderBilling.select('.addressList')[0];
|
33 |
+
|
34 |
+
$billingAddressForm.insert({
|
35 |
+
'before' : $addressFinderBilling
|
36 |
+
});
|
37 |
+
|
38 |
+
$billingPostcode.show();
|
39 |
+
|
40 |
+
var $shippingAddressForm = $$('#shipping_address_list div.input-box.input-address')[0];
|
41 |
+
var $addressFinderShipping = $('addressFinderShipping');
|
42 |
+
var $shippingPostcode = $addressFinderShipping.select('.postcode')[0];
|
43 |
+
var $shippingAddressList = $addressFinderShipping.select('.addressList')[0];
|
44 |
+
|
45 |
+
$shippingAddressForm.insert({
|
46 |
+
'before' : $addressFinderShipping
|
47 |
+
});
|
48 |
+
|
49 |
+
$shippingPostcode.show();
|
50 |
+
|
51 |
+
function findAddressFromPostcode(postcode, addressType) {
|
52 |
+
new Ajax.Request(
|
53 |
+
'<?php echo $this->getUrl('addressfinder/index/findAddressFromPostcode')?>',
|
54 |
+
{
|
55 |
+
method: 'post',
|
56 |
+
parameters: {
|
57 |
+
'postcode' : postcode,
|
58 |
+
'addressType' : addressType
|
59 |
+
},
|
60 |
+
onSuccess: function (transport) {
|
61 |
+
if (addressType === 'shipping') {
|
62 |
+
$shippingAddressList.innerHTML = transport.responseText;
|
63 |
+
}
|
64 |
+
else {
|
65 |
+
$billingAddressList.innerHTML = transport.responseText;
|
66 |
+
}
|
67 |
+
},
|
68 |
+
onFailure: function() {
|
69 |
+
if (addressType === 'shipping') {
|
70 |
+
$shippingAddressList.innerHTML = '<p>Sorry there has been an error.</p>';
|
71 |
+
}
|
72 |
+
else {
|
73 |
+
$billingAddressList.innerHTML = '<p>Sorry there has been an error.</p>';
|
74 |
+
}
|
75 |
+
}
|
76 |
+
}
|
77 |
+
);
|
78 |
+
}
|
79 |
+
|
80 |
+
function populateAddressFields(addressId, addressType) {
|
81 |
+
new Ajax.Request(
|
82 |
+
'<?php echo $this->getUrl('addressfinder/index/getFullAddress')?>',
|
83 |
+
{
|
84 |
+
method:'post',
|
85 |
+
parameters: {
|
86 |
+
'addressid' : addressId
|
87 |
+
},
|
88 |
+
onSuccess: function (transport) {
|
89 |
+
var fullAddress = transport.responseText.split('~');
|
90 |
+
if (addressType === 'shipping') {
|
91 |
+
$('shipping:company').value = fullAddress[1];
|
92 |
+
$('shipping:street1').value = fullAddress[2];
|
93 |
+
$('shipping:street2').value = fullAddress[3];
|
94 |
+
$('shipping:region').value = fullAddress[4];
|
95 |
+
$('shipping:city').value = fullAddress[5];
|
96 |
+
$('shipping:postcode').value = fullAddress[6];
|
97 |
+
}
|
98 |
+
else {
|
99 |
+
$('billing:company').value = fullAddress[1];
|
100 |
+
$('billing:street1').value = fullAddress[2];
|
101 |
+
$('billing:street2').value = fullAddress[3];
|
102 |
+
$('billing:region').value = fullAddress[4];
|
103 |
+
$('billing:city').value = fullAddress[5];
|
104 |
+
$('billing:postcode').value = fullAddress[6];
|
105 |
+
}
|
106 |
+
},
|
107 |
+
onFailure: function() {
|
108 |
+
if (addressType === 'shipping') {
|
109 |
+
$shippingAddressList.innerHTML = '<p>Sorry there has been an error.</p>'
|
110 |
+
}
|
111 |
+
else {
|
112 |
+
$billingAddressList.innerHTML = '<p>Sorry there has been an error.</p>';
|
113 |
+
}
|
114 |
+
}
|
115 |
+
}
|
116 |
+
);
|
117 |
+
}
|
118 |
+
//]]>
|
119 |
+
</script>
|
app/design/frontend/base/default/template/addressfinder/shipping.phtml
DELETED
@@ -1,208 +0,0 @@
|
|
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) 2012 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 |
-
<form action="" id="co-shipping-form">
|
28 |
-
<ul class="form-list">
|
29 |
-
<li>
|
30 |
-
<div style="display:inline; width:100%;" id="shipping-findAddress" class="field">
|
31 |
-
<input type="text" title="Enter Your Post Code" class="input-text postcode-finder required-entry" name="shipping-addressFinder" onfocus="javascript:if(this.value == 'Enter Your Post Code'){ this.value= ''; }" onblur="javascript:if(this.value == ''){ this.value= 'Enter Your Post Code'; }" value="Enter Your Post Code" id="shipping-addressFinder">
|
32 |
-
|
33 |
-
<button class="button" title="Find Address" onclick="shippingAddressListFinder($('shipping-addressFinder').value);" type="button"><span><span>Find Address</span></span></button>
|
34 |
-
</div>
|
35 |
-
</li>
|
36 |
-
<li id="shippingAddressList"></li>
|
37 |
-
<?php if ($this->customerHasAddresses()): ?>
|
38 |
-
<li class="wide">
|
39 |
-
<label for="shipping-address-select"><?php echo $this->__('Select a shipping address from your address book or enter a new address.') ?></label>
|
40 |
-
<div class="input-box">
|
41 |
-
<?php echo $this->getAddressesHtmlSelect('shipping') ?>
|
42 |
-
</div>
|
43 |
-
</li>
|
44 |
-
<?php endif ?>
|
45 |
-
<li id="shipping-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif ?>>
|
46 |
-
<fieldset>
|
47 |
-
<input type="hidden" name="shipping[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="shipping:address_id" />
|
48 |
-
<ul>
|
49 |
-
<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>
|
50 |
-
<li class="fields">
|
51 |
-
<div class="fields">
|
52 |
-
<label for="shipping:company"><?php echo $this->__('Company') ?></label>
|
53 |
-
<div class="input-box">
|
54 |
-
<input type="text" id="shipping:company" name="shipping[company]" value="<?php echo $this->escapeHtml($this->getAddress()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" onchange="shipping.setSameAsBilling(false);" />
|
55 |
-
</div>
|
56 |
-
</div>
|
57 |
-
</li>
|
58 |
-
<?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
|
59 |
-
<li class="wide">
|
60 |
-
<label for="shipping:street1" class="required"><em>*</em><?php echo $this->__('Address') ?></label>
|
61 |
-
<div class="input-box">
|
62 |
-
<input type="text" title="<?php echo $this->__('Street Address') ?>" name="shipping[street][]" id="shipping:street1" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" onchange="shipping.setSameAsBilling(false);" />
|
63 |
-
</div>
|
64 |
-
</li>
|
65 |
-
<?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
|
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="shipping[street][]" id="shipping:street<?php echo $_i ?>" value="<?php echo $this->escapeHtml($this->getAddress()->getStreet($_i)) ?>" class="input-text <?php echo $_streetValidationClass ?>" onchange="shipping.setSameAsBilling(false);" />
|
70 |
-
</div>
|
71 |
-
</li>
|
72 |
-
<?php endfor; ?>
|
73 |
-
<?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
|
74 |
-
<li class="wide">
|
75 |
-
<label for="billing:vat_id"><?php echo $this->__('VAT Number'); ?></label>
|
76 |
-
<div class="input-box">
|
77 |
-
<input type="text" id="shipping:vat_id" name="shipping[vat_id]" value="<?php echo $this->escapeHtml($this->getAddress()->getVatId()); ?>" title="<?php echo $this->__('VAT Number'); ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('vat_id') ?>" />
|
78 |
-
</div>
|
79 |
-
</li>
|
80 |
-
<?php endif; ?>
|
81 |
-
<li class="fields">
|
82 |
-
<div class="field">
|
83 |
-
<label for="shipping:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
|
84 |
-
<div class="input-box">
|
85 |
-
<input type="text" title="<?php echo $this->__('City') ?>" name="shipping[city]" value="<?php echo $this->escapeHtml($this->getAddress()->getCity()) ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="shipping:city" onchange="shipping.setSameAsBilling(false);" />
|
86 |
-
</div>
|
87 |
-
</div>
|
88 |
-
<div class="field">
|
89 |
-
<label for="shipping:region" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
|
90 |
-
<div class="input-box">
|
91 |
-
<select id="shipping:region_id" name="shipping[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
|
92 |
-
<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
|
93 |
-
</select>
|
94 |
-
<script type="text/javascript">
|
95 |
-
//<![CDATA[
|
96 |
-
$('shipping:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
|
97 |
-
//]]>
|
98 |
-
</script>
|
99 |
-
<input type="text" id="shipping:region" name="shipping[region]" value="<?php echo $this->escapeHtml($this->getAddress()->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('region') ?>" style="display:none;" />
|
100 |
-
</div>
|
101 |
-
</div>
|
102 |
-
</li>
|
103 |
-
<li class="fields">
|
104 |
-
<div class="field">
|
105 |
-
<label for="shipping:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
|
106 |
-
<div class="input-box">
|
107 |
-
<input type="text" title="<?php echo $this->__('Zip/Postal Code') ?>" name="shipping[postcode]" id="shipping:postcode" value="<?php echo $this->escapeHtml($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" onchange="shipping.setSameAsBilling(false);" />
|
108 |
-
</div>
|
109 |
-
</div>
|
110 |
-
<div class="field">
|
111 |
-
<label for="shipping:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
|
112 |
-
<div class="input-box">
|
113 |
-
<?php echo $this->getCountryHtmlSelect('shipping') ?>
|
114 |
-
</div>
|
115 |
-
</div>
|
116 |
-
</li>
|
117 |
-
<li class="fields">
|
118 |
-
<div class="field">
|
119 |
-
<label for="shipping:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
|
120 |
-
<div class="input-box">
|
121 |
-
<input type="text" name="shipping[telephone]" value="<?php echo $this->escapeHtml($this->getAddress()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" id="shipping:telephone" onchange="shipping.setSameAsBilling(false);" />
|
122 |
-
</div>
|
123 |
-
</div>
|
124 |
-
<div class="field">
|
125 |
-
<label for="shipping:fax"><?php echo $this->__('Fax') ?></label>
|
126 |
-
<div class="input-box">
|
127 |
-
<input type="text" name="shipping[fax]" value="<?php echo $this->escapeHtml($this->getAddress()->getFax()) ?>" title="<?php echo $this->__('Fax') ?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('fax') ?>" id="shipping:fax" onchange="shipping.setSameAsBilling(false);" />
|
128 |
-
</div>
|
129 |
-
</div>
|
130 |
-
</li>
|
131 |
-
<?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
|
132 |
-
<li class="control">
|
133 |
-
<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>
|
134 |
-
<?php else:?>
|
135 |
-
<li class="no-display"><input type="hidden" name="shipping[save_in_address_book]" value="1" /></li>
|
136 |
-
<?php endif;?>
|
137 |
-
</ul>
|
138 |
-
</fieldset>
|
139 |
-
</li>
|
140 |
-
<li class="control">
|
141 |
-
<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>
|
142 |
-
</li>
|
143 |
-
</ul>
|
144 |
-
<div class="buttons-set" id="shipping-buttons-container">
|
145 |
-
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
|
146 |
-
<p class="back-link"><a href="#" onclick="checkout.back(); return false;"><small>« </small><?php echo $this->__('Back') ?></a></p>
|
147 |
-
<button type="button" class="button" title="<?php echo $this->__('Continue') ?>" onclick="shipping.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
|
148 |
-
<span id="shipping-please-wait" class="please-wait" style="display:none;">
|
149 |
-
<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...') ?>
|
150 |
-
</span>
|
151 |
-
</div>
|
152 |
-
</form>
|
153 |
-
<script type="text/javascript">
|
154 |
-
//<![CDATA[
|
155 |
-
var shipping = new Shipping('co-shipping-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveShipping') ?>',
|
156 |
-
'<?php echo $this->getUrl('checkout/onepage/shippingMethod') ?>');
|
157 |
-
var shippingForm = new VarienForm('co-shipping-form');
|
158 |
-
shippingForm.extraChildParams = ' onchange="shipping.setSameAsBilling(false);"';
|
159 |
-
//shippingForm.setElementsRelation('shipping:country_id', 'shipping:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
|
160 |
-
$('shipping-address-select') && shipping.newAddress(!$('shipping-address-select').value);
|
161 |
-
|
162 |
-
var shippingRegionUpdater = new RegionUpdater('shipping:country_id', 'shipping:region', 'shipping:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'shipping:postcode');
|
163 |
-
//]]>
|
164 |
-
</script>
|
165 |
-
|
166 |
-
<script type="text/javascript">
|
167 |
-
//<![CDATA[
|
168 |
-
function shippingAddressListFinder (code) {
|
169 |
-
new Ajax.Request(
|
170 |
-
'<?php echo $this->getUrl('addressfinder/index/shippingaddresslistfinder')?>',
|
171 |
-
{
|
172 |
-
method:'post',
|
173 |
-
parameters: {postcode:code},
|
174 |
-
onSuccess: function (transport) {
|
175 |
-
var response = transport.responseText || "no response text";
|
176 |
-
$('shippingAddressList').innerHTML = response;
|
177 |
-
},
|
178 |
-
onFailure: function() {
|
179 |
-
alert('Something went wrong...')
|
180 |
-
}
|
181 |
-
}
|
182 |
-
);
|
183 |
-
}
|
184 |
-
|
185 |
-
function shippingExactAddressFinder (id) {
|
186 |
-
new Ajax.Request(
|
187 |
-
'<?php echo $this->getUrl('addressfinder/index/shippingexactaddressfinder')?>',
|
188 |
-
{
|
189 |
-
method:'post',
|
190 |
-
parameters: {addressid:id},
|
191 |
-
onSuccess: function (transport) {
|
192 |
-
var response = transport.responseText || "no response text";
|
193 |
-
var fullAddress = response.split('~');
|
194 |
-
$('shipping:company').value = fullAddress[1];
|
195 |
-
$('shipping:street1').value = fullAddress[2];
|
196 |
-
$('shipping:street2').value = fullAddress[3];
|
197 |
-
$('shipping:region').value = fullAddress[4];
|
198 |
-
$('shipping:city').value = fullAddress[5];
|
199 |
-
$('shipping:postcode').value = fullAddress[6];
|
200 |
-
},
|
201 |
-
onFailure: function() {
|
202 |
-
alert('Something went wrong...')
|
203 |
-
}
|
204 |
-
}
|
205 |
-
);
|
206 |
-
}
|
207 |
-
//]]>
|
208 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Lexel_UkAddressFinder</name>
|
4 |
-
<version>0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License v3.0 (OSL-3.0)</license>
|
7 |
<channel>community</channel>
|
@@ -27,11 +27,11 @@ All you need to do is install the extension and then go to System -> Configur
|
|
27 |
The extension is free, however credits are not free and these need to be purchased through the Lexel website.
|
28 |

|
29 |
Please note we are unable to help with custom theme support.</description>
|
30 |
-
<notes>
|
31 |
<authors><author><name>Lexel Software</name><user>lexel_uk</user><email>helpdesk@lexel.co.uk</email></author><author><name>Zodiac Media</name><user>zodiac_media</user><email>info@zodiacmedia.co.uk</email></author></authors>
|
32 |
-
<date>2013-
|
33 |
-
<time>
|
34 |
-
<contents><target name="magecommunity"><dir name="Lexel"><dir name="UkAddressFinder"><dir name="Helper"><file name="Data.php" hash="0af50634eb3c8f98d33d6a99a7838e35"/></dir><dir name="controllers"><file name="IndexController.php" hash="
|
35 |
<compatible/>
|
36 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
37 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Lexel_UkAddressFinder</name>
|
4 |
+
<version>0.3.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License v3.0 (OSL-3.0)</license>
|
7 |
<channel>community</channel>
|
27 |
The extension is free, however credits are not free and these need to be purchased through the Lexel website.
|
28 |

|
29 |
Please note we are unable to help with custom theme support.</description>
|
30 |
+
<notes>Add compatibility for One Step Checkout (http://www.magentocommerce.com/magento-connect/one-step-checkout-v4.html).</notes>
|
31 |
<authors><author><name>Lexel Software</name><user>lexel_uk</user><email>helpdesk@lexel.co.uk</email></author><author><name>Zodiac Media</name><user>zodiac_media</user><email>info@zodiacmedia.co.uk</email></author></authors>
|
32 |
+
<date>2013-11-13</date>
|
33 |
+
<time>11:28:28</time>
|
34 |
+
<contents><target name="magecommunity"><dir name="Lexel"><dir name="UkAddressFinder"><dir name="Helper"><file name="Data.php" hash="0af50634eb3c8f98d33d6a99a7838e35"/></dir><dir name="controllers"><file name="IndexController.php" hash="9b094b1ef16a51981878c1c85016d31c"/></dir><dir name="etc"><file name="config.xml" hash="90d879c4fb343ea3e72e38ea289146aa"/><file name="system.xml" hash="eaa085b4e0b606955a7e9a2934452261"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="addressfinder.xml" hash="2389ccfacfa3cc1b7ab6d9228b0fbfd7"/></dir><dir name="template"><dir name="addressfinder"><file name="lookup_onepage.phtml" hash="38b02bf4280e134607a953c3f7134b34"/><file name="lookup_onestepcheckout.phtml" hash="aa53164b690248967430d15c9c3a38e4"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Lexel_UkAddressFinder.xml" hash="9bbea2ea3a3f53770dcf3d4c15cfead6"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="lexel"><dir name="addressfinder"><file name="onepage.css" hash="b0e2949622f0cc137c35105f92571505"/><file name="onestepcheckout.css" hash="523f7cc82baf842c6c9fe8889677be33"/></dir></dir></dir></dir></dir></dir></target></contents>
|
35 |
<compatible/>
|
36 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
37 |
</package>
|
skin/frontend/base/default/css/lexel/addressfinder/onepage.css
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.addressFinder .postcode {
|
2 |
+
padding-bottom: 8px;
|
3 |
+
}
|
4 |
+
.addressFinder label {
|
5 |
+
float: left;
|
6 |
+
display: none;
|
7 |
+
}
|
8 |
+
.addressFinder .input-box {
|
9 |
+
clear: left;
|
10 |
+
float: left;
|
11 |
+
}
|
12 |
+
.addressFinder button {
|
13 |
+
float: left;
|
14 |
+
padding-left: 13px;
|
15 |
+
}
|
16 |
+
.addressFinder .addressList .input-box select {
|
17 |
+
width: 260px;
|
18 |
+
margin-bottom: 8px;
|
19 |
+
}
|
20 |
+
.addressFinder .addressList p {
|
21 |
+
padding-bottom: 8px;
|
22 |
+
}
|
skin/frontend/base/default/css/lexel/addressfinder/onestepcheckout.css
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
.addressFinder .postcode {
|
2 |
+
padding-bottom: 8px;
|
3 |
+
}
|
4 |
+
.addressFinder label {
|
5 |
+
float: left;
|
6 |
+
display: none;
|
7 |
+
}
|
8 |
+
.addressFinder .input-box {
|
9 |
+
clear: left;
|
10 |
+
float: left;
|
11 |
+
}
|
12 |
+
.addressFinder button {
|
13 |
+
float: left;
|
14 |
+
padding-left: 13px;
|
15 |
+
}
|
16 |
+
.addressFinder .addressList .input-box {
|
17 |
+
width: 100%;
|
18 |
+
}
|
19 |
+
.addressFinder .addressList .input-box select {
|
20 |
+
width: 83%;
|
21 |
+
margin-bottom: 8px;
|
22 |
+
}
|
23 |
+
.addressFinder .addressList p {
|
24 |
+
padding-bottom: 8px;
|
25 |
+
}
|