Insightdesigns_MagentoAlerts - Version 1.0.3

Version Notes

Added better support for images routed through the One Pica Image CDN plugin

Download this release

Release Info

Developer Insight Designs Web Solutions, LLC
Extension Insightdesigns_MagentoAlerts
Version 1.0.3
Comparing to
See all releases


Code changes from version 1.0.2 to 1.0.3

app/code/community/Insightdesigns/MagentoAlerts/Model/Observer.php CHANGED
@@ -97,11 +97,33 @@ class Insightdesigns_MagentoAlerts_Model_Observer
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
 
97
  );
98
  foreach ($order_items as $order_item) {
99
  $order_item_product = Mage::getModel('catalog/product')->load($order_item->getProductId());
100
+
101
+ // S3 Image check
102
+ $img_url = (string)Mage::helper('catalog/image')->init($order_item_product, 'thumbnail')->resize(150);
103
+ if (strlen($img_url) > 0) {
104
+ $exploded_image_url_protocol = explode('//', $img_url);
105
+ $url_to_use = $exploded_image_url_protocol[0];
106
+ $url_start = '';
107
+ if (count($exploded_image_url_protocol) > 1) {
108
+ $url_start = $exploded_image_url_protocol[0];
109
+ $url_to_use = $exploded_image_url_protocol[1];
110
+ }
111
+ $exploded_image_url = explode('/', $url_to_use);
112
+ if (strpos($exploded_image_url[0], '.s3.amazonaws.com') !== false && $exploded_image_url[0] != 's3.amazonaws.com') {
113
+ $account_url = str_replace('.s3.amazonaws.com', '', $exploded_image_url[0]);
114
+ $img_url = $url_start . '//s3.amazonaws.com/' . $account_url;
115
+ $section = 1;
116
+ while ($section < count($exploded_image_url)) {
117
+ $img_url .= '/' . $exploded_image_url[$section];
118
+ $section++;
119
+ }
120
+ }
121
+ }
122
  $order_data['items'][] = array(
123
  'name' => $order_item->getName(),
124
  'sku' => $order_item->getSku(),
125
  'qty' => round($order_item->getQtyOrdered(), 1),
126
+ 'image' => (string)$img_url
127
  );
128
  }
129
 
package.xml CHANGED
@@ -1,7 +1,7 @@
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,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.&lt;br /&gt;&lt;br /&gt;&#xD;
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. &lt;br /&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;No identifying information about customers (e.g., name, address, credit card number, etc) is retained.&lt;br /&gt;&lt;br /&gt;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>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Insightdesigns_MagentoAlerts</name>
4
+ <version>1.0.3</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.&lt;br /&gt;&lt;br /&gt;&#xD;
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. &lt;br /&gt;&lt;br /&gt;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.&lt;br /&gt;&lt;br /&gt;No identifying information about customers (e.g., name, address, credit card number, etc) is retained.&lt;br /&gt;&lt;br /&gt;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 images routed through the One Pica Image CDN plugin</notes>
13
  <authors><author><name>Insight Designs Web Solutions, LLC</name><user>insightevan</user><email>evan@insightcrouch.com</email></author></authors>
14
+ <date>2015-09-25</date>
15
+ <time>16:17:13</time>
16
+ <contents><target name="magecommunity"><dir name="Insightdesigns"><dir name="MagentoAlerts"><dir name="Model"><file name="Observer.php" hash="a1d6393b123e183816f33440d7a462f7"/></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>