Eadesigndev_Shipestimation - Version 1.0.2

Version Notes

Add city input

Download this release

Release Info

Developer EaDesign
Extension Eadesigndev_Shipestimation
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

app/code/local/Eadesigndev/Shipestimation/controllers/IndexController.php CHANGED
@@ -32,6 +32,7 @@ class Eadesigndev_Shipestimation_IndexController extends Mage_Core_Controller_Fr
32
 
33
  $country = $this->getRequest()->getParam('country_id');
34
  $regionId = $this->getRequest()->getParam('region_id');
 
35
  $zipId = $this->getRequest()->getParam('zip');
36
  $productId = $this->getRequest()->getParam('productId');
37
 
@@ -42,6 +43,7 @@ class Eadesigndev_Shipestimation_IndexController extends Mage_Core_Controller_Fr
42
  $shippingAddress = $quote->getShippingAddress();
43
  $shippingAddress->setCountryId($country);
44
  $shippingAddress->setRegionId($regionId);
 
45
  $shippingAddress->setPostcode($zipId);
46
  $shippingAddress->setCollectShippingRates(true);
47
 
32
 
33
  $country = $this->getRequest()->getParam('country_id');
34
  $regionId = $this->getRequest()->getParam('region_id');
35
+ $cityId = $this->getRequest()->getParam('city_id');
36
  $zipId = $this->getRequest()->getParam('zip');
37
  $productId = $this->getRequest()->getParam('productId');
38
 
43
  $shippingAddress = $quote->getShippingAddress();
44
  $shippingAddress->setCountryId($country);
45
  $shippingAddress->setRegionId($regionId);
46
+ $shippingAddress->setCity($cityId);
47
  $shippingAddress->setPostcode($zipId);
48
  $shippingAddress->setCollectShippingRates(true);
49
 
app/code/local/Eadesigndev/Shipestimation/etc/config.xml CHANGED
@@ -22,7 +22,7 @@
22
  <config>
23
  <modules>
24
  <Eadesigndev_Shipestimation>
25
- <version>1.0.1</version>
26
  </Eadesigndev_Shipestimation>
27
  </modules>
28
  <global>
22
  <config>
23
  <modules>
24
  <Eadesigndev_Shipestimation>
25
+ <version>1.0.2</version>
26
  </Eadesigndev_Shipestimation>
27
  </modules>
28
  <global>
app/design/frontend/base/default/template/eadesigndev/shipestimation/catalog/product/view/estimate.phtml CHANGED
@@ -55,6 +55,17 @@ $ifTrue=Mage::Helper('shipestimation')->ifItApplies();
55
  </div>
56
  </li>
57
  </div>
 
 
 
 
 
 
 
 
 
 
 
58
  <div class="zip-code">
59
  <label
60
  for="postcode"<?php if ($shippingblock->isZipCodeRequired()) echo ' class="required"' ?>><?php if ($shippingblock->isZipCodeRequired()) echo '<em>*</em>' ?><?php echo Mage::helper('checkout')->__('Zip/Postal Code') ?></label>
@@ -110,6 +121,7 @@ $ifTrue=Mage::Helper('shipestimation')->ifItApplies();
110
 
111
  var country = $('country').value;
112
  var regionId = $('region_id').value;
 
113
  var zip = $('postcode').value;
114
 
115
  <?php if($_product):?>
@@ -138,6 +150,7 @@ $ifTrue=Mage::Helper('shipestimation')->ifItApplies();
138
  parameters: {
139
  country_id: country,
140
  region_id: regionId,
 
141
  zip_id: zip,
142
  productId: productId
143
  }
55
  </div>
56
  </li>
57
  </div>
