Version Notes
Shippit Magento Integration module, using the Shippit v3 API.
Allows for retrieving shipping quotes during checkout and sending orders to Shippit.
Also adds Australian States and Territories to the available region options and Authority to Leave and Delivery Comments to the checkout process.
Download this release
Release Info
Developer | Matthew Muscat |
Extension | Shippit_Shippit |
Version | 4.3.11 |
Comparing to | |
See all releases |
Code changes from version 4.3.10 to 4.3.11
app/code/community/Shippit/Shippit/Model/Request/Api/Order.php
CHANGED
@@ -645,10 +645,10 @@ class Shippit_Shippit_Model_Request_Api_Order extends Varien_Object
|
|
645 |
$newParcel = array(
|
646 |
'sku' => $sku,
|
647 |
'title' => $title,
|
648 |
-
'qty' => $qty,
|
649 |
-
'price' => $price,
|
650 |
// if a 0 weight is provided, stub the weight to 0.2kg
|
651 |
-
'weight' => ($weight == 0 ? 0.2 : $weight),
|
652 |
'location' => $location
|
653 |
);
|
654 |
|
645 |
$newParcel = array(
|
646 |
'sku' => $sku,
|
647 |
'title' => $title,
|
648 |
+
'qty' => (float) $qty,
|
649 |
+
'price' => (float) $price,
|
650 |
// if a 0 weight is provided, stub the weight to 0.2kg
|
651 |
+
'weight' => (float) ($weight == 0 ? 0.2 : $weight),
|
652 |
'location' => $location
|
653 |
);
|
654 |
|
app/code/community/Shippit/Shippit/Model/Request/Sync/Order.php
CHANGED
@@ -77,19 +77,16 @@ class Shippit_Shippit_Model_Request_Sync_Order extends Varien_Object
|
|
77 |
$itemsAdded = 0;
|
78 |
|
79 |
foreach ($itemsCollection as $item) {
|
80 |
-
|
|
|
|
|
|
|
81 |
continue;
|
82 |
}
|
83 |
|
84 |
$requestedQty = $this->itemsHelper->getItemData($items, 'sku', $item->getSku(), 'qty');
|
85 |
-
|
86 |
-
|
87 |
-
* Magento marks a shipment only for the parent item in the order
|
88 |
-
* get the parent item to determine the correct qty to ship
|
89 |
-
*/
|
90 |
-
$rootItem = $this->_getRootItem($item);
|
91 |
-
|
92 |
-
$itemQty = $this->itemsHelper->getQtyToShip($rootItem, $requestedQty);
|
93 |
$itemWeight = $item->getWeight();
|
94 |
|
95 |
$itemLocation = $this->itemsHelper->getLocation($item);
|
@@ -99,7 +96,7 @@ class Shippit_Shippit_Model_Request_Sync_Order extends Varien_Object
|
|
99 |
$item->getSku(),
|
100 |
$item->getName(),
|
101 |
$itemQty,
|
102 |
-
$
|
103 |
$itemWeight,
|
104 |
$itemLocation
|
105 |
);
|
@@ -115,6 +112,27 @@ class Shippit_Shippit_Model_Request_Sync_Order extends Varien_Object
|
|
115 |
return $this;
|
116 |
}
|
117 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
118 |
private function _getRootItem($item)
|
119 |
{
|
120 |
if ($item->getParentItem()) {
|
@@ -172,9 +190,9 @@ class Shippit_Shippit_Model_Request_Sync_Order extends Varien_Object
|
|
172 |
$newItem = array(
|
173 |
'sku' => $sku,
|
174 |
'title' => $title,
|
175 |
-
'qty' => $qty,
|
176 |
-
'price' => $price,
|
177 |
-
'weight' => $this->itemsHelper->getWeight($weight),
|
178 |
'location' => $location
|
179 |
);
|
180 |
|
77 |
$itemsAdded = 0;
|
78 |
|
79 |
foreach ($itemsCollection as $item) {
|
80 |
+
// Skip the item if...
|
81 |
+
// - it does not need to be shipped individually
|
82 |
+
// - it is a virtual item
|
83 |
+
if ($item->isDummy(true) || $item->getIsVirtual()) {
|
84 |
continue;
|
85 |
}
|
86 |
|
87 |
$requestedQty = $this->itemsHelper->getItemData($items, 'sku', $item->getSku(), 'qty');
|
88 |
+
$itemQty = $this->itemsHelper->getQtyToShip($item, $requestedQty);
|
89 |
+
$itemPrice = $this->_getItemPrice($item);
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
$itemWeight = $item->getWeight();
|
91 |
|
92 |
$itemLocation = $this->itemsHelper->getLocation($item);
|
96 |
$item->getSku(),
|
97 |
$item->getName(),
|
98 |
$itemQty,
|
99 |
+
$itemPrice,
|
100 |
$itemWeight,
|
101 |
$itemLocation
|
102 |
);
|
112 |
return $this;
|
113 |
}
|
114 |
|
115 |
+
private function _getItemPrice($item)
|
116 |
+
{
|
117 |
+
$rootItem = $this->_getRootItem($item);
|
118 |
+
// Get the item price
|
119 |
+
// - If the root item is a bundle, use the item price
|
120 |
+
// Otherwise, use the root item price
|
121 |
+
if ($rootItem->getProductType() == 'bundle') {
|
122 |
+
// if we are sending the bundle together
|
123 |
+
if ($rootItem->getId() == $item->getId()) {
|
124 |
+
return $rootItem->getPrice();
|
125 |
+
}
|
126 |
+
// if we are sending individually
|
127 |
+
else {
|
128 |
+
return $item->getPrice();
|
129 |
+
}
|
130 |
+
}
|
131 |
+
else {
|
132 |
+
return $rootItem->getBasePrice();
|
133 |
+
}
|
134 |
+
}
|
135 |
+
|
136 |
private function _getRootItem($item)
|
137 |
{
|
138 |
if ($item->getParentItem()) {
|
190 |
$newItem = array(
|
191 |
'sku' => $sku,
|
192 |
'title' => $title,
|
193 |
+
'qty' => (float) $qty,
|
194 |
+
'price' => (float) $price,
|
195 |
+
'weight' => (float) $this->itemsHelper->getWeight($weight),
|
196 |
'location' => $location
|
197 |
);
|
198 |
|
app/code/community/Shippit/Shippit/etc/config.xml
CHANGED
@@ -18,7 +18,7 @@
|
|
18 |
<config>
|
19 |
<modules>
|
20 |
<Shippit_Shippit>
|
21 |
-
<version>4.3.
|
22 |
</Shippit_Shippit>
|
23 |
</modules>
|
24 |
|
18 |
<config>
|
19 |
<modules>
|
20 |
<Shippit_Shippit>
|
21 |
+
<version>4.3.11</version>
|
22 |
</Shippit_Shippit>
|
23 |
</modules>
|
24 |
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Shippit_Shippit</name>
|
4 |
-
<version>4.3.
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software Licence</license>
|
7 |
<channel>community</channel>
|
@@ -18,9 +18,9 @@ Allows for retrieving shipping quotes during checkout and sending orders to Ship
|
|
18 |

|
19 |
Also adds Australian States and Territories to the available region options and Authority to Leave and Delivery Comments to the checkout process.</notes>
|
20 |
<authors><author><name>Matthew Muscat</name><user>matthewmuscat</user><email>matthew@mamis.com.au</email></author><author><name>William On</name><user>williamon</user><email>will@shippit.com</email></author></authors>
|
21 |
-
<date>2016-08-
|
22 |
-
<time>05:
|
23 |
-
<contents><target name="magelib"><dir name="shippit-bugsnag"><file name="Autoload.php" hash="141a845b8baaebee4232b30540d5cda5"/><file name="Client.php" hash="1899cce9e4e05aa200c5c05ef2c0f52d"/><file name="Configuration.php" hash="c4a28bb83e49dfb24ff15e3daebbe156"/><file name="Diagnostics.php" hash="ee57a579dec73e922465d417cfecccf6"/><file name="Error.php" hash="f8d179e9406a6c0a958d06367b9e64e0"/><file name="ErrorTypes.php" hash="d52493e689517f479abb21599e9c1989"/><file name="Notification.php" hash="98ac2f24e77a96fe8f274e9694a33dd4"/><file name="Request.php" hash="ff8dbf358238351801518bad62138491"/><file name="Stacktrace.php" hash="2f7b8e1172f04071ce70b5b53cfe55ee"/></dir></target><target name="magecommunity"><dir name="Shippit"><dir name="Shippit"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="9208ed6e0b222590610f6a3e2a3ac254"/><file name="Items.php" hash="275116a2c42700de7a65fc9e0a6568c6"/></dir><file name="Order.php" hash="665a08b5f3f6432ba49327ad0d320572"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><dir name="Renderer"><dir name="Shipping"><file name="Methods.php" hash="26428642657de1a0f0d22140fd84174d"/></dir><dir name="Shippit"><file name="ServiceClass.php" hash="7573d99e768fa6e2c4dc136a54f0d9fd"/></dir></dir><dir name="Sync"><dir name="Order"><file name="ShippingMethodMapping.php" hash="7296f3ac577b89c36c68693ab1a84a32"/></dir></dir></dir><dir name="Fieldset"><file name="Version.php" hash="6cbff78c307a14e3eed4219f180901b1"/></dir></dir></dir></dir></dir><dir name="Checkout"><dir name="Cart"><file name="Shipping.php" hash="dd5dc61d665da4746e5c2a4fc6df089f"/></dir><dir name="Shipping"><file name="AuthorityToLeave.php" hash="241ff5d226c8f848b9895b767883dc30"/><file name="DeliveryInstructions.php" hash="77b5fb807d9dfdd8b5b6bfab6f8df9a6"/></dir></dir></dir><file name="Exception.php" hash="909594393898823a108bab9c6a2e77ed"/><dir name="Helper"><file name="Api.php" hash="17386e28d75bc9ec3cc38e0e91d597cc"/><file name="Bugsnag.php" hash="ae4f276ee853abaf75ffbaf9de08cc08"/><file name="Carrier.php" hash="f7d031b67b5c9beec38214236ff30b5a"/><file name="Checkout.php" hash="004418f9ee0de6ba090faa32e540d8a3"/><file name="Data.php" hash="df6ea2d54c389f91721dc28c72b1dea1"/><dir name="Sync"><dir name="Order"><file name="Items.php" hash="c2031228b78726051a4096054a80363b"/></dir><file name="Order.php" hash="cbdb9511638e9854de82d67017008739"/><file name="Shipping.php" hash="c19889222cffbddf178a6236f78ae41c"/></dir></dir><dir name="Model"><dir name="Api"><file name="Order.php" hash="8163a93c23b9b90b0dc7ab942bd36f57"/></dir><file name="Logger.php" hash="64ed33a2d7554a9da58a080e3462504e"/><dir name="Observer"><dir name="Adminhtml"><dir name="Sales"><file name="Order.php" hash="44393a4d02ea135f68d74ca8ec37394a"/></dir></dir><dir name="Order"><file name="Sync.php" hash="a4f15047fb0fd2681c950498992d7aac"/></dir><dir name="Quote"><file name="AuthorityToLeave.php" hash="c675772dcb25d6a35372f46060b3a8e4"/><file name="DeliveryInstructions.php" hash="8cf1353e6406710208a5312c9cd68c7d"/></dir><dir name="Shipping"><file name="Tracking.php" hash="988cffc30e8d606ba6a2754ba4b2d3a3"/></dir><file name="Shippit.php" hash="3625385600a8e3f0c64492bfaac9c681"/><dir name="System"><file name="Config.php" hash="e5515b7d0cccde3ad7bb70fbe33a3f0b"/></dir></dir><dir name="Request"><dir name="Api"><file name="Order.php" hash="
|
24 |
<compatible/>
|
25 |
<dependencies><required><php><min>5.2.0</min><max>8.0.0</max></php></required></dependencies>
|
26 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Shippit_Shippit</name>
|
4 |
+
<version>4.3.11</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>Open Software Licence</license>
|
7 |
<channel>community</channel>
|
18 |

|
19 |
Also adds Australian States and Territories to the available region options and Authority to Leave and Delivery Comments to the checkout process.</notes>
|
20 |
<authors><author><name>Matthew Muscat</name><user>matthewmuscat</user><email>matthew@mamis.com.au</email></author><author><name>William On</name><user>williamon</user><email>will@shippit.com</email></author></authors>
|
21 |
+
<date>2016-08-30</date>
|
22 |
+
<time>05:02:03</time>
|
23 |
+
<contents><target name="magelib"><dir name="shippit-bugsnag"><file name="Autoload.php" hash="141a845b8baaebee4232b30540d5cda5"/><file name="Client.php" hash="1899cce9e4e05aa200c5c05ef2c0f52d"/><file name="Configuration.php" hash="c4a28bb83e49dfb24ff15e3daebbe156"/><file name="Diagnostics.php" hash="ee57a579dec73e922465d417cfecccf6"/><file name="Error.php" hash="f8d179e9406a6c0a958d06367b9e64e0"/><file name="ErrorTypes.php" hash="d52493e689517f479abb21599e9c1989"/><file name="Notification.php" hash="98ac2f24e77a96fe8f274e9694a33dd4"/><file name="Request.php" hash="ff8dbf358238351801518bad62138491"/><file name="Stacktrace.php" hash="2f7b8e1172f04071ce70b5b53cfe55ee"/></dir></target><target name="magecommunity"><dir name="Shippit"><dir name="Shippit"><dir name="Block"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="9208ed6e0b222590610f6a3e2a3ac254"/><file name="Items.php" hash="275116a2c42700de7a65fc9e0a6568c6"/></dir><file name="Order.php" hash="665a08b5f3f6432ba49327ad0d320572"/></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><dir name="Renderer"><dir name="Shipping"><file name="Methods.php" hash="26428642657de1a0f0d22140fd84174d"/></dir><dir name="Shippit"><file name="ServiceClass.php" hash="7573d99e768fa6e2c4dc136a54f0d9fd"/></dir></dir><dir name="Sync"><dir name="Order"><file name="ShippingMethodMapping.php" hash="7296f3ac577b89c36c68693ab1a84a32"/></dir></dir></dir><dir name="Fieldset"><file name="Version.php" hash="6cbff78c307a14e3eed4219f180901b1"/></dir></dir></dir></dir></dir><dir name="Checkout"><dir name="Cart"><file name="Shipping.php" hash="dd5dc61d665da4746e5c2a4fc6df089f"/></dir><dir name="Shipping"><file name="AuthorityToLeave.php" hash="241ff5d226c8f848b9895b767883dc30"/><file name="DeliveryInstructions.php" hash="77b5fb807d9dfdd8b5b6bfab6f8df9a6"/></dir></dir></dir><file name="Exception.php" hash="909594393898823a108bab9c6a2e77ed"/><dir name="Helper"><file name="Api.php" hash="17386e28d75bc9ec3cc38e0e91d597cc"/><file name="Bugsnag.php" hash="ae4f276ee853abaf75ffbaf9de08cc08"/><file name="Carrier.php" hash="f7d031b67b5c9beec38214236ff30b5a"/><file name="Checkout.php" hash="004418f9ee0de6ba090faa32e540d8a3"/><file name="Data.php" hash="df6ea2d54c389f91721dc28c72b1dea1"/><dir name="Sync"><dir name="Order"><file name="Items.php" hash="c2031228b78726051a4096054a80363b"/></dir><file name="Order.php" hash="cbdb9511638e9854de82d67017008739"/><file name="Shipping.php" hash="c19889222cffbddf178a6236f78ae41c"/></dir></dir><dir name="Model"><dir name="Api"><file name="Order.php" hash="8163a93c23b9b90b0dc7ab942bd36f57"/></dir><file name="Logger.php" hash="64ed33a2d7554a9da58a080e3462504e"/><dir name="Observer"><dir name="Adminhtml"><dir name="Sales"><file name="Order.php" hash="44393a4d02ea135f68d74ca8ec37394a"/></dir></dir><dir name="Order"><file name="Sync.php" hash="a4f15047fb0fd2681c950498992d7aac"/></dir><dir name="Quote"><file name="AuthorityToLeave.php" hash="c675772dcb25d6a35372f46060b3a8e4"/><file name="DeliveryInstructions.php" hash="8cf1353e6406710208a5312c9cd68c7d"/></dir><dir name="Shipping"><file name="Tracking.php" hash="988cffc30e8d606ba6a2754ba4b2d3a3"/></dir><file name="Shippit.php" hash="3625385600a8e3f0c64492bfaac9c681"/><dir name="System"><file name="Config.php" hash="e5515b7d0cccde3ad7bb70fbe33a3f0b"/></dir></dir><dir name="Request"><dir name="Api"><file name="Order.php" hash="3137d1dc3bd24413f092b77c35b8832c"/><file name="Shipment.php" hash="af1b78ce51f1d8b89a9c1e9bc6b81ed5"/></dir><dir name="Sync"><file name="Order.php" hash="800acbaab9222c6a9b84d7d7640e188e"/></dir></dir><dir name="Resource"><file name="Setup.php" hash="8eb28f6cf5f637597d5f0ad668b64269"/><dir name="Sync"><dir name="Order"><file name="Collection.php" hash="b6fc680edfd57d6cbf810290799dad2c"/><dir name="Item"><file name="Collection.php" hash="935dd5847558e6629ea671b91ad9a1df"/></dir><file name="Item.php" hash="1ba227660a2d1ad09283c312e7e88a98"/></dir><file name="Order.php" hash="4808f4501b760ac09af24fba0df7494d"/></dir></dir><dir name="Shipping"><dir name="Carrier"><file name="Shippit.php" hash="eaf1fc6ec3a58fc1a3adecf07ec5bd8b"/></dir></dir><file name="Shippit.php" hash="d48601c7f37bf3328b2e863d41d5fe13"/><dir name="Sync"><dir name="Order"><file name="Config.php" hash="f52faaf68213e313746abde13781350e"/><file name="Item.php" hash="dee4de2286845cdaed924f81dfeeab51"/></dir><file name="Order.php" hash="460b020cd0a44d8f956e415fbccae620"/></dir><dir name="System"><dir name="Config"><dir name="Source"><dir name="Catalog"><dir name="Attributes"><file name="Location.php" hash="b2fcaaabfa58d290d731e3b09b0afb5d"/></dir><file name="Attributes.php" hash="1f051ddfcea5034c3b0f299ed35d2c7c"/><file name="Products.php" hash="6e78a631987441e8228ee410fe5addd2"/><dir name="Unit"><file name="Weight.php" hash="9d15b42826be4e39c3f2a105826cf6be"/></dir></dir><dir name="Order"><dir name="Status"><file name="Processing.php" hash="1cd4481df806b98b5b20afefe8c16e38"/></dir></dir><dir name="Shipping"><file name="Methods.php" hash="683dd6c9d412d52be6941ec1aec0e1eb"/></dir><dir name="Shippit"><file name="Environment.php" hash="a71561807ce05052a678a5d8d0656695"/><file name="MaxTimeslots.php" hash="a87f36fb06a9e9b79c1ffdc5ff1c42c0"/><file name="Methods.php" hash="41675a89d439dfb0e6ba17d1f323febd"/><dir name="Order"><file name="Status.php" hash="fcd986d9d3634cf257d58c212ae650c8"/></dir><dir name="Sync"><file name="Mode.php" hash="64ff642d93ad9505f160f48b5061efae"/><file name="SendAllOrders.php" hash="99fc5b1dcb2d49768025194cd02aba0e"/></dir></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Shippit"><dir name="Order"><file name="SyncController.php" hash="d5a22ab5fe1346e68d7967e9cad20402"/></dir><file name="OrderController.php" hash="7d4e2c615b524c211d75b4b7c4edc0e7"/></dir></dir><file name="OrderController.php" hash="6d5fe674fd570b6d7b8acc761e450de6"/></dir><dir name="data"><dir name="shippit_setup"><file name="data-install-4.0.0.php" hash="fcc2ad84912ffaf9dc07b866f5fd7460"/><file name="data-upgrade-4.1.0-4.1.1.php" hash="aebc8c802bf8af45219500526da944fa"/><file name="data-upgrade-4.1.6-4.1.7.php" hash="2b2fe61d97645521516728a329cba9ad"/><file name="data-upgrade-4.2.3-4.2.4.php" hash="bd3ed5e70b9349d830fa789e0b394d83"/><file name="data-upgrade-4.3.2-4.3.3.php" hash="3699a8b74b0898f48ec1b9daeb3fcfcc"/></dir></dir><dir name="etc"><file name="adminhtml.xml" hash="fb2576b73bea6a323cfd157e95c25e90"/><file name="config.xml" hash="bf6ea6fbf10491d8e39d7ce4909dacdf"/><file name="system.xml" hash="f6ea042a7657ed35ee931663068b2908"/></dir><dir name="sql"><dir name="shippit_setup"><file name="install-4.0.0.php" hash="19a0a09b6a10c89b73edc7f0a744fe5a"/><file name="upgrade-4.0.9-4.1.0.php" hash="35e56aeea2b78bba82e845d4c4c16fc1"/><file name="upgrade-4.1.0-4.1.1.php" hash="5c675c05272472cdd7c585aa6db750d9"/><file name="upgrade-4.2.5-4.2.6.php" hash="15dd734c1f7797d8cd0ff5b91a2dda55"/><file name="upgrade-4.2.6-4.3.0.php" hash="635d87318271636ed348a41834c70081"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="shippit.xml" hash="18fa39b7eae780fe993e5140270ffefe"/></dir><dir name="template"><dir name="shippit"><dir name="checkout"><dir name="onepage"><dir name="shipping_method"><file name="authoritytoleave.phtml" hash="7a138531233734c55f97de3cb1641a18"/><file name="deliveryinstructions.phtml" hash="cc64f104584b7be4de3e5de3f2c047c0"/></dir><file name="shipping_method.phtml" hash="c7d804a639749b3c7b21e5e228463f88"/></dir></dir><dir name="email"><dir name="order"><dir name="shipment"><file name="track.phtml" hash="c1450ff14e566880d421799852df4014"/></dir></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="shippit.xml" hash="c0ae616038936a98b9e87124fb1c3127"/></dir><dir name="template"><dir name="shippit"><dir name="system"><dir name="config"><dir name="form"><dir name="field"><file name="array.phtml" hash="46d02a4a01af0e14cb2d0d91665ca03e"/></dir></dir></dir></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Shippit_Shippit.xml" hash="401f33d7db491808587c51209d8d6a8b"/></dir></target></contents>
|
24 |
<compatible/>
|
25 |
<dependencies><required><php><min>5.2.0</min><max>8.0.0</max></php></required></dependencies>
|
26 |
</package>
|