notime_same_day_delivery - Version 1.2.6

Version Notes

Fixed problem with custom validation

Download this release

Release Info

Developer notime
Extension notime_same_day_delivery
Version 1.2.6
Comparing to
See all releases


Code changes from version 1.2.5 to 1.2.6

package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>notime_same_day_delivery</name>
4
- <version>1.2.5</version>
5
  <stability>stable</stability>
6
  <license uri="https://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
@@ -12,11 +12,11 @@ notime same-day shipping is provided by notime AG based in Z&#xFC;rich Switzerla
12
  With this new shipping method customers can view and pick from the available delivery time-slots. &#xD;
13
  The popup can be placed either in the preview section, next to the product, and/or in the checkout page.&#xD;
14
  The merchant can configure this shipping method in the "Shipping methods" area and "Product Information" area.</description>
15
- <notes>Small fix</notes>
16
  <authors><author><name>notime</name><user>notime</user><email>dmitry.zhersh@notime.eu</email></author></authors>
17
- <date>2017-05-23</date>
18
- <time>13:22:23</time>
19
- <contents><target name="magelocal"><dir name="Notime"><dir name="Shipping"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><dir name="Shipping"><file name="Notime.php" hash="b3c81ff441682a56e23ba89c856533db"/></dir></dir></dir><dir name="Product"><file name="Widget.php" hash="e72292e3c7e8aed1909f4584fd1ea037"/></dir><file name="ShippingMethod.php" hash="b7cd80898a2a06821e6104a35b90b61e"/></dir><dir name="Helper"><file name="Data.php" hash="42686d5dffb62fdfc799d4a052daa968"/></dir><dir name="Model"><dir name="Carrier"><file name="Notime.php" hash="242500b090ad04d6eba1487ec7dc987b"/></dir><file name="Observer.php" hash="c1249439aecaf986f90e9eab39173917"/></dir><dir name="controllers"><file name="IndexController.php" hash="be50975eda060f063cf34307cb958012"/></dir><dir name="etc"><file name="config.xml" hash="a87f8bfc1ac9e811ca8432d14e931964"/><file name="system.xml" hash="f124b1bda52f8da0a305c2a6170bddca"/></dir><dir name="sql"><dir name="notimeshipping_setup"><file name="mysql4-install-1.0.0.php" hash="7647e9d736ac1199cb7732358b539be6"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="e15b6ad29a30175b3afca7280d1162ce"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="notime.xml" hash="3c16298a844be38a8a6d2a7ee615d6b9"/></dir><dir name="template"><dir name="notime"><dir name="checkout"><dir name="onepage"><dir name="shipping_method"><file name="notime.phtml" hash="5bb34677232ce20f542a392ad0a1cc2f"/></dir></dir></dir><dir name="product"><file name="widget.phtml" hash="23da2d2a03f095b8fe467c9c5c6b3c96"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Notime_Shipping.xml" hash="f5de879b88f342a03e16c4d655867b21"/></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Notime_Shipping.csv" hash="ff7779a3e027ef6ba1cecf517e3f03a2"/></dir><dir name="en_US"><file name="Notime_Shipping.csv" hash="76ab542daf7efd4973f8707f57ebb1b0"/></dir><dir name="fr_FR"><file name="Notime_Shipping.csv" hash="ab3eff49d5e197b4be6562238534c54e"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="notime.css" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="js"><file name="notime.js" hash="d9746648a959ae7e37dd66465da75b72"/></dir></dir></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.4.0</min><max>7.0.4</max></php></required></dependencies>
22
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>notime_same_day_delivery</name>
4
+ <version>1.2.6</version>
5
  <stability>stable</stability>
6
  <license uri="https://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
7
  <channel>community</channel>
12
  With this new shipping method customers can view and pick from the available delivery time-slots. &#xD;
13
  The popup can be placed either in the preview section, next to the product, and/or in the checkout page.&#xD;
14
  The merchant can configure this shipping method in the "Shipping methods" area and "Product Information" area.</description>
15
+ <notes>Fixed problem with custom validation</notes>
16
  <authors><author><name>notime</name><user>notime</user><email>dmitry.zhersh@notime.eu</email></author></authors>