58
+ <div class="city">
59
+ <label
60
+ for="city_id"<?php if ($shippingblock->isCityRequired()) echo ' class="required"' ?>><?php if ($shippingblock->isCityRequired()) echo '<em>*</em>' ?><?php echo Mage::helper('checkout')->__('City') ?></label>
61
+
62
+ <div class="input-box">
63
+ <input
64
+ class="input-text validate-city<?php if ($shippingblock->isCityRequired()): ?> required-entry<?php endif; ?>"
65
+ type="text" id="city_id" name="estimate_city"
66
+ value="<?php echo $shippingblock->escapeHtml($shippingblock->isCityRequired()) ?>"/>
67
+ </div>
68
+ </div>
69
  <div class="zip-code">
70
  <label
71
  for="postcode"<?php if ($shippingblock->isZipCodeRequired()) echo ' class="required"' ?>><?php if ($shippingblock->isZipCodeRequired()) echo '<em>*</em>' ?><?php echo Mage::helper('checkout')->__('Zip/Postal Code') ?></label>
121
 
122
  var country = $('country').value;
123
  var regionId = $('region_id').value;
124
+ var cityId = $('city_id').value;
125
  var zip = $('postcode').value;
126
 
127
  <?php if($_product):?>
150
  parameters: {
151
  country_id: country,
152
  region_id: regionId,
153
+ city_id: cityId,
154
  zip_id: zip,
155
  productId: productId
156
  }
app/design/frontend/rwd/default/template/eadesigndev/shipestimation/catalog/product/view/estimate.phtml CHANGED
@@ -55,6 +55,17 @@ $ifTrue=Mage::Helper('shipestimation')->ifItApplies();
55
  </div>
56
  </li>
57
  </div>
 
 
 
 
 
 
 
 
 
 
 
58
  <div class="zip-code">
59
  <label
60
  for="postcode"<?php if ($shippingblock->isZipCodeRequired()) echo ' class="required"' ?>><?php if ($shippingblock->isZipCodeRequired()) echo '<em>*</em>' ?><?php echo Mage::helper('checkout')->__('Zip/Postal Code') ?></label>
@@ -110,6 +121,7 @@ $ifTrue=Mage::Helper('shipestimation')->ifItApplies();
110
 
111
  var country = $('country').value;
112
  var regionId = $('region_id').value;
 
113
  var zip = $('postcode').value;
114
 
115
  <?php if($_product):?>
@@ -138,6 +150,7 @@ $ifTrue=Mage::Helper('shipestimation')->ifItApplies();
138
  parameters: {
139
  country_id: country,
140
  region_id: regionId,
 
141
  zip_id: zip,
142
  productId: productId
143
  }
55
  </div>
56
  </li>
57
  </div>
58
+ <div class="city">
59
+ <label
60
+ for="city_id"<?php if ($shippingblock->isCityRequired()) echo ' class="required"' ?>><?php if ($shippingblock->isCityRequired()) echo '<em>*</em>' ?><?php echo Mage::helper('checkout')->__('City') ?></label>
61
+
62
+ <div class="input-box">
63
+ <input
64
+ class="input-text validate-city<?php if ($shippingblock->isCityRequired()): ?> required-entry<?php endif; ?>"
65
+ type="text" id="city_id" name="estimate_city"
66
+ value="<?php echo $shippingblock->escapeHtml($shippingblock->isCityRequired()) ?>"/>
67
+ </div>
68
+ </div>
69
  <div class="zip-code">
70
  <label
71
  for="postcode"<?php if ($shippingblock->isZipCodeRequired()) echo ' class="required"' ?>><?php if ($shippingblock->isZipCodeRequired()) echo '<em>*</em>' ?><?php echo Mage::helper('checkout')->__('Zip/Postal Code') ?></label>
121
 
122
  var country = $('country').value;
123
  var regionId = $('region_id').value;
124
+ var cityId = $('city_id').value;
125
  var zip = $('postcode').value;
126
 
127
  <?php if($_product):?>
