indabox - Version 1.0.1.2

Version Notes

Improved compatibility with old Magento versions

Download this release

Release Info

Developer IndaBox
Extension indabox
Version 1.0.1.2
Comparing to
See all releases


Code changes from version 1.0.1.1 to 1.0.1.2

app/code/local/IndaBox/StorePickup/Block/Adminhtml/Configuration/Manual.php CHANGED
@@ -3,6 +3,11 @@
3
  class IndaBox_StorePickup_Block_Adminhtml_Configuration_Manual extends Mage_Adminhtml_Block_System_Config_Form_Field
4
  {
5
 
 
 
 
 
 
6
  public function render(Varien_Data_Form_Element_Abstract $element)
7
  {
8
  $message = $this->__('For all the information on installing and configuring the module and IndaBox Merchant Account, you can refer to <a href="%s" target="_blank">this page</a>', 'https://www.indabox.it/magentomodule.html');
3
  class IndaBox_StorePickup_Block_Adminhtml_Configuration_Manual extends Mage_Adminhtml_Block_System_Config_Form_Field
4
  {
5
 
6
+ protected function _decorateRowHtml($element, $html)
7
+ {
8
+ return '<tr id="row_' . $element->getHtmlId() . '">' . $html . '</tr>';
9
+ }
10
+
11
  public function render(Varien_Data_Form_Element_Abstract $element)
12
  {
13
  $message = $this->__('For all the information on installing and configuring the module and IndaBox Merchant Account, you can refer to <a href="%s" target="_blank">this page</a>', 'https://www.indabox.it/magentomodule.html');
app/code/local/IndaBox/StorePickup/Model/Resource/Order/Point.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class IndaBox_StorePickup_Model_Resource_Order_Point extends Mage_Core_Model_Resource_Db_Abstract
4
  {
5
  public function _construct()
6
  {
1
  <?php
2
 
3
+ class IndaBox_StorePickup_Model_Resource_Order_Point extends Mage_Core_Model_Mysql4_Abstract
4
  {
5
  public function _construct()
6
  {
app/code/local/IndaBox/StorePickup/Model/Resource/Order/Point/Collection.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
 
3
- class IndaBox_StorePickup_Model_Resource_Order_Point_Collection extends Mage_Core_Model_Resource_Db_Collection_Abstract
4
  {
5
  public function _construct()
6
  {
1
  <?php
2
 
3
+ class IndaBox_StorePickup_Model_Resource_Order_Point_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
4
  {
5
  public function _construct()
6
  {
app/code/local/IndaBox/StorePickup/etc/config.xml CHANGED
@@ -3,7 +3,7 @@
3
 
4
  <modules>
5
  <IndaBox_StorePickup>
6
- <version>0.1.0</version>
7
  </IndaBox_StorePickup>
8
  </modules>
9
 
3
 
4
  <modules>
5
  <IndaBox_StorePickup>
6
+ <version>0.1.1</version>
7
  </IndaBox_StorePickup>
8
  </modules>
9
 
app/code/local/IndaBox/StorePickup/sql/ibstorepickup_setup/mysql4-install-0.1.0.php ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ $installer = $this;
4
+
5
+ $installer->startSetup();
6
+
7
+ if (!$installer->tableExists($installer->getTable('ibstorepickup/order_point'))) {
8
+ $installer->run("
9
+
10
+ CREATE TABLE IF NOT EXISTS `{$installer->getTable('ibstorepickup/order_point')}` (
11
+ `order_point_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Order Point ID',
12
+ `order_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Order ID',
13
+ `point_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Point ID',
14
+ `is_notified` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Is Notified Flag',
15
+ `point_name` text NOT NULL COMMENT 'Point Name',
16
+ `point_address` text NOT NULL COMMENT 'Point Address',
17
+ `point_data` text NOT NULL COMMENT 'Serialized Point Data',
18
+ PRIMARY KEY (`order_point_id`),
19
+ KEY `IDX_IBSP_ORDER_POINT_ORDER_ID` (`order_id`),
20
+ KEY `IDX_IBSP_ORDER_POINT_POINT_ID` (`point_id`),
21
+ CONSTRAINT `FK_IBSP_ORDER_POINT_ORDER_ID_SALES_FLAT_ORDER_ENTITY_ID` FOREIGN KEY (`order_id`) REFERENCES {$installer->getTable('sales/order')} (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE
22
+ ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Indabox Storepickup Order to Point';
23
+
24
+ ");
25
+
26
+ }
27
+
28
+ $installer->endSetup();
app/design/frontend/base/default/template/ibstorepickup/checkout/onepage/billing.phtml CHANGED
@@ -1,246 +1,20 @@
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) 2013 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
- <?php if ($this->customerHasAddresses()): ?>
31
- <li class="wide">
32
- <label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
33
- <div class="input-box">
34
- <?php echo $this->getAddressesHtmlSelect('billing') ?>
35
- </div>
36
- </li>
37
- <?php endif; ?>
38
- <li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
39
- <fieldset>
40
- <input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
41
- <ul>
42
- <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>
43
- <li class="fields">
44
- <div class="field">
45
- <label for="billing:company"><?php echo $this->__('Company') ?></label>
46
- <div class="input-box">
47
- <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') ?>" />
48
- </div>
49
- </div>
50
- <?php if(!$this->isCustomerLoggedIn()): ?>
51
- <div class="field">
52
- <label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
53
- <div class="input-box">
54
- <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" />
55
- </div>
56
- </div>
57
- <?php endif; ?>
58
- </li>
59
- <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
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->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
64
- </div>
65
- </li>
66
- <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
67
- <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
68
- <li class="wide">
69
- <div class="input-box">
70
- <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 ?>" />
71
- </div>
72
- </li>
73
- <?php endfor; ?>
74
- <?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
75
- <li class="wide">
76
- <label for="billing:vat_id"><?php echo $this->__('VAT Number') ?></label>
77
- <div class="input-box">
78
- <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') ?>" />
79
- </div>
80
- </li>
81
- <?php endif; ?>
82
- <li class="fields">
83
- <div class="field">
84
- <label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
85
- <div class="input-box">
86
- <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" />
87
- </div>
88
- </div>
89
- <div class="field">
90
- <label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
91
- <div class="input-box">
92
- <select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
93
- <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
94
- </select>
95
- <script type="text/javascript">
96
- //<![CDATA[
97
- $('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
98
- //]]>
99
- </script>
100
- <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;" />
101
- </div>
102
- </div>
103
- </li>
104
- <li class="fields">
105
- <div class="field">
106
- <label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
107
- <div class="input-box">
108
- <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') ?>" />
109
- </div>
110
- </div>
111
- <div class="field">
112
- <label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
113
- <div class="input-box">
114
- <?php echo $this->getCountryHtmlSelect('billing') ?>
115
- </div>
116
- </div>
117
- </li>
118
- <li class="fields">
119
- <div class="field">
120
- <label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
121
- <div class="input-box">
122
- <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" />
123
- </div>
124
- </div>
125
- <div class="field">
126
- <label for="billing:fax"><?php echo $this->__('Fax') ?></label>
127
- <div class="input-box">
128
- <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" />
129
- </div>
130
- </div>
131
- </li>
132
- <?php if(!$this->isCustomerLoggedIn()): ?>
133
 
134
- <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
135
- <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
136
- <?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
137
- <li class="fields">
138
- <?php if ($_dob->isEnabled()): ?>
139
- <div class="field">
140
- <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
141
- </div>
142
- <?php endif; ?>
143
- <?php if ($_gender->isEnabled()): ?>
144
- <div class="field">
145
- <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
146
- </div>
147
- <?php endif ?>
148
- </li>
149
- <?php endif ?>
150
-
151
- <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
152
- <?php if ($_taxvat->isEnabled()): ?>
153
- <li>
154
- <?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
155
- </li>
156
- <?php endif ?>
157
-
158
- <li class="fields" id="register-customer-password">
159
- <div class="field">
160
- <label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
161
- <div class="input-box">
162
- <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
163
- </div>
164
- </div>
165
- <div class="field">
166
- <label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
167
- <div class="input-box">
168
- <input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
169
- </div>
170
- </div>
171
- </li>
172
- <?php endif; ?>
173
- <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
174
- <li class="control">
175
- <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>
176
- </li>
177
- <?php else:?>
178
- <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
179
- <?php endif; ?>
180
- <?php echo $this->getChildHtml('form.additional.info'); ?>
181
- </ul>
182
- </fieldset>
183
- </li>
184
- <?php /* Extensions placeholder */ ?>
185
- <?php echo $this->getChildHtml('checkout.onepage.billing.extra')?>
186
- <?php if ($this->canShip()): ?>
187
- <li class="control">
188
- <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>
189
- <li class="control">
190
- <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>
191
- </li>
192
- <?php if (Mage::getStoreConfig('carriers/ibstorepickup/active') && Mage::getStoreConfig('carriers/ibstorepickup/accept')) : ?>
193
- <li class="control">
194
- <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_point" value="1"<?php if (Mage::helper('ibstorepickup')->getUseMethod()) : ?> checked="checked" <?php endif ?> onclick="$('shipping:same_as_billing').checked = true;" class="radio" />
195
- <label for="billing:use_for_shipping_point"><?php echo $this->__('IndaBox Store Pickup') ?></label>
196
- </li>
197
- <?php endif ?>
198
- <?php endif; ?>
199
- </ul>
200
- <?php if (!$this->canShip()): ?>
201
- <input type="hidden" name="billing[use_for_shipping]" value="1" />
202
- <?php endif; ?>
203
- <div class="buttons-set" id="billing-buttons-container">
204
- <p class="required"><?php echo $this->__('* Required Fields') ?></p>
205
- <button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
206
- <span class="please-wait" id="billing-please-wait" style="display:none;">
207
- <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...') ?>
208
- </span>
209
- </div>
210
- </fieldset>
211
- </form>
212
- <script type="text/javascript">
213
- //<![CDATA[
214
- var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
215
- var billingForm = new VarienForm('co-billing-form');
216
-
217
- //billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
218
- $('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
219
-
220
- var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
221
- //]]>
222
- </script>
223
- <?php if ($this->canShip() && Mage::getStoreConfig('carriers/ibstorepickup/active')): ?>
224
- <script type="text/javascript">
225
- //<![CDATA[
226
- var ibStorePickup = new IndaboxStorePickup(
227
- '<?php echo Mage::helper('ibstorepickup')->getChangeMethodUrl(); ?>',
228
- '<?php echo Mage::helper('ibstorepickup')->getSearchUrl(); ?>',
229
- '<?php echo Mage::helper('ibstorepickup')->getLocationUrl(); ?>',
230
- '<?php echo Mage::helper('ibstorepickup')->getMediaUrl(); ?>'
231
- );
232
-
233
- Event.observe('billing:use_for_shipping_point', 'click', function(event){
234
- ibStorePickup.setUseStorePickup(true);
235
- });
236
-
237
- Event.observe('billing:use_for_shipping_yes', 'click', function(event){
238
- ibStorePickup.setUseStorePickup(false);
239
- });
240
-
241
- Event.observe('billing:use_for_shipping_no', 'click', function(event){
242
- ibStorePickup.setUseStorePickup(false);
243
- });
244
- //]]>
245
- </script>
246
- <?php endif ?>
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ $version = Mage::getVersionInfo();
4
+ $generation = $version['major'] . '.' . $version['minor'];
5
+
6
+ switch ($generation)
7
+ {
8
+ case '1.5':
9
+ case '1.6':
10
+ $template = 'billing_15.phtml';
11
+ break;
12
+
13
+ case '1.7':
14
+ case '1.8':
15
+ default:
16
+ $template = 'billing_17.phtml';
17
+ break;
18
+ }
19
+
20
+ include(dirname(__FILE__) . '/' . $template);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/design/frontend/base/default/template/ibstorepickup/checkout/onepage/billing_15.phtml ADDED
@@ -0,0 +1,233 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ <form id="co-billing-form" action="">
28
+ <fieldset>
29
+ <ul class="form-list">
30
+ <?php if ($this->customerHasAddresses()): ?>
31
+ <li class="wide">
32
+ <label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
33
+ <div class="input-box">
34
+ <?php echo $this->getAddressesHtmlSelect('billing') ?>
35
+ </div>
36
+ </li>
37
+ <?php endif; ?>
38
+ <li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
39
+ <fieldset>
40
+ <input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
41
+ <ul>
42
+ <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>
43
+ <li class="fields">
44
+ <div class="field">
45
+ <label for="billing:company"><?php echo $this->__('Company') ?></label>
46
+ <div class="input-box">
47
+ <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" />
48
+ </div>
49
+ </div>
50
+ <?php if(!$this->isCustomerLoggedIn()): ?>
51
+ <div class="field">
52
+ <label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
53
+ <div class="input-box">
54
+ <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" />
55
+ </div>
56
+ </div>
57
+ <?php endif ?>
58
+ </li>
59
+ <li class="wide">
60
+ <label for="billing: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="billing[street][]" id="billing:street1" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(1)) ?>" class="input-text required-entry" />
63
+ </div>
64
+ </li>
65
+ <?php for ($_i=2, $_n=$this->helper('customer/address')->getStreetLines(); $_i<=$_n; $_i++): ?>
66
+ <li class="wide">
67
+ <div class="input-box">
68
+ <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" />
69
+ </div>
70
+ </li>
71
+ <?php endfor ?>
72
+ <li class="fields">
73
+ <div class="field">
74
+ <label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
75
+ <div class="input-box">
76
+ <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" />
77
+ </div>
78
+ </div>
79
+ <div class="field">
80
+ <label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
81
+ <div class="input-box">
82
+ <select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
83
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
84
+ </select>
85
+ <script type="text/javascript">
86
+ //<![CDATA[
87
+ $('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
88
+ //]]>
89
+ </script>
90
+ <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;" />
91
+ </div>
92
+ </div>
93
+ </li>
94
+ <li class="fields">
95
+ <div class="field">
96
+ <label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
97
+ <div class="input-box">
98
+ <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" />
99
+ </div>
100
+ </div>
101
+ <div class="field">
102
+ <label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
103
+ <div class="input-box">
104
+ <?php echo $this->getCountryHtmlSelect('billing') ?>
105
+ </div>
106
+ </div>
107
+ </li>
108
+ <li class="fields">
109
+ <div class="field">
110
+ <label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
111
+ <div class="input-box">
112
+ <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" />
113
+ </div>
114
+ </div>
115
+ <div class="field">
116
+ <label for="billing:fax"><?php echo $this->__('Fax') ?></label>
117
+ <div class="input-box">
118
+ <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" />
119
+ </div>
120
+ </div>
121
+ </li>
122
+ <?php if(!$this->isCustomerLoggedIn()): ?>
123
+
124
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
125
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
126
+ <?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
127
+ <li class="fields">
128
+ <?php if ($_dob->isEnabled()): ?>
129
+ <div class="field">
130
+ <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
131
+ </div>
132
+ <?php endif; ?>
133
+ <?php if ($_gender->isEnabled()): ?>
134
+ <div class="field">
135
+ <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
136
+ </div>
137
+ <?php endif ?>
138
+ </li>
139
+ <?php endif ?>
140
+
141
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
142
+ <?php if ($_taxvat->isEnabled()): ?>
143
+ <li>
144
+ <?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
145
+ </li>
146
+ <?php endif ?>
147
+
148
+ <li class="fields" id="register-customer-password">
149
+ <div class="field">
150
+ <label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
151
+ <div class="input-box">
152
+ <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
153
+ </div>
154
+ </div>
155
+ <div class="field">
156
+ <label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
157
+ <div class="input-box">
158
+ <input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
159
+ </div>
160
+ </div>
161
+ </li>
162
+ <?php endif; ?>
163
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
164
+ <li class="control">
165
+ <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>
166
+ </li>
167
+ <?php else:?>
168
+ <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
169
+ <?php endif; ?>
170
+ </ul>
171
+ </fieldset>
172
+ </li>
173
+ <?php if ($this->canShip()): ?>
174
+ <li class="control">
175
+ <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>
176
+ <li class="control">
177
+ <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>
178
+ </li>
179
+ <?php if (Mage::getStoreConfig('carriers/ibstorepickup/active') && Mage::getStoreConfig('carriers/ibstorepickup/accept')) : ?>
180
+ <li class="control">
181
+ <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_point" value="1"<?php if (Mage::helper('ibstorepickup')->getUseMethod()) : ?> checked="checked" <?php endif ?> onclick="$('shipping:same_as_billing').checked = true;" class="radio" />
182
+ <label for="billing:use_for_shipping_point"><?php echo $this->__('IndaBox Store Pickup') ?></label>
183
+ </li>
184
+ <?php endif ?>
185
+ <?php endif; ?>
186
+ </ul>
187
+ <?php if (!$this->canShip()): ?>
188
+ <input type="hidden" name="billing[use_for_shipping]" value="1" />
189
+ <?php endif; ?>
190
+ <div class="buttons-set" id="billing-buttons-container">
191
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
192
+ <button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
193
+ <span class="please-wait" id="billing-please-wait" style="display:none;">
194
+ <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...') ?>
195
+ </span>
196
+ </div>
197
+ </fieldset>
198
+ </form>
199
+ <script type="text/javascript">
200
+ //<![CDATA[
201
+ var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
202
+ var billingForm = new VarienForm('co-billing-form');
203
+
204
+ //billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
205
+ $('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
206
+
207
+ var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', countryRegions, undefined, 'billing:postcode');
208
+ //]]>
209
+ </script>
210
+ <?php if ($this->canShip() && Mage::getStoreConfig('carriers/ibstorepickup/active')): ?>
211
+ <script type="text/javascript">
212
+ //<![CDATA[
213
+ var ibStorePickup = new IndaboxStorePickup(
214
+ '<?php echo Mage::helper('ibstorepickup')->getChangeMethodUrl(); ?>',
215
+ '<?php echo Mage::helper('ibstorepickup')->getSearchUrl(); ?>',
216
+ '<?php echo Mage::helper('ibstorepickup')->getLocationUrl(); ?>',
217
+ '<?php echo Mage::helper('ibstorepickup')->getMediaUrl(); ?>'
218
+ );
219
+
220
+ Event.observe('billing:use_for_shipping_point', 'click', function(event){
221
+ ibStorePickup.setUseStorePickup(true);
222
+ });
223
+
224
+ Event.observe('billing:use_for_shipping_yes', 'click', function(event){
225
+ ibStorePickup.setUseStorePickup(false);
226
+ });
227
+
228
+ Event.observe('billing:use_for_shipping_no', 'click', function(event){
229
+ ibStorePickup.setUseStorePickup(false);
230
+ });
231
+ //]]>
232
+ </script>
233
+ <?php endif ?>
app/design/frontend/base/default/template/ibstorepickup/checkout/onepage/billing_17.phtml ADDED
@@ -0,0 +1,246 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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) 2013 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
+ <?php if ($this->customerHasAddresses()): ?>
31
+ <li class="wide">
32
+ <label for="billing-address-select"><?php echo $this->__('Select a billing address from your address book or enter a new address.') ?></label>
33
+ <div class="input-box">
34
+ <?php echo $this->getAddressesHtmlSelect('billing') ?>
35
+ </div>
36
+ </li>
37
+ <?php endif; ?>
38
+ <li id="billing-new-address-form"<?php if ($this->customerHasAddresses()): ?> style="display:none;"<?php endif; ?>>
39
+ <fieldset>
40
+ <input type="hidden" name="billing[address_id]" value="<?php echo $this->getAddress()->getId() ?>" id="billing:address_id" />
41
+ <ul>
42
+ <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>
43
+ <li class="fields">
44
+ <div class="field">
45
+ <label for="billing:company"><?php echo $this->__('Company') ?></label>
46
+ <div class="input-box">
47
+ <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') ?>" />
48
+ </div>
49
+ </div>
50
+ <?php if(!$this->isCustomerLoggedIn()): ?>
51
+ <div class="field">
52
+ <label for="billing:email" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
53
+ <div class="input-box">
54
+ <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" />
55
+ </div>
56
+ </div>
57
+ <?php endif; ?>
58
+ </li>
59
+ <?php $_streetValidationClass = $this->helper('customer/address')->getAttributeValidationClass('street'); ?>
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->escapeHtml($this->getAddress()->getStreet(1)) ?>" class="input-text <?php echo $_streetValidationClass ?>" />
64
+ </div>
65
+ </li>
66
+ <?php $_streetValidationClass = trim(str_replace('required-entry', '', $_streetValidationClass)); ?>
67
+ <?php for ($_i = 2, $_n = $this->helper('customer/address')->getStreetLines(); $_i <= $_n; $_i++): ?>
68
+ <li class="wide">
69
+ <div class="input-box">
70
+ <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 ?>" />
71
+ </div>
72
+ </li>
73
+ <?php endfor; ?>
74
+ <?php if ($this->helper('customer/address')->isVatAttributeVisible()) : ?>
75
+ <li class="wide">
76
+ <label for="billing:vat_id"><?php echo $this->__('VAT Number') ?></label>
77
+ <div class="input-box">
78
+ <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') ?>" />
79
+ </div>
80
+ </li>
81
+ <?php endif; ?>
82
+ <li class="fields">
83
+ <div class="field">
84
+ <label for="billing:city" class="required"><em>*</em><?php echo $this->__('City') ?></label>
85
+ <div class="input-box">
86
+ <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" />
87
+ </div>
88
+ </div>
89
+ <div class="field">
90
+ <label for="billing:region_id" class="required"><em>*</em><?php echo $this->__('State/Province') ?></label>
91
+ <div class="input-box">
92
+ <select id="billing:region_id" name="billing[region_id]" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
93
+ <option value=""><?php echo $this->__('Please select region, state or province') ?></option>
94
+ </select>
95
+ <script type="text/javascript">
96
+ //<![CDATA[
97
+ $('billing:region_id').setAttribute('defaultValue', "<?php echo $this->getAddress()->getRegionId() ?>");
98
+ //]]>
99
+ </script>
100
+ <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;" />
101
+ </div>
102
+ </div>
103
+ </li>
104
+ <li class="fields">
105
+ <div class="field">
106
+ <label for="billing:postcode" class="required"><em>*</em><?php echo $this->__('Zip/Postal Code') ?></label>
107
+ <div class="input-box">
108
+ <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') ?>" />
109
+ </div>
110
+ </div>
111
+ <div class="field">
112
+ <label for="billing:country_id" class="required"><em>*</em><?php echo $this->__('Country') ?></label>
113
+ <div class="input-box">
114
+ <?php echo $this->getCountryHtmlSelect('billing') ?>
115
+ </div>
116
+ </div>
117
+ </li>
118
+ <li class="fields">
119
+ <div class="field">
120
+ <label for="billing:telephone" class="required"><em>*</em><?php echo $this->__('Telephone') ?></label>
121
+ <div class="input-box">
122
+ <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" />
123
+ </div>
124
+ </div>
125
+ <div class="field">
126
+ <label for="billing:fax"><?php echo $this->__('Fax') ?></label>
127
+ <div class="input-box">
128
+ <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" />
129
+ </div>
130
+ </div>
131
+ </li>
132
+ <?php if(!$this->isCustomerLoggedIn()): ?>
133
+
134
+ <?php $_dob = $this->getLayout()->createBlock('customer/widget_dob') ?>
135
+ <?php $_gender = $this->getLayout()->createBlock('customer/widget_gender') ?>
136
+ <?php if ($_dob->isEnabled() || $_gender->isEnabled()): ?>
137
+ <li class="fields">
138
+ <?php if ($_dob->isEnabled()): ?>
139
+ <div class="field">
140
+ <?php echo $_dob->setDate($this->getQuote()->getCustomerDob())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
141
+ </div>
142
+ <?php endif; ?>
143
+ <?php if ($_gender->isEnabled()): ?>
144
+ <div class="field">
145
+ <?php echo $_gender->setGender($this->getQuote()->getCustomerGender())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
146
+ </div>
147
+ <?php endif ?>
148
+ </li>
149
+ <?php endif ?>
150
+
151
+ <?php $_taxvat = $this->getLayout()->createBlock('customer/widget_taxvat') ?>
152
+ <?php if ($_taxvat->isEnabled()): ?>
153
+ <li>
154
+ <?php echo $_taxvat->setTaxvat($this->getQuote()->getCustomerTaxvat())->setFieldIdFormat('billing:%s')->setFieldNameFormat('billing[%s]')->toHtml() ?>
155
+ </li>
156
+ <?php endif ?>
157
+
158
+ <li class="fields" id="register-customer-password">
159
+ <div class="field">
160
+ <label for="billing:customer_password" class="required"><em>*</em><?php echo $this->__('Password') ?></label>
161
+ <div class="input-box">
162
+ <input type="password" name="billing[customer_password]" id="billing:customer_password" title="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
163
+ </div>
164
+ </div>
165
+ <div class="field">
166
+ <label for="billing:confirm_password" class="required"><em>*</em><?php echo $this->__('Confirm Password') ?></label>
167
+ <div class="input-box">
168
+ <input type="password" name="billing[confirm_password]" title="<?php echo $this->__('Confirm Password') ?>" id="billing:confirm_password" class="input-text required-entry validate-cpassword" />
169
+ </div>
170
+ </div>
171
+ </li>
172
+ <?php endif; ?>
173
+ <?php if ($this->isCustomerLoggedIn() && $this->customerHasAddresses()):?>
174
+ <li class="control">
175
+ <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>
176
+ </li>
177
+ <?php else:?>
178
+ <li class="no-display"><input type="hidden" name="billing[save_in_address_book]" value="1" /></li>
179
+ <?php endif; ?>
180
+ <?php echo $this->getChildHtml('form.additional.info'); ?>
181
+ </ul>
182
+ </fieldset>
183
+ </li>
184
+ <?php /* Extensions placeholder */ ?>
185
+ <?php echo $this->getChildHtml('checkout.onepage.billing.extra')?>
186
+ <?php if ($this->canShip()): ?>
187
+ <li class="control">
188
+ <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>
189
+ <li class="control">
190
+ <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>
191
+ </li>
192
+ <?php if (Mage::getStoreConfig('carriers/ibstorepickup/active') && Mage::getStoreConfig('carriers/ibstorepickup/accept')) : ?>
193
+ <li class="control">
194
+ <input type="radio" name="billing[use_for_shipping]" id="billing:use_for_shipping_point" value="1"<?php if (Mage::helper('ibstorepickup')->getUseMethod()) : ?> checked="checked" <?php endif ?> onclick="$('shipping:same_as_billing').checked = true;" class="radio" />
195
+ <label for="billing:use_for_shipping_point"><?php echo $this->__('IndaBox Store Pickup') ?></label>
196
+ </li>
197
+ <?php endif ?>
198
+ <?php endif; ?>
199
+ </ul>
200
+ <?php if (!$this->canShip()): ?>
201
+ <input type="hidden" name="billing[use_for_shipping]" value="1" />
202
+ <?php endif; ?>
203
+ <div class="buttons-set" id="billing-buttons-container">
204
+ <p class="required"><?php echo $this->__('* Required Fields') ?></p>
205
+ <button type="button" title="<?php echo $this->__('Continue') ?>" class="button" onclick="billing.save()"><span><span><?php echo $this->__('Continue') ?></span></span></button>
206
+ <span class="please-wait" id="billing-please-wait" style="display:none;">
207
+ <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...') ?>
208
+ </span>
209
+ </div>
210
+ </fieldset>
211
+ </form>
212
+ <script type="text/javascript">
213
+ //<![CDATA[
214
+ var billing = new Billing('co-billing-form', '<?php echo $this->getUrl('checkout/onepage/getAddress') ?>address/', '<?php echo $this->getUrl('checkout/onepage/saveBilling') ?>');
215
+ var billingForm = new VarienForm('co-billing-form');
216
+
217
+ //billingForm.setElementsRelation('billing:country_id', 'billing:region', '<?php echo $this->getUrl('directory/json/childRegion') ?>', '<?php echo $this->__('Select State/Province...') ?>');
218
+ $('billing-address-select') && billing.newAddress(!$('billing-address-select').value);
219
+
220
+ var billingRegionUpdater = new RegionUpdater('billing:country_id', 'billing:region', 'billing:region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'billing:postcode');
221
+ //]]>
222
+ </script>
223
+ <?php if ($this->canShip() && Mage::getStoreConfig('carriers/ibstorepickup/active')): ?>
224
+ <script type="text/javascript">
225
+ //<![CDATA[
226
+ var ibStorePickup = new IndaboxStorePickup(
227
+ '<?php echo Mage::helper('ibstorepickup')->getChangeMethodUrl(); ?>',
228
+ '<?php echo Mage::helper('ibstorepickup')->getSearchUrl(); ?>',
229
+ '<?php echo Mage::helper('ibstorepickup')->getLocationUrl(); ?>',
230
+ '<?php echo Mage::helper('ibstorepickup')->getMediaUrl(); ?>'
231
+ );
232
+
233
+ Event.observe('billing:use_for_shipping_point', 'click', function(event){
234
+ ibStorePickup.setUseStorePickup(true);
235
+ });
236
+
237
+ Event.observe('billing:use_for_shipping_yes', 'click', function(event){
238
+ ibStorePickup.setUseStorePickup(false);
239
+ });
240
+
241
+ Event.observe('billing:use_for_shipping_no', 'click', function(event){
242
+ ibStorePickup.setUseStorePickup(false);
243
+ });
244
+ //]]>
245
+ </script>
246
+ <?php endif ?>
js/indabox/markerclusterer.js CHANGED
@@ -1300,7 +1300,7 @@ ClusterIcon.prototype['onAdd'] = ClusterIcon.prototype.onAdd;
1300
  ClusterIcon.prototype['draw'] = ClusterIcon.prototype.draw;
1301
  ClusterIcon.prototype['onRemove'] = ClusterIcon.prototype.onRemove;
1302
 
1303
- Object.keys = Object.keys || function(o) {
1304
  var result = [];
1305
  for(var name in o) {
1306
  if (o.hasOwnProperty(name))
1300
  ClusterIcon.prototype['draw'] = ClusterIcon.prototype.draw;
1301
  ClusterIcon.prototype['onRemove'] = ClusterIcon.prototype.onRemove;
1302
 
1303
+ Object.keys = /*Object.keys || */function(o) {
1304
  var result = [];
1305
  for(var name in o) {
1306
  if (o.hasOwnProperty(name))
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>indabox</name>
4
- <version>1.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>
8
  <extends/>
9
  <summary>IndaBox Shipping Method Extension</summary>
10
  <description>Allow to use shipping with IndaBox</description>
11
- <notes>First stable release</notes>
12
  <authors><author><name>IndaBox</name><user>indabox</user><email>info@indabox.it</email></author><author><name>Advanced Logic</name><user>alogic</user><email>advancedlogiceu@gmail.com</email></author></authors>
13
- <date>2014-06-11</date>
14
- <time>12:16:35</time>
15
- <contents><target name="magelocal"><dir name="IndaBox"><dir name="StorePickup"><dir name="Block"><dir name="Adminhtml"><dir name="Configuration"><file name="Manual.php" hash="1ea9346d7e7d04bb4dc4f4f8dfb9be82"/></dir></dir><dir name="Checkout"><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="340a0a40207e30252a4fc08671be8a46"/></dir><dir name="Shipping"><dir name="Method"><file name="Available.php" hash="967c98f5c0bcd57ca8c793e1f8de2498"/></dir></dir></dir></dir><file name="Map.php" hash="2c644a416a2ffa7b23a19ed6ef701690"/></dir><file name="Exception.php" hash="a7e958b8282d8bd49d658edfad5df19e"/><dir name="Helper"><file name="Config.php" hash="31dba4d9d880082528218bbcd843db2c"/><file name="Data.php" hash="40a1bb55faa368ea74ac3b8cbf5a430f"/></dir><dir name="Model"><file name="Api.php" hash="585755e2c2658c18f5192ad619a339d4"/><dir name="Carrier"><file name="Storepickup.php" hash="04c74ad0e3390b6f1f5d7d3f66cb4b98"/></dir><file name="GoogleMaps.php" hash="c2eb3bceb545b0e10b689f7de0866778"/><file name="Observer.php" hash="68789fa99acefc675193032da3f720bd"/><dir name="Order"><file name="Point.php" hash="657eda40931dd6feb86b974bb36f5d96"/></dir><file name="Point.php" hash="cedd47800610db090a8937cbe8066571"/><file name="Points.php" hash="784d98055d815e48f20a4c302304d817"/><dir name="Resource"><dir name="Order"><dir name="Point"><file name="Collection.php" hash="7b4e48ec040ed1f4e44abe5a9a964daa"/></dir><file name="Point.php" hash="31a9898dbbe274afe18d6bf30f5eeb9e"/></dir></dir><dir name="Source"><file name="Payment.php" hash="f223a5951a18f2b293656fb696d4ac57"/><file name="Selectorpayment.php" hash="82f18db0f8be393a01d234d4f9c4fbc4"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="8891642df2404ab74d5804a8a74ffe5d"/></dir><dir name="etc"><file name="config.xml" hash="af7f36e74ec99ce89efd810141c04df2"/><file name="jstranslator.xml" hash="8ec2ada62b1484f3c6141006a3c4d184"/><file name="system.xml" hash="68c44ba242835e97869be4f578885b61"/></dir><dir name="sql"><dir name="ibstorepickup_setup"><file name="install-0.1.0.php" hash="32c4475a704617e53a92dad17a91000e"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="indabox"><file name="markerclusterer.js" hash="6c3ce8c9377f8edf520c3cee2272bc29"/><file name="storepickup.js" hash="efe49a4d3b914bc8d79eb0cb33ff8680"/></dir></dir><dir name="app"><dir name="etc"><dir name="modules"><file name="IndaBox_StorePickup.xml" hash="bc600feadf12b176c134158ca2f12726"/></dir></dir></dir></target><target name="magemedia"><dir name="indabox"><file name="marker_location.png" hash="000a6513abbe2c9683b19f49873710c5"/><file name="marker_point.png" hash="ea488afc95fd4713c3ecbfcb7a0cfb38"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="ibstorepickup"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="9e2ec2ee9e469037af8ba3d70a718d2c"/></dir></dir><file name="map.phtml" hash="d60d7afa71cdbf48a9c7c5577849e21f"/></dir></dir><dir name="layout"><file name="ibstorepickup.xml" hash="a8fd146391dc8ece400893e4034344ec"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="indabox"><dir><dir name="css"><file name="storepickup.css" hash="30f63f16089efea263bb247e9e8888bd"/></dir><dir name="images"><file name="opc-ajax-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="it_IT"><file name="IndaBox_StorePickup.csv" hash="11bf579e01afd50d5207ddda8f9d56f4"/></dir><dir name="en_US"><file name="IndaBox_StorePickup.csv" hash="86bdcd9e56711b3f98461a5e1ef2e41a"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>indabox</name>
4
+ <version>1.0.1.2</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>
8
  <extends/>
9
  <summary>IndaBox Shipping Method Extension</summary>
10
  <description>Allow to use shipping with IndaBox</description>
11
+ <notes>Improved compatibility with old Magento versions</notes>
12
  <authors><author><name>IndaBox</name><user>indabox</user><email>info@indabox.it</email></author><author><name>Advanced Logic</name><user>alogic</user><email>advancedlogiceu@gmail.com</email></author></authors>
13
+ <date>2014-07-16</date>
14
+ <time>10:24:22</time>
15
+ <contents><target name="magelocal"><dir name="IndaBox"><dir name="StorePickup"><dir name="Block"><dir name="Adminhtml"><dir name="Configuration"><file name="Manual.php" hash="c30c06ac6e4df05cf041fc22dc643854"/></dir></dir><dir name="Checkout"><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="340a0a40207e30252a4fc08671be8a46"/></dir><dir name="Shipping"><dir name="Method"><file name="Available.php" hash="967c98f5c0bcd57ca8c793e1f8de2498"/></dir></dir></dir></dir><file name="Map.php" hash="2c644a416a2ffa7b23a19ed6ef701690"/></dir><file name="Exception.php" hash="a7e958b8282d8bd49d658edfad5df19e"/><dir name="Helper"><file name="Config.php" hash="31dba4d9d880082528218bbcd843db2c"/><file name="Data.php" hash="40a1bb55faa368ea74ac3b8cbf5a430f"/></dir><dir name="Model"><file name="Api.php" hash="585755e2c2658c18f5192ad619a339d4"/><dir name="Carrier"><file name="Storepickup.php" hash="04c74ad0e3390b6f1f5d7d3f66cb4b98"/></dir><file name="GoogleMaps.php" hash="c2eb3bceb545b0e10b689f7de0866778"/><file name="Observer.php" hash="68789fa99acefc675193032da3f720bd"/><dir name="Order"><file name="Point.php" hash="657eda40931dd6feb86b974bb36f5d96"/></dir><file name="Point.php" hash="cedd47800610db090a8937cbe8066571"/><file name="Points.php" hash="784d98055d815e48f20a4c302304d817"/><dir name="Resource"><dir name="Order"><dir name="Point"><file name="Collection.php" hash="2c7417314e0d254ef77e12329f813207"/></dir><file name="Point.php" hash="da6e3f1c3caaf9b0365c7cdc8fcba644"/></dir></dir><dir name="Source"><file name="Payment.php" hash="f223a5951a18f2b293656fb696d4ac57"/><file name="Selectorpayment.php" hash="82f18db0f8be393a01d234d4f9c4fbc4"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="8891642df2404ab74d5804a8a74ffe5d"/></dir><dir name="etc"><file name="config.xml" hash="d43d0246f5911707f2f513ae2a89e729"/><file name="jstranslator.xml" hash="8ec2ada62b1484f3c6141006a3c4d184"/><file name="system.xml" hash="68c44ba242835e97869be4f578885b61"/></dir><dir name="sql"><dir name="ibstorepickup_setup"><file name="install-0.1.0.php" hash="32c4475a704617e53a92dad17a91000e"/><file name="mysql4-install-0.1.0.php" hash="20ad32797a42d074579aa372479e94df"/></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="indabox"><file name="markerclusterer.js" hash="1bcedf8ebca05ff5737878116582f629"/><file name="storepickup.js" hash="efe49a4d3b914bc8d79eb0cb33ff8680"/></dir></dir><dir name="app"><dir name="etc"><dir name="modules"><file name="IndaBox_StorePickup.xml" hash="bc600feadf12b176c134158ca2f12726"/></dir></dir></dir></target><target name="magemedia"><dir name="indabox"><file name="marker_location.png" hash="000a6513abbe2c9683b19f49873710c5"/><file name="marker_point.png" hash="ea488afc95fd4713c3ecbfcb7a0cfb38"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="ibstorepickup"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="b5ceae67cd76b024f3e9de05acc817a5"/><file name="billing_15.phtml" hash="86da377bf97808c083a6c7d63f054e23"/><file name="billing_17.phtml" hash="8a55e9a25f24f50a534f9e095ce958f9"/></dir></dir><file name="map.phtml" hash="d60d7afa71cdbf48a9c7c5577849e21f"/></dir></dir><dir name="layout"><file name="ibstorepickup.xml" hash="a8fd146391dc8ece400893e4034344ec"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="indabox"><dir><dir name="css"><file name="storepickup.css" hash="30f63f16089efea263bb247e9e8888bd"/></dir><dir name="images"><file name="opc-ajax-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="it_IT"><file name="IndaBox_StorePickup.csv" hash="11bf579e01afd50d5207ddda8f9d56f4"/></dir><dir name="en_US"><file name="IndaBox_StorePickup.csv" hash="86bdcd9e56711b3f98461a5e1ef2e41a"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
  </package>