Version Notes
Added better support for multishipping checkouts
Download this release
Release Info
Developer | Insight Designs Web Solutions, LLC |
Extension | Insightdesigns_MagentoAlerts |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
app/code/community/Insightdesigns/MagentoAlerts/Model/Observer.php
CHANGED
@@ -74,41 +74,43 @@ class Insightdesigns_MagentoAlerts_Model_Observer
|
|
74 |
if (empty($order_ids) || !is_array($order_ids)) {
|
75 |
return;
|
76 |
}
|
77 |
-
$
|
78 |
-
$order = Mage::getModel('sales/order')->load($order_id);
|
79 |
|
80 |
-
|
81 |
-
|
82 |
-
if (
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
$
|
100 |
-
'
|
101 |
-
'
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
|
|
|
|
|
|
109 |
}
|
110 |
}
|
111 |
-
|
112 |
}
|
113 |
}
|
114 |
}
|
74 |
if (empty($order_ids) || !is_array($order_ids)) {
|
75 |
return;
|
76 |
}
|
77 |
+
foreach ($order_ids as $order_id) {
|
|
|
78 |
|
79 |
+
$order = Mage::getModel('sales/order')->load($order_id);
|
80 |
+
|
81 |
+
if (is_object($order)) {
|
82 |
+
// ENABLED?
|
83 |
+
if (Mage::getStoreConfigFlag('insightdesigns_magentoalerts/settings/enabled', $order->getStoreId())) {
|
84 |
+
// GUID SET?
|
85 |
+
if (Mage::getStoreConfig('insightdesigns_magentoalerts/settings/guid', $order->getStoreId()) != '') {
|
86 |
+
$order_items = $order->getAllItems();
|
87 |
+
$order_data = array(
|
88 |
+
'sale_total' => number_format($order->getGrandTotal(), 2, '.', ''),
|
89 |
+
'sale_increment_id' => $order->getIncrementId(),
|
90 |
+
'sale_shipping_method' => $order->getShippingDescription(),
|
91 |
+
'sale_date' => $order->getCreatedAt(),
|
92 |
+
'sale_ip_address' => $order->getRemoteIp(),
|
93 |
+
'sale_store_id' => $order->getStoreId(),
|
94 |
+
'sale_website_id' => Mage::getModel('core/store')->load($order->getStoreId())->getWebsiteId(),
|
95 |
+
'guid' => Mage::getStoreConfig('insightdesigns_magentoalerts/settings/guid', $order->getStoreId()),
|
96 |
+
'items' => array()
|
97 |
+
);
|
98 |
+
foreach ($order_items as $order_item) {
|
99 |
+
$order_item_product = Mage::getModel('catalog/product')->load($order_item->getProductId());
|
100 |
+
$order_data['items'][] = array(
|
101 |
+
'name' => $order_item->getName(),
|
102 |
+
'sku' => $order_item->getSku(),
|
103 |
+
'qty' => round($order_item->getQtyOrdered(), 1),
|
104 |
+
'image' => (string)Mage::helper('catalog/image')->init($order_item_product, 'thumbnail')->resize(150)
|
105 |
+
);
|
106 |
+
}
|
107 |
+
|
108 |
+
if (count($order_data) > 0) {
|
109 |
+
$this->storeOrder($order_data);
|
110 |
+
}
|
111 |
}
|
112 |
}
|
113 |
+
}
|
114 |
}
|
115 |
}
|
116 |
}
|
app/code/community/Insightdesigns/MagentoAlerts/etc/config.xml
CHANGED
@@ -23,6 +23,15 @@
|
|
23 |
</magealerts>
|
24 |
</observers>
|
25 |
</checkout_onepage_controller_success_action>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
</events>
|
27 |
</global>
|
28 |
<adminhtml>
|
23 |
</magealerts>
|
24 |
</observers>
|
25 |
</checkout_onepage_controller_success_action>
|
26 |
+
<checkout_multishipping_controller_success_action>
|
27 |
+
<observers>
|
28 |
+
<magealertsmulti>
|
29 |
+
<type>singleton</type>
|
30 |
+
<class>Insightdesigns_MagentoAlerts_Model_Observer</class>
|
31 |
+
<method>afterOrderSync</method>
|
32 |
+
</magealertsmulti>
|
33 |
+
</observers>
|
34 |
+
</checkout_multishipping_controller_success_action>
|
35 |
</events>
|
36 |
</global>
|
37 |
<adminhtml>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Insightdesigns_MagentoAlerts</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
@@ -9,11 +9,11 @@
|
|
9 |
<summary>This extension for Magento and companion iOS app allow you to browse sales stats and receive alerts on-the-go.</summary>
|
10 |
<description>If you are an owner or operator of a Magento online store, the iOS Alerts extension for Magento and companion iOS app allow you to browse sales stats and receive alerts on-the-go. Configure the push notifications you need, including alerts for any order, expedited shipping orders, large orders, site downtime, and Magento security releases.<br /><br />
|
11 |
The extension allows access to a rolling shutter of the past 30 days of order information. If enabled, generic information is stored about new orders that are placed on your online store. <br /><br />This information is limited to the order increment ID, order total, shipping method, the items that were purchased, and the IP address used during checkout.<br /><br />No identifying information about customers (e.g., name, address, credit card number, etc) is retained.<br /><br />Sales data is stored for a period of 30 days and then purged. This means year-on-year sales analysis is not supported.</description>
|
12 |
-
<notes>
|
13 |
<authors><author><name>Insight Designs Web Solutions, LLC</name><user>insightevan</user><email>evan@insightcrouch.com</email></author></authors>
|
14 |
-
<date>2015-
|
15 |
-
<time>
|
16 |
-
<contents><target name="magecommunity"><dir name="Insightdesigns"><dir name="MagentoAlerts"><dir name="Model"><file name="Observer.php" hash="
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.2.1</min><max>5.6.11</max></php></required></dependencies>
|
19 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Insightdesigns_MagentoAlerts</name>
|
4 |
+
<version>1.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license>GNU General Public License (GPL)</license>
|
7 |
<channel>community</channel>
|
9 |
<summary>This extension for Magento and companion iOS app allow you to browse sales stats and receive alerts on-the-go.</summary>
|
10 |
<description>If you are an owner or operator of a Magento online store, the iOS Alerts extension for Magento and companion iOS app allow you to browse sales stats and receive alerts on-the-go. Configure the push notifications you need, including alerts for any order, expedited shipping orders, large orders, site downtime, and Magento security releases.<br /><br />
|
11 |
The extension allows access to a rolling shutter of the past 30 days of order information. If enabled, generic information is stored about new orders that are placed on your online store. <br /><br />This information is limited to the order increment ID, order total, shipping method, the items that were purchased, and the IP address used during checkout.<br /><br />No identifying information about customers (e.g., name, address, credit card number, etc) is retained.<br /><br />Sales data is stored for a period of 30 days and then purged. This means year-on-year sales analysis is not supported.</description>
|
12 |
+
<notes>Added better support for multishipping checkouts</notes>
|
13 |
<authors><author><name>Insight Designs Web Solutions, LLC</name><user>insightevan</user><email>evan@insightcrouch.com</email></author></authors>
|
14 |
+
<date>2015-08-12</date>
|
15 |
+
<time>15:13:46</time>
|
16 |
+
<contents><target name="magecommunity"><dir name="Insightdesigns"><dir name="MagentoAlerts"><dir name="Model"><file name="Observer.php" hash="d44191ebdd7531f6d56e419f5677ab14"/></dir><dir name="etc"><file name="config.xml" hash="e4f24b80655b46e2d304bc443a5687a4"/><file name="system.xml" hash="11a37ad07cf63d87f38f8b33056e68e7"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Insightdesigns_MagentoAlerts.xml" hash="e4e9695838dbffdcf88546fc48226491"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="insightdesigns"><dir name="images"><file name="enabled-black.png" hash="d4edc49c3d02866fd106db8c30147587"/><file name="ima-logo-sm.png" hash="7558d79b0911b66e4405ee507816bdc7"/><file name="ima-logo.png" hash="66eab499dd386cbbc4c6af13ae9bdeb0"/><file name="insight-designs-promo.png" hash="7acc1a2e4c629330a673928aaebdc79e"/><file name="key-black.png" hash="273f40a6bcb9006078f6efc8b3192082"/><file name="logo.png" hash="7a9f6c406e9614a7fe268e76cb450055"/><file name="store-black.png" hash="4b940c7c54cb0d2471a686fdf5eb0700"/></dir></dir></dir></dir></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies><required><php><min>5.2.1</min><max>5.6.11</max></php></required></dependencies>
|
19 |
</package>
|