150
  parameters: {
151
  country_id: country,
152
  region_id: regionId,
153
+ city_id: cityId,
154
  zip_id: zip,
155
  productId: productId
156
  }
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Eadesigndev_Shipestimation</name>
4
- <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Extension license name (OSL v3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Estimate shipping</summary>
10
  <description>The extension get the estimated cost for shipping for country, regions and postal code.</description>
11
- <notes>First version.</notes>
12
  <authors><author><name>EaDesign</name><user>eadesign</user><email>office@eadesign.ro</email></author></authors>
13
  <date>2015-10-14</date>
14
- <time>09:28:27</time>
15
- <contents><target name="magelocal"><dir name="Eadesigndev"><dir name="Shipestimation"><dir name="Helper"><file name="Data.php" hash="5dae9c8cd88a46cb9d35f72661426df8"/></dir><dir name="controllers"><file name="IndexController.php" hash="e542194f5ace60ef5cd2ca7fe67d67f1"/></dir><dir name="etc"><file name="config.xml" hash="fd8cdbb68a81b9676f3010a6054983df"/><file name="system.xml" hash="21a5b1618a36b44d9401b6cd4927adc9"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="eadesigndev"><dir name="shipestimation"><dir name="catalog"><dir name="product"><dir name="view"><file name="estimate.phtml" hash="8979d1231e4a9cf8bc956e83c727f22f"/></dir></dir></dir><file name="shipestimation.phtml" hash="814331439e53749ddb2105bcfd4dde0a"/></dir></dir></dir><dir name="layout"><dir name="eadesigndev"><file name="shipestimation.xml" hash="9a77c641f4c4fe5d925ee5cbb777ce9a"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="layout"><dir name="eadesigndev"><file name="shipestimation.xml" hash="9a77c641f4c4fe5d925ee5cbb777ce9a"/></dir></dir><dir name="template"><dir name="eadesigndev"><dir name="shipestimation"><dir name="catalog"><dir name="product"><dir name="view"><file name="estimate.phtml" hash="8979d1231e4a9cf8bc956e83c727f22f"/></dir></dir></dir><file name="shipestimation.phtml" hash="814331439e53749ddb2105bcfd4dde0a"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="eadesigndev"><dir name="shipestimation"><file name="71222.png" hash="f596a4fd67aa4a6eccc019c1722fa3cb"/><file name="bkg_main2.gif" hash="cf18ba9f7c7e6b058b439cde1a897e9c"/><dir name="css"><file name="default.css" hash="d57f7fffaa9f7f07137168eb515fd29e"/></dir></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="eadesigndev"><dir name="shipestimation"><file name="71222.png" hash="f596a4fd67aa4a6eccc019c1722fa3cb"/><file name="bkg_main2.gif" hash="cf18ba9f7c7e6b058b439cde1a897e9c"/><dir name="css"><file name="default.css" hash="acd3d7eaf9cfd1ca7bf33d6ece22c6fc"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eadesigndev_Shipestimation.xml" hash="e9c7ced8afd9a27b5917d269c354726a"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>5.6.3</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Eadesigndev_Shipestimation</name>
4
+ <version>1.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">Extension license name (OSL v3.0)</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Estimate shipping</summary>
10
  <description>The extension get the estimated cost for shipping for country, regions and postal code.</description>
11
+ <notes>Add city input</notes>
12
  <authors><author><name>EaDesign</name><user>eadesign</user><email>office@eadesign.ro</email></author></authors>
13
  <date>2015-10-14</date>
14
+ <time>13:15:34</time>
15
+ <contents><target name="magelocal"><dir name="Eadesigndev"><dir name="Shipestimation"><dir name="Helper"><file name="Data.php" hash="5dae9c8cd88a46cb9d35f72661426df8"/></dir><dir name="controllers"><file name="IndexController.php" hash="49a3a38ac55e51b3f74336fb034d2425"/></dir><dir name="etc"><file name="config.xml" hash="bffdda65bae5a07a90b4f4c1132b2547"/><file name="system.xml" hash="21a5b1618a36b44d9401b6cd4927adc9"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="eadesigndev"><dir name="shipestimation"><dir name="catalog"><dir name="product"><dir name="view"><file name="estimate.phtml" hash="f5670c33b963e0e62f79d15af2901a96"/></dir></dir></dir><file name="shipestimation.phtml" hash="814331439e53749ddb2105bcfd4dde0a"/></dir></dir></dir><dir name="layout"><dir name="eadesigndev"><file name="shipestimation.xml" hash="9a77c641f4c4fe5d925ee5cbb777ce9a"/></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="layout"><dir name="eadesigndev"><file name="shipestimation.xml" hash="9a77c641f4c4fe5d925ee5cbb777ce9a"/></dir></dir><dir name="template"><dir name="eadesigndev"><dir name="shipestimation"><dir name="catalog"><dir name="product"><dir name="view"><file name="estimate.phtml" hash="f5670c33b963e0e62f79d15af2901a96"/></dir></dir></dir><file name="shipestimation.phtml" hash="814331439e53749ddb2105bcfd4dde0a"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="eadesigndev"><dir name="shipestimation"><file name="71222.png" hash="f596a4fd67aa4a6eccc019c1722fa3cb"/><file name="bkg_main2.gif" hash="cf18ba9f7c7e6b058b439cde1a897e9c"/><dir name="css"><file name="default.css" hash="ab3bb2025895a50924d6b924cf2240c4"/></dir></dir></dir></dir></dir><dir name="rwd"><dir name="default"><dir name="eadesigndev"><dir name="shipestimation"><file name="71222.png" hash="f596a4fd67aa4a6eccc019c1722fa3cb"/><file name="bkg_main2.gif" hash="cf18ba9f7c7e6b058b439cde1a897e9c"/><dir name="css"><file name="default.css" hash="15fe12fc16d486c9f26096fb644d1d73"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Eadesigndev_Shipestimation.xml" hash="e9c7ced8afd9a27b5917d269c354726a"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>5.6.3</max></php></required></dependencies>
18
  </package>
skin/frontend/base/default/eadesigndev/shipestimation/css/default.css CHANGED
@@ -191,7 +191,7 @@
191
  }
