Version Notes
Problems with shipping price recalculation in case one step checkout were fixed.
Download this release
Release Info
Developer | notime |
Extension | notime_same_day_delivery |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.4 to 1.2.0
app/code/local/Notime/Shipping/controllers/IndexController.php
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Notime_Shipping_IndexController extends Mage_Core_Controller_Front_Action
|
4 |
+
{
|
5 |
+
public function indexAction() {
|
6 |
+
if ($this->getRequest()->isPost()) {
|
7 |
+
$shipmentFee = $this->getRequest()->getPost('shipping_fee', '');
|
8 |
+
if($shipmentFee) {
|
9 |
+
|
10 |
+
Mage::getSingleton('core/session')->setNotimeShipmentFee($shipmentFee);
|
11 |
+
|
12 |
+
$_quote = Mage::getModel('checkout/cart')->getQuote();
|
13 |
+
$address = $_quote->getShippingAddress();
|
14 |
+
|
15 |
+
$address->setShippingAmount($shipmentFee);
|
16 |
+
$address->setBaseShippingAmount($shipmentFee);
|
17 |
+
|
18 |
+
$address->setCollectShippingRates(true)->save();
|
19 |
+
|
20 |
+
$_quote->collectTotals()->save();
|
21 |
+
}
|
22 |
+
|
23 |
+
return true;
|
24 |
+
}
|
25 |
+
}
|
26 |
+
}
|
app/code/local/Notime/Shipping/etc/config.xml
CHANGED
@@ -7,6 +7,15 @@
|
|
7 |
</Notime_Shipping>
|
8 |
</modules>
|
9 |
<frontend>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<layout>
|
11 |
<updates>
|
12 |
<notime_shipping>
|
7 |
</Notime_Shipping>
|
8 |
</modules>
|
9 |
<frontend>
|
10 |
+
<routers>
|
11 |
+
<notime_shipping>
|
12 |
+
<use>standard</use>
|
13 |
+
<args>
|
14 |
+
<module>Notime_Shipping</module>
|
15 |
+
<frontName>notimeshipping</frontName>
|
16 |
+
</args>
|
17 |
+
</notime_shipping>
|
18 |
+
</routers>
|
19 |
<layout>
|
20 |
<updates>
|
21 |
<notime_shipping>
|
app/design/frontend/base/default/template/notime/checkout/onepage/shipping_method/notime.phtml
CHANGED
@@ -56,6 +56,19 @@
|
|
56 |
$validationError.hide();
|
57 |
}
|
58 |
$('notime_shipment_success').update('<?php echo $this->__('You have successfully selected time window'); ?>');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
}
|
60 |
}
|
61 |
|
56 |
$validationError.hide();
|
57 |
}
|
58 |
$('notime_shipment_success').update('<?php echo $this->__('You have successfully selected time window'); ?>');
|
59 |
+
|
60 |
+
// update totals
|
61 |
+
var urlNotime = '<?php echo $this->getUrl('notimeshipping/index/index', array('_secure' => true)); ?>';
|
62 |
+
var parameters = {'shipping_fee': shipmentFee};
|
63 |
+
new Ajax.Request(urlNotime, {
|
64 |
+
method:'post',
|
65 |
+
parameters:parameters,
|
66 |
+
onSuccess:function(transport) {
|
67 |
+
if (transport.status == 200) {
|
68 |
+
$('<?php echo $this->getWidgetZipCode();?>').click();
|
69 |
+
}
|
70 |
+
}
|
71 |
+
});
|
72 |
}
|
73 |
}
|
74 |
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>notime_same_day_delivery</name>
|
4 |
-
<version>1.
|
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ürich Switzerla
|
|
12 |
With this new shipping method customers can view and pick from the available delivery time-slots. 
|
13 |
The popup can be placed either in the preview section, next to the product, and/or in the checkout page.
|
14 |
The merchant can configure this shipping method in the "Shipping methods" area and "Product Information" area.</description>
|
15 |
-
<notes>
|
16 |
<authors><author><name>notime</name><user>notime</user><email>dmitry.zhersh@notime.eu</email></author></authors>
|
17 |
-
<date>2017-03-
|
18 |
-
<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="f16e5aa4ff3a9c8dd2111c445c8e8744"/></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="ed1e32767160edff794fe7d57e345e4a"/></dir><dir name="etc"><file name="config.xml" hash="
|
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.0</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. 
|
13 |
The popup can be placed either in the preview section, next to the product, and/or in the checkout page.
|
14 |
The merchant can configure this shipping method in the "Shipping methods" area and "Product Information" area.</description>
|
15 |
+
<notes>Problems with shipping price recalculation in case one step checkout were fixed.</notes>
|
16 |
<authors><author><name>notime</name><user>notime</user><email>dmitry.zhersh@notime.eu</email></author></authors>
|
17 |
+
<date>2017-03-30</date>
|
18 |
+
<time>20:49:44</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="f16e5aa4ff3a9c8dd2111c445c8e8744"/></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="ed1e32767160edff794fe7d57e345e4a"/></dir><dir name="controllers"><file name="IndexController.php" hash="468036e131346e8655d5faa099585631"/></dir><dir name="etc"><file name="config.xml" hash="b91f5abce7a9af96848a5a5824a17504"/><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="828b45ed839f03c119d589faea4f3ef8"/></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="2e29f39df813d21c450c30e2a360844b"/></dir><dir name="en_US"><file name="Notime_Shipping.csv" hash="04348e009ae0215e958926b45817257c"/></dir><dir name="fr_FR"><file name="Notime_Shipping.csv" hash="ef3db48b18b2b4fc6159c9c450ff5e57"/></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="7678c5eebe3ccd258d1a1fcac13bdaa5"/></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>
|