Version Notes
Second release.
Download this release
Release Info
Developer | PHPro |
Extension | karibooshipping |
Version | 1.2.0 |
Comparing to | |
See all releases |
Code changes from version 1.1.0 to 1.2.0
app/code/community/Kariboo/Shipping/Model/Shipping/Kariboo.php
CHANGED
@@ -33,11 +33,18 @@ class Kariboo_Shipping_Model_Shipping_Kariboo extends Mage_Shipping_Model_Carrie
|
|
33 |
$method = Mage::getModel('shipping/rate_result_method');
|
34 |
$result = Mage::getModel('shipping/rate_result');
|
35 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
36 |
if (!$this->getConfigData('rate_type')) {
|
37 |
$price = $this->getConfigData('flat_rate_price');
|
38 |
if ($request->getFreeShipping() === true ||
|
39 |
(Mage::getStoreConfig('carriers/' . $this->_code . '/free_shipping') &&
|
40 |
-
$
|
41 |
$price = 0;
|
42 |
}
|
43 |
} else {
|
@@ -62,12 +69,12 @@ class Kariboo_Shipping_Model_Shipping_Kariboo extends Mage_Shipping_Model_Carrie
|
|
62 |
$freePackageValue += $item->getBaseRowTotal();
|
63 |
}
|
64 |
}
|
65 |
-
$oldValue = $
|
66 |
$request->setPackageValue($oldValue - $freePackageValue);
|
67 |
}
|
68 |
|
69 |
if ($freePackageValue) {
|
70 |
-
$request->setPackageValue($
|
71 |
}
|
72 |
|
73 |
$conditionName = $this->getConfigData('table_rate_condition');
|
33 |
$method = Mage::getModel('shipping/rate_result_method');
|
34 |
$result = Mage::getModel('shipping/rate_result');
|
35 |
|
36 |
+
// Calculate subtotal incl. VAT
|
37 |
+
$subtotalInclVat = 0;
|
38 |
+
$items = $quote->getAllItems();
|
39 |
+
foreach ($items as $item) {
|
40 |
+
$subtotalInclVat += $item->getRowTotalInclTax();
|
41 |
+
}
|
42 |
+
|
43 |
if (!$this->getConfigData('rate_type')) {
|
44 |
$price = $this->getConfigData('flat_rate_price');
|
45 |
if ($request->getFreeShipping() === true ||
|
46 |
(Mage::getStoreConfig('carriers/' . $this->_code . '/free_shipping') &&
|
47 |
+
$subtotalInclVat >= Mage::getStoreConfig('carriers/' . $this->_code . '/free_shipping_from'))) {
|
48 |
$price = 0;
|
49 |
}
|
50 |
} else {
|
69 |
$freePackageValue += $item->getBaseRowTotal();
|
70 |
}
|
71 |
}
|
72 |
+
$oldValue = $subtotalInclVat;
|
73 |
$request->setPackageValue($oldValue - $freePackageValue);
|
74 |
}
|
75 |
|
76 |
if ($freePackageValue) {
|
77 |
+
$request->setPackageValue($subtotalInclVat - $freePackageValue);
|
78 |
}
|
79 |
|
80 |
$conditionName = $this->getConfigData('table_rate_condition');
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>karibooshipping</name>
|
4 |
-
<version>1.
|
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>Kariboo! Shipping</summary>
|
10 |
<description>Kariboo! Shipping By PHPro</description>
|
11 |
-
<notes>
|
12 |
<authors><author><name>PHPro</name><user>heremke</user><email>info@phpro.be</email></author></authors>
|
13 |
-
<date>
|
14 |
-
<time>12:
|
15 |
-
<contents><target name="magecommunity"><dir name="Kariboo"><dir name="Shipping"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Download"><file name="Grid.php" hash="2059968ef6c0e9ae87d96aa5982d7822"/></dir><file name="Download.php" hash="a4e3cf8bfd8b689d876bd63397e6aaef"/><dir name="Order"><file name="Grid.php" hash="45b2a31e2bdcc7ab61ae942fe85b6cd4"/><dir name="View"><dir name="Tab"><file name="Returnbarcode.php" hash="557aaa2dfa70d5902e37049c6c9ed0d5"/><file name="Returnlabels.php" hash="6e364e3799d513e196dbb3f4b5afad28"/></dir></dir></dir><file name="Order.php" hash="7a74b1b8cb2c37472711084c140b4e79"/></dir><dir name="Shipping"><dir name="Carrier"><dir name="Kariboo"><dir name="Tablerate"><file name="Grid.php" hash="28cb7ea6767b54e326b71a874ba85f11"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Export.php" hash="017954013ce77b3a8a540ba7228ddc98"/></dir></dir></dir></dir><dir name="Carrier"><file name="Kariboo.php" hash="c4b364ead065ecaa9d2e72741ad13ea6"/></dir></dir><dir name="Helper"><file name="Data.php" hash="b832bb2d32fe7f66df1e69f30a1b2dc2"/></dir><dir name="Model"><dir name="Adminhtml"><file name="Kariboogrid.php" hash="ffd22a615231371cdb7b975423020f11"/></dir><file name="Cron.php" hash="8bcbce7dc8570097db91ed476ed596c2"/><file name="Observer.php" hash="6e70432af9d3a37b6e7a3fc90b69442e"/><dir name="Payment"><file name="Kariboocod.php" hash="16ee0b246ed695210f3e10983a8a5917"/></dir><dir name="Resource"><dir name="Returnlabel"><file name="Collection.php" hash="2ad5f68dbc18664e493564fea163e871"/></dir><file name="Returnlabel.php" hash="abfb5a6037f4af51b3c903898236fc14"/><dir name="Tablerate"><file name="Collection.php" hash="3a14f5cf4a78d2e1ac4dc1255f0781b3"/></dir><file name="Tablerate.php" hash="837f138445c51cc58afbd53d25654387"/></dir><file name="Returnlabel.php" hash="5c3ae19bf102542fd5faf9f5a98940ff"/><dir name="Shipping"><file name="Geocode.php" hash="aaede1ca16eb8d8d6db5c1ff41046635"/><file name="Kariboo.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>7.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>karibooshipping</name>
|
4 |
+
<version>1.2.0</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>Kariboo! Shipping</summary>
|
10 |
<description>Kariboo! Shipping By PHPro</description>
|
11 |
+
<notes>Second release.</notes>
|
12 |
<authors><author><name>PHPro</name><user>heremke</user><email>info@phpro.be</email></author></authors>
|
13 |
+
<date>2016-03-04</date>
|
14 |
+
<time>12:41:25</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Kariboo"><dir name="Shipping"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Download"><file name="Grid.php" hash="2059968ef6c0e9ae87d96aa5982d7822"/></dir><file name="Download.php" hash="a4e3cf8bfd8b689d876bd63397e6aaef"/><dir name="Order"><file name="Grid.php" hash="45b2a31e2bdcc7ab61ae942fe85b6cd4"/><dir name="View"><dir name="Tab"><file name="Returnbarcode.php" hash="557aaa2dfa70d5902e37049c6c9ed0d5"/><file name="Returnlabels.php" hash="6e364e3799d513e196dbb3f4b5afad28"/></dir></dir></dir><file name="Order.php" hash="7a74b1b8cb2c37472711084c140b4e79"/></dir><dir name="Shipping"><dir name="Carrier"><dir name="Kariboo"><dir name="Tablerate"><file name="Grid.php" hash="28cb7ea6767b54e326b71a874ba85f11"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><file name="Export.php" hash="017954013ce77b3a8a540ba7228ddc98"/></dir></dir></dir></dir><dir name="Carrier"><file name="Kariboo.php" hash="c4b364ead065ecaa9d2e72741ad13ea6"/></dir></dir><dir name="Helper"><file name="Data.php" hash="b832bb2d32fe7f66df1e69f30a1b2dc2"/></dir><dir name="Model"><dir name="Adminhtml"><file name="Kariboogrid.php" hash="ffd22a615231371cdb7b975423020f11"/></dir><file name="Cron.php" hash="8bcbce7dc8570097db91ed476ed596c2"/><file name="Observer.php" hash="6e70432af9d3a37b6e7a3fc90b69442e"/><dir name="Payment"><file name="Kariboocod.php" hash="16ee0b246ed695210f3e10983a8a5917"/></dir><dir name="Resource"><dir name="Returnlabel"><file name="Collection.php" hash="2ad5f68dbc18664e493564fea163e871"/></dir><file name="Returnlabel.php" hash="abfb5a6037f4af51b3c903898236fc14"/><dir name="Tablerate"><file name="Collection.php" hash="3a14f5cf4a78d2e1ac4dc1255f0781b3"/></dir><file name="Tablerate.php" hash="837f138445c51cc58afbd53d25654387"/></dir><file name="Returnlabel.php" hash="5c3ae19bf102542fd5faf9f5a98940ff"/><dir name="Shipping"><file name="Geocode.php" hash="aaede1ca16eb8d8d6db5c1ff41046635"/><file name="Kariboo.php" hash="317de1f14915cad3925eaef143caf9eb"/></dir><dir name="System"><dir name="Config"><dir name="Backend"><dir name="Shipping"><file name="Tablerate.php" hash="ee7ff32c57b6d4cf1756a58b2f4abaf7"/></dir></dir><dir name="Source"><file name="Display.php" hash="eb9b1f3fd9c895bf0a05f9c39267c9dc"/><file name="Ratetypes.php" hash="fe32849768ab2828b2b63512f02660cc"/><file name="Weightunit.php" hash="eb824dfb2e2851d5d81fa07872707806"/></dir></dir></dir><file name="Tablerate.php" hash="0a10fa2714cc41751f235696ae9cf8b1"/><file name="Webservice.php" hash="9b837896c8ec62a1334eb791e8683782"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="KaribooconfigController.php" hash="ecec952de24f424c999b0cf164c4dae4"/><file name="KariboodownloadController.php" hash="127ce6286935b9ef145d4c1db792a6cf"/><file name="KaribooorderController.php" hash="d6424c5e43d0aa6e4dd1f21e95faa651"/></dir><file name="AjaxController.php" hash="833bbfc62345d4f9c57d0f77e0356ec3"/></dir><dir name="etc"><file name="adminhtml.xml" hash="b5951472d8ceec1c9506223894818a2b"/><file name="config.xml" hash="4d9660eb137243ba97e81633b9264145"/><file name="system.xml" hash="ecae0c7f3c8b16018f3301804f0b809c"/></dir><dir name="sql"><dir name="kariboo_setup"><file name="mysql4-install-0.0.1.php" hash="9047bec29de80267f5f94becae86ff1a"/><file name="mysql4-upgrade-0.0.1-0.0.2.php" hash="33e8988ffe88526127aefe4139fb8811"/><file name="mysql4-upgrade-0.0.2-0.0.3.php" hash="3fedbc1f931f72f98845b6d1331c8ba8"/><file name="mysql4-upgrade-0.0.3-0.0.4.php" hash="e2306c44553e540b478bdcb26a5ea039"/><file name="mysql4-upgrade-0.0.4-0.0.5.php" hash="7700369a4196663393443c93bc64eb4f"/><file name="mysql4-upgrade-0.0.5-0.0.6.php" hash="5784f03156a8e659711cad3cf3b8248f"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="kariboo_shipping.xml" hash="4dfcad00c420622f1d3dadb444b6df99"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="kariboo_shipping.xml" hash="1afe66bff989b0781d870ab292bbda31"/></dir><dir name="template"><dir name="kariboo"><dir name="shipping"><file name="gmapsapi.phtml" hash="1f21e215eea984addd4d0d2407e620bc"/><file name="kariboo_checkout_append.phtml" hash="01e4a1f444f8f34644781c814472c848"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="zKariboo_Shipping.xml" hash="ffafdf9e1d8ea3d8e686e31b44d1d667"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Kariboo_Shipping.csv" hash="2000a912536dc95e5fc663c78fa998ad"/><dir name="template"><dir name="email"><dir name="sales"><file name="kariboo_returnlabel.html" hash="60db11e0d6fa3163be620a333ff9d2b5"/></dir></dir></dir></dir><dir name="fr_DR"><file name="Kariboo_Shipping.csv" hash=""/></dir><dir name="nl_NL"><file name="Kariboo_Shipping.csv" hash="9c867fc355a46ebc4fd5d2f0001008da"/><dir name="template"><dir name="email"><dir name="sales"><file name="kariboo_returnlabel.html" hash="15c5af14b524f7f0c7f0e72aae7c9a0f"/></dir></dir></dir></dir><dir name="fr_FR"><dir name="template"><dir name="email"><dir name="sales"><file name="kariboo_returnlabel.html" hash="2fc2bb28ffd20ef5143b5e78fa73d039"/></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="kariboo"><dir name="shipping"><file name="checkout.js" hash="fde7c32d6c41d3b1d14d1ca99b8e4d7f"/></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="kariboo"><file name="window.css" hash="27fc379d87f6c6874a9db71bb5279717"/></dir></dir><dir name="images"><dir name="kariboo"><file name="ajax-loader.gif" hash="7f2182aab07294851ba2447a83e18b2a"/><file name="ajax-loader_filter.gif" hash="aeb0aed0887598ccbd0b8fe17c02686a"/><file name="button_close.png" hash="040640376fe4f699f97f0d59b64e79cf"/><file name="icon_sprite.png" hash="ab00de43927913a16c028f40dd9b36a2"/><file name="kariboo.png" hash="5160c94d4de796605cbece978187dcf6"/><file name="marker_open.png" hash="6c2bee98b9cc9feb2ed73f1096a251fc"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>7.0.0</max></php></required></dependencies>
|
18 |
</package>
|