17
+ <date>2017-07-11</date>
18
+ <time>15:59:26</time>
19
+ <contents><target name="magelocal"><dir name="Notime"><dir name="Shipping"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><dir name="Shipping"><file name="Notime.php" hash="b3c81ff441682a56e23ba89c856533db"/></dir></dir></dir><dir name="Product"><file name="Widget.php" hash="e72292e3c7e8aed1909f4584fd1ea037"/></dir><file name="ShippingMethod.php" hash="b7cd80898a2a06821e6104a35b90b61e"/></dir><dir name="Helper"><file name="Data.php" hash="42686d5dffb62fdfc799d4a052daa968"/></dir><dir name="Model"><dir name="Carrier"><file name="Notime.php" hash="242500b090ad04d6eba1487ec7dc987b"/></dir><file name="Observer.php" hash="c1249439aecaf986f90e9eab39173917"/></dir><dir name="controllers"><file name="IndexController.php" hash="be50975eda060f063cf34307cb958012"/></dir><dir name="etc"><file name="config.xml" hash="a87f8bfc1ac9e811ca8432d14e931964"/><file name="system.xml" hash="f124b1bda52f8da0a305c2a6170bddca"/></dir><dir name="sql"><dir name="notimeshipping_setup"><file name="mysql4-install-1.0.0.php" hash="7647e9d736ac1199cb7732358b539be6"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="e15b6ad29a30175b3afca7280d1162ce"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="notime.xml" hash="3c16298a844be38a8a6d2a7ee615d6b9"/></dir><dir name="template"><dir name="notime"><dir name="checkout"><dir name="onepage"><dir name="shipping_method"><file name="notime.phtml" hash="5bb34677232ce20f542a392ad0a1cc2f"/></dir></dir></dir><dir name="product"><file name="widget.phtml" hash="23da2d2a03f095b8fe467c9c5c6b3c96"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Notime_Shipping.xml" hash="f5de879b88f342a03e16c4d655867b21"/></dir></target><target name="magelocale"><dir><dir name="de_DE"><file name="Notime_Shipping.csv" hash="ff7779a3e027ef6ba1cecf517e3f03a2"/></dir><dir name="en_US"><file name="Notime_Shipping.csv" hash="76ab542daf7efd4973f8707f57ebb1b0"/></dir><dir name="fr_FR"><file name="Notime_Shipping.csv" hash="ab3eff49d5e197b4be6562238534c54e"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="notime.css" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="js"><file name="notime.js" hash="ed73eb529b156c70059f52c1dd567792"/></dir></dir></dir></dir></target></contents>
20
  <compatible/>
21
  <dependencies><required><php><min>5.4.0</min><max>7.0.4</max></php></required></dependencies>
22
  </package>
skin/frontend/base/default/js/notime.js CHANGED
@@ -29,13 +29,13 @@ NotimeShippingForm.prototype = {
29
  }
30
  }
31
  );
 
 
 
 
32
  },
33
  _toggleForm: function(){
34
- var selectedShippingMethodCode = $$('input[name="shipping_method"]:checked');
35
-
36
- //alert(selectedShippingMethodCode.pluck('value'));
37
-
38
- if(this.rate_id == selectedShippingMethodCode.pluck('value')){
39
  this.formElement.show();
40
  }else{
41
  this.formElement.hide();
@@ -45,16 +45,23 @@ NotimeShippingForm.prototype = {
45
  var self = this;
46
 
47
  Validation.add('required-notime-shipment',Translator.translate('Click here and choose your delivery time-slot'),function(value){
48
- var $notimeWidgetNotSupportedPostcodeContainer = $('notimeWidgetNotSupportedPostcodeContainer');
49
- if((value != '' && value != '-') || $notimeWidgetNotSupportedPostcodeContainer.visible())
50
- {
51
- return true;
52
- }
53
- return false;
 
 
 
54
  });
55
 
56
 
57
  Validation.add('required-notime-shipment-notsupported',Translator.translate('Please choose another postcode or another delivery method'),function(value){
 
 
 
 
58
  var $notimeWidgetNotSupportedPostcodeContainer = $('notimeWidgetNotSupportedPostcodeContainer');
59
  if((value == '' || value == '-') && $notimeWidgetNotSupportedPostcodeContainer.visible())
60
  {
29
  }
30
  }
31
  );
32
+ },
33
+ _isNotimeShippingSelected: function(){
34
+ var selectedShippingMethod = $$('input[name="shipping_method"]:checked');
35
+ return this.rate_id == selectedShippingMethod.pluck('value');
36
  },
37
  _toggleForm: function(){
38
+ if(this._isNotimeShippingSelected()){
 
 
 
 
39
  this.formElement.show();
40
  }else{
41
  this.formElement.hide();
45
  var self = this;
46
 
47
  Validation.add('required-notime-shipment',Translator.translate('Click here and choose your delivery time-slot'),function(value){
48
+ if(self._isNotimeShippingSelected() !== true){
49
+ return true;
50
+ }
51
+ var $notimeWidgetNotSupportedPostcodeContainer = $('notimeWidgetNotSupportedPostcodeContainer');
52
+ if((value != '' && value != '-') || $notimeWidgetNotSupportedPostcodeContainer.visible())
53
+ {
54
+ return true;
55
+ }
56
+ return false;
57
  });
58
 
59
 
60
  Validation.add('required-notime-shipment-notsupported',Translator.translate('Please choose another postcode or another delivery method'),function(value){
61
+ if(self._isNotimeShippingSelected() !== true){
62
+ return true;
63
+ }
64
+
65
  var $notimeWidgetNotSupportedPostcodeContainer = $('notimeWidgetNotSupportedPostcodeContainer');
66
  if((value == '' || value == '-') && $notimeWidgetNotSupportedPostcodeContainer.visible())
67
  {