192
  .alert_message .adress{
193
  padding-left: 20px;
194
- padding-top: 15px;
195
  }
196
  .alert_message .adress-title{
197
  padding-bottom: 10px;
@@ -203,6 +203,7 @@
203
  .adress .buttons-set{
204
  padding-bottom: 10px;
205
  border: none;
 
206
  }
207
  .car-cost{
208
  background: url('../../shipestimation/71222.png') no-repeat center left;
@@ -225,4 +226,7 @@
225
  }
226
  .shipping-estimate{
227
  margin-top: 35px;
228
- }
 
 
 
191
  }
192
  .alert_message .adress{
193
  padding-left: 20px;
194
+ padding-top: 5px;
195
  }
196
  .alert_message .adress-title{
197
  padding-bottom: 10px;
203
  .adress .buttons-set{
204
  padding-bottom: 10px;
205
  border: none;
206
+ background-color: #f6f8f9;
207
  }
208
  .car-cost{
209
  background: url('../../shipestimation/71222.png') no-repeat center left;
226
  }
227
  .shipping-estimate{
228
  margin-top: 35px;
229
+ }
230
+ .city{
231
+ padding-bottom: 10px;
232
+ }
skin/frontend/rwd/default/eadesigndev/shipestimation/css/default.css CHANGED
@@ -237,4 +237,7 @@
237
  .buttons-set button.button{
238
  float: left!important;
239
  margin: 0!important;
 
 
 
240
  }
237
  .buttons-set button.button{
238
  float: left!important;
239
  margin: 0!important;
240
+ }
241
+ .city{
242
+ padding-bottom: 10px;
243
  }