Version Notes
- order comments are now being sent to ShipHawk
Download this release
Release Info
Developer | ShipHawk |
Extension | ShipHawk |
Version | 2.3.0 |
Comparing to | |
See all releases |
Code changes from version 2.2.0 to 2.3.0
- app/code/community/Shiphawk/MyCarrier/etc/system.xml +0 -2
- app/code/community/Shiphawk/Order/Model/Command/UpdateOrder.php +37 -0
- app/code/community/Shiphawk/Order/Model/Observer/Order.php +7 -0
- app/code/community/Shiphawk/Order/etc/config.xml +9 -0
- app/code/community/Shiphawk/Shipping/Block/Adminhtml/Sales/Order/.DS_Store +0 -0
- app/code/community/Shiphawk/Shipping/Block/Adminhtml/System/Config/.DS_Store +0 -0
- package.xml +6 -7
app/code/community/Shiphawk/MyCarrier/etc/system.xml
CHANGED
@@ -56,7 +56,6 @@
|
|
56 |
<show_in_website>1</show_in_website>
|
57 |
<show_in_store>0</show_in_store>
|
58 |
</sort_order>
|
59 |
-
|
60 |
<!--
|
61 |
This value is used to specify whether
|
62 |
the carrier is available only for
|
@@ -101,7 +100,6 @@
|
|
101 |
<show_in_default>1</show_in_default>
|
102 |
<show_in_website>1</show_in_website>
|
103 |
<show_in_store>0</show_in_store>
|
104 |
-
<can_be_empty>1</can_be_empty>
|
105 |
</free_method>
|
106 |
</fields>
|
107 |
</shiphawk_mycarrier>
|
56 |
<show_in_website>1</show_in_website>
|
57 |
<show_in_store>0</show_in_store>
|
58 |
</sort_order>
|
|
|
59 |
<!--
|
60 |
This value is used to specify whether
|
61 |
the carrier is available only for
|
100 |
<show_in_default>1</show_in_default>
|
101 |
<show_in_website>1</show_in_website>
|
102 |
<show_in_store>0</show_in_store>
|
|
|
103 |
</free_method>
|
104 |
</fields>
|
105 |
</shiphawk_mycarrier>
|
app/code/community/Shiphawk/Order/Model/Command/UpdateOrder.php
ADDED
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
class Shiphawk_Order_Model_Command_UpdateOrder
|
4 |
+
{
|
5 |
+
public function execute(Mage_Sales_Model_Order $order)
|
6 |
+
{
|
7 |
+
$url = Mage::getStoreConfig('shiphawk/order/gateway_url');
|
8 |
+
$key = Mage::getStoreConfig('shiphawk/order/api_key');
|
9 |
+
|
10 |
+
$client = new Zend_Http_Client($url . 'orders/' . $order->getIncrementId());
|
11 |
+
$client->setHeaders('X-Api-Key', $key);
|
12 |
+
|
13 |
+
$notes = [];
|
14 |
+
foreach ($order->getAllStatusHistory() as $note){
|
15 |
+
$notes[] = array(
|
16 |
+
'body' => $note->comment,
|
17 |
+
'created_at' => $note->created_at,
|
18 |
+
'tag' => 'magento'
|
19 |
+
);
|
20 |
+
}
|
21 |
+
|
22 |
+
$orderRequest = json_encode(
|
23 |
+
array(
|
24 |
+
'notes' => $notes
|
25 |
+
)
|
26 |
+
);
|
27 |
+
|
28 |
+
Mage::log('ShipHawk Request: ' . $client->getUri(true) . $orderRequest, Zend_Log::INFO, 'shiphawk_order.log', true);
|
29 |
+
$client->setRawData($orderRequest, 'application/json');
|
30 |
+
try {
|
31 |
+
$response = $client->request(Zend_Http_Client::POST);
|
32 |
+
Mage::log('ShipHawk Response: ' . var_export($response, true), Zend_Log::INFO, 'shiphawk_order.log', true);
|
33 |
+
} catch (Exception $e) {
|
34 |
+
Mage::logException($e);
|
35 |
+
}
|
36 |
+
}
|
37 |
+
}
|
app/code/community/Shiphawk/Order/Model/Observer/Order.php
CHANGED
@@ -19,4 +19,11 @@ class Shiphawk_Order_Model_Observer_Order
|
|
19 |
//Mage::getModel('shiphawk_order/command_changeStatus')->execute($observer->getOrder());
|
20 |
}
|
21 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
}
|
19 |
//Mage::getModel('shiphawk_order/command_changeStatus')->execute($observer->getOrder());
|
20 |
}
|
21 |
}
|
22 |
+
|
23 |
+
public function update($observer)
|
24 |
+
{
|
25 |
+
if ($this->isAvailable()) {
|
26 |
+
Mage::getModel('shiphawk_order/command_updateOrder')->execute($observer->getOrder());
|
27 |
+
}
|
28 |
+
}
|
29 |
}
|
app/code/community/Shiphawk/Order/etc/config.xml
CHANGED
@@ -41,6 +41,15 @@
|
|
41 |
</shiphawk_order_save>
|
42 |
</observers>
|
43 |
</sales_order_save_after>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
44 |
<sales_order_place_after>
|
45 |
<observers>
|
46 |
<shiphawk_order_place>
|
41 |
</shiphawk_order_save>
|
42 |
</observers>
|
43 |
</sales_order_save_after>
|
44 |
+
<sales_order_save_after>
|
45 |
+
<observers>
|
46 |
+
<shiphawk_order_save>
|
47 |
+
<type>singleton</type>
|
48 |
+
<class>shiphawk_order/observer_order</class>
|
49 |
+
<method>update</method>
|
50 |
+
</shiphawk_order_save>
|
51 |
+
</observers>
|
52 |
+
</sales_order_save_after>
|
53 |
<sales_order_place_after>
|
54 |
<observers>
|
55 |
<shiphawk_order_place>
|
app/code/community/Shiphawk/Shipping/Block/Adminhtml/Sales/Order/.DS_Store
ADDED
Binary file
|
app/code/community/Shiphawk/Shipping/Block/Adminhtml/System/Config/.DS_Store
ADDED
Binary file
|
package.xml
CHANGED
@@ -1,21 +1,20 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Shiphawk</name>
|
4 |
-
<version>2.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
-
<summary>All-in-one shipping platform offering the best delivery network, in-cart rates, & post-purchase tracking.</summary>
|
10 |
<description>Everything You Need to Support an Enterprise Shipping Experience
|
11 |

|
12 |
ShipHawk is a powerful, all-in-one shipping intelligence platform that offers the best delivery network (including parcel, LTL, and white glove carriers), in-cart rating, on-demand shipping policies, and clear-cut post-purchase shipment tracking. To learn more about ShipHawk, our robust shipping intelligence engine, our powerful APIs, and other integrations that are available, please contact us today.</description>
|
13 |
-
<notes>-
|
14 |
-
- added support for Magento coupons</notes>
|
15 |
<authors><author><name>ShipHawk</name><user>ShipHawk</user><email>contact@shiphawk.com</email></author></authors>
|
16 |
-
<date>2017-
|
17 |
-
<time>
|
18 |
-
<contents><target name="magecommunity"><dir name="Shiphawk"><dir name="Checkout"><dir name="Model"><file name="Cart.php" hash="e36459fa6fb1b52b66c0365665269ffc"/></dir></dir><dir name="MyCarrier"><dir name="Model"><file name="Carrier.php" hash="ee48a5d0151c697ef2084a15e50c9d45"/><file name="Freemethod.php" hash="b9c74865f43a8c4efd4f1ef30e7a9daa"/></dir><dir name="etc"><file name="config.xml" hash="a37ce5727366f406e4525e76a9253be8"/><file name="system.xml" hash="
|
19 |
<compatible/>
|
20 |
<dependencies><required><php><min>5.3.0</min><max>7.1.2</max></php></required></dependencies>
|
21 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Shiphawk</name>
|
4 |
+
<version>2.3.0</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
+
<summary>All-in-one shipping platform offering the best delivery network, in-cart rates, &amp; post-purchase tracking.</summary>
|
10 |
<description>Everything You Need to Support an Enterprise Shipping Experience
|
11 |

|
12 |
ShipHawk is a powerful, all-in-one shipping intelligence platform that offers the best delivery network (including parcel, LTL, and white glove carriers), in-cart rating, on-demand shipping policies, and clear-cut post-purchase shipment tracking. To learn more about ShipHawk, our robust shipping intelligence engine, our powerful APIs, and other integrations that are available, please contact us today.</description>
|
13 |
+
<notes>- order comments are now being sent to ShipHawk</notes>
|
|
|
14 |
<authors><author><name>ShipHawk</name><user>ShipHawk</user><email>contact@shiphawk.com</email></author></authors>
|
15 |
+
<date>2017-09-05</date>
|
16 |
+
<time>16:27:32</time>
|
17 |
+
<contents><target name="magecommunity"><dir name="Shiphawk"><dir name="Checkout"><dir name="Model"><file name="Cart.php" hash="e36459fa6fb1b52b66c0365665269ffc"/></dir></dir><dir name="MyCarrier"><dir name="Model"><file name="Carrier.php" hash="ee48a5d0151c697ef2084a15e50c9d45"/><file name="Freemethod.php" hash="b9c74865f43a8c4efd4f1ef30e7a9daa"/></dir><dir name="etc"><file name="config.xml" hash="a37ce5727366f406e4525e76a9253be8"/><file name="system.xml" hash="c766da3c85b9961c1c79fc25d23c3ea2"/></dir></dir><dir name="Order"><dir name="Block"><dir name="System"><file name="Link.php" hash="c44c95b4b5f8b1d87038d9707a970737"/></dir></dir><dir name="Helper"><file name="Data.php" hash="1a2f8a93a310d337787a34c3d6f1ecbb"/></dir><dir name="Model"><dir name="Command"><file name="ChangeStatus.php" hash="3d916b6ed60957849c27222bcaeb4672"/><file name="CheckConfiguration.php" hash="39b710b50ac78dc67346922609852f23"/><file name="SendOrder.php" hash="96e2d981420044c25e3d2ef95a20d8ad"/><file name="UpdateOrder.php" hash="6089b1da1f1b12f5e1092324ce14a508"/></dir><dir name="Cron"><file name="ProcessOrderForLast14Days.php" hash="1c59e28101bc110c05296a13878da537"/></dir><dir name="Observer"><file name="Config.php" hash="e44707a0586a18fea8a69646ff21b74a"/><file name="Order.php" hash="5a403618f9f2c90f9311e065ee8a6047"/></dir><dir name="Source"><file name="Gateway.php" hash="18df9d2ee851cbbcd2654ed69c2b311c"/><file name="Ordersync.php" hash="a15ba0ffe025a8a190516b09ce826022"/></dir><file name="StatusMapper.php" hash="45807c1a7f87acffdb8fde23405433d5"/></dir><dir name="etc"><file name="config.xml" hash="bee6e41a6db2212802e5c3fb2792543e"/><file name="system.xml" hash="fb7f76fbd0d21f3d89b51fa0378b61ce"/></dir></dir><dir name="Shipping"><dir name="Block"><dir name="Adminhtml"><dir name="Origins"><dir name="Edit"><file name="Form.php" hash="fc372c73fac12c592d40ff9ae9297381"/></dir><file name="Edit.php" hash="1202b50bc520ebf18bfbb033280f1ddf"/><file name="Grid.php" hash="9af28e730d7c476f1c8a5254402d8429"/></dir><file name="Origins.php" hash="748725e017dcbca92de4adf9de59d23f"/><dir name="Sales"><dir name="Order"><dir name="Shipment"><file name="View.php" hash="49b1612a21244178d517eecd492beaca"/></dir><file name="View.php" hash="fc8f1e2607f7ced87edb73dad8d515c3"/><file name=".DS_Store" hash="96a16f688a6d55e4526e9c7b36d7f093"/></dir></dir><file name="Shipment.php" hash="caad45a2164bbfba83e6d5a41a75f50d"/><dir name="System"><dir name="Config"><dir name="Form"><file name="Button.php" hash="fbffbfa54f05d2da4cf380ffec35e38f"/></dir><file name=".DS_Store" hash="701e688504525c2e4e762937cbcced24"/></dir></dir></dir><dir name="Catalog"><dir name="Product"><dir name="Helper"><dir name="Form"><file name="Disabled.php" hash="05adb96db0b68dc900174c4fefa3b39d"/><file name="Type.php" hash="4dd966de022cc9fc6d69dc5e0ecb4726"/></dir></dir></dir></dir><dir name="Shipping"><dir name="Tracking"><file name="Popup.php" hash="73358c38983dc18b6ccb4420e98a7043"/></dir></dir><file name="Version.php" hash="f91bc825ee1b6225e727c825e72ece71"/></dir><dir name="Helper"><file name="Data.php" hash="7e17b34e42f94f374ab1d23500574aa0"/><file name="Origin.php" hash="5a1ef27d1cb4db9ccb4a4a9f0c29c10e"/></dir><dir name="Model"><file name="Api.php" hash="e2e06f1ec9c1f8fd2752b028ead54855"/><file name="Carrier.php" hash="9c815b55e6283bccdff3d84a57f82830"/><file name="Observer.php" hash="752b90edd29a9a10db3dcb678921a97a"/><file name="Origins.php" hash="763f9064fcbf04f3cd873553a0002625"/><dir name="Product"><dir name="Attribute"><dir name="Source"><file name="Location.php" hash="e8cefabd60ff8ef6b09559c35ae4ff8c"/></dir></dir></dir><dir name="Resource"><dir name="Origins"><file name="Collection.php" hash="8aa8fb73c9db05975621106940b6519f"/></dir><file name="Origins.php" hash="e8c73d70433c1c4b21deca7b2baf1374"/></dir><dir name="Source"><file name="Adminratefilter.php" hash="e6096208ee165e06b016fcbc64b1a545"/><file name="Carriertype.php" hash="b2311da4909f59060bb60df14c7a5c59"/><file name="Freeshipping.php" hash="f35aa4a9483d2bdae1e3b60ce27b0f55"/><file name="Gateway.php" hash="1fa95fb657bc67f2973dd7e55a1046ad"/><file name="Location.php" hash="222ee55e43cc161204bc05e1a08b3db6"/><file name="Ratefilter.php" hash="56ed7f5059d2f9804387915eaa4f4b3b"/><file name="Received.php" hash="6d50e8c1fe6e13c971ba63348e98aac0"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="ImportController.php" hash="6207c7ac200e882eb44b25b7e2587415"/><file name="OriginsController.php" hash="0f1e6e724f555bc0efd631257584779c"/><file name="ShipmentController.php" hash="a0dd7f3c78c40eb613e32bec0c95cf19"/></dir><file name="IndexController.php" hash="2f4e3b0a7202da44278957822d6a8379"/></dir><dir name="etc"><file name="adminhtml.xml" hash="ceec9868f5c072336c97aebd7da0dc03"/><file name="config.xml" hash="cf07cfa64b67682b16fc7462594f6e27"/><file name="system.xml" hash="d05cc04c30a5b344bcc0f17a975ef395"/></dir><dir name="sql"><dir name="shiphawk_setup"><file name="mysql4-install-0.1.0.php" hash="951c03164740882fac36a0ccd6bec66f"/><file name="mysql4-upgrade-0.7.0-0.7.1.php" hash="eb3f0b3185cce381ea63a0d7fa4c76c6"/><file name="mysql4-upgrade-0.7.1-0.7.2.php" hash="8df91551c06b3f4dd0ac125bd445ceb4"/><file name="mysql4-upgrade-0.7.2-1.0.0.php" hash="930d934e4528a05d3fdf864cd43b55bb"/><file name="mysql4-upgrade-1.0.0-1.0.1.php" hash="a8d2ffa83e57b6983aadc84a800fd233"/><file name="mysql4-upgrade-1.0.1-1.0.2.php" hash="14ee57a3dbd6262796dfa53ac334b60e"/><file name="mysql4-upgrade-1.0.10-1.0.11.php" hash="535c9a3e34e9b26cdce3a99a7f56671b"/><file name="mysql4-upgrade-1.0.11-1.0.12.php" hash="e27f74deda031e8c221c838f44ff8002"/><file name="mysql4-upgrade-1.0.12-1.0.13.php" hash="65f1c19944d7c86f1acbb05e7627d622"/><file name="mysql4-upgrade-1.0.13-1.1.0.php" hash="e3ae5cb573422d100dee9c55de15533c"/><file name="mysql4-upgrade-1.0.2-1.0.3.php" hash="4ff24d716c62172ef4b85d18b91934c0"/><file name="mysql4-upgrade-1.0.4-1.0.5.php" hash="ba820664a791ed852b9238e113a41be9"/><file name="mysql4-upgrade-1.0.5-1.0.6.php" hash="054fd8d6946d5fd02b5943bfd2a73fad"/><file name="mysql4-upgrade-1.0.6-1.0.7.php" hash="e9fca7a2e71ae27cf8e66c27bed7274b"/><file name="mysql4-upgrade-1.0.7-1.0.8.php" hash="868c422c61c17dd39a948fcdaa1b58ac"/><file name="mysql4-upgrade-1.0.8-1.0.9.php" hash="5f545c7ec60cb16810ce96fdc9686ac7"/><file name="mysql4-upgrade-1.0.9-1.0.10.php" hash="3a8a2a44ce08382e40b809e3108ca795"/><file name="mysql4-upgrade-1.1.0-1.1.1.php" hash="5037a768822190cea8e08fdc8ab8f483"/><file name="mysql4-upgrade-1.1.3-1.1.4.php" hash="1d0088f0dce6b6e9c88627c996f486b6"/><file name="mysql4-upgrade-1.1.4-1.1.5.php" hash="dbc6cb1d4e8d204ac8d08820c7d62824"/><file name="mysql4-upgrade-1.1.5.1-1.1.5.3.php" hash="fffb846c7c16cdeecd9ce796ce2f8795"/><file name="mysql4-upgrade-1.1.5.3-1.1.6.php" hash="0ab1729e8311494b71fd1b50bd8f421e"/><file name="mysql4-upgrade-1.1.7-1.1.8.php" hash="669e5188d858ba37a854a6f0705086e0"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Shiphawk_Order.xml" hash="41c5c882c390ff710b6632f2251165f5"/><file name="Shiphawk_Shipping.xml" hash="a9b0d8dcac01ccccef7f0f9ff52a7aba"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="shiphawk"><file name="shiphawkicon.png" hash="58d5c12ac147f24185425198621dc715"/></dir></dir></dir></dir></dir></target></contents>
|
18 |
<compatible/>
|
19 |
<dependencies><required><php><min>5.3.0</min><max>7.1.2</max></php></required></dependencies>
|
20 |
</package>
|