Glew - Version 1.0.15

Version Notes

Fixed issue with getAttributeText where not supported.

Download this release

Release Info

Developer Glew
Extension Glew
Version 1.0.15
Comparing to
See all releases


Code changes from version 1.0.14 to 1.0.15

app/code/community/Glew/Service/Model/Types/Product.php CHANGED
@@ -11,37 +11,42 @@ class Glew_Service_Model_Types_Product
11
  $this->attribute_set_id = $product->getData('attribute_set_id');
12
  $this->type_id = $product->getData('type_id');
13
 
14
- foreach ( $productAttributes as $field => $usesSource){
15
- $value = $product->getData($field);
16
- if(is_array($value) || is_object($value)){
17
- continue;
18
- }
19
-
20
- if($field == 'image' && $value) {
21
- $imageUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $value;
22
- $this->$field = $imageUrl;
23
- continue;
24
- }
25
 
26
- if ($usesSource) {
27
- $option = $product->getAttributeText($field);
28
- if ($value && empty($option) && $option != '0') {
29
  continue;
30
  }
31
- if (is_array($option)) {
32
- $value = implode(',', $option);
33
- } else {
34
- $value = $option;
 
 
 
 
 
 
 
 
 
 
35
  }
36
- }
37
- if($field == 'category_ids'){
38
- $value = $product->getCategoryIds();
39
- }
40
 
41
- $this->$field = $value;
42
- }
 
 
 
43
 
44
  return $this;
45
  }
46
 
47
  }
 
11
  $this->attribute_set_id = $product->getData('attribute_set_id');
12
  $this->type_id = $product->getData('type_id');
13
 
14
+ foreach ( $productAttributes as $field => $usesSource) {
15
+ try {
16
+ $value = $product->getData($field);
17
+ if(is_array($value) || is_object($value)){
18
+ continue;
19
+ }
 
 
 
 
 
20
 
21
+ if($field == 'image' && $value) {
22
+ $imageUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'catalog/product' . $value;
23
+ $this->$field = $imageUrl;
24
  continue;
25
  }
26
+
27
+ if ($usesSource) {
28
+ $option = $product->getAttributeText($field);
29
+ if ($value && empty($option) && $option != '0') {
30
+ continue;
31
+ }
32
+ if (is_array($option)) {
33
+ $value = implode(',', $option);
34
+ } else {
35
+ $value = $option;
36
+ }
37
+ }
38
+ if($field == 'category_ids'){
39
+ $value = $product->getCategoryIds();
40
  }
 
 
 
 
41
 
42
+ $this->$field = $value;
43
+ } catch(Exception $e) {
44
+ continue;
45
+ }
46
+ }
47
 
48
  return $this;
49
  }
50
 
51
  }
52
+
app/code/community/Glew/Service/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Glew_Service>
5
- <version>1.0.14</version>
6
  <depends>
7
  <Mage_Shipping />
8
  </depends>
2
  <config>
3
  <modules>
4
  <Glew_Service>
5
+ <version>1.0.15</version>
6
  <depends>
7
  <Mage_Shipping />
8
  </depends>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Glew</name>
4
- <version>1.0.14</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
@@ -20,11 +20,11 @@ Value of your At Risk and Lost customers&#xD;
20
  Trending, real-time store performance on a daily, weekly, and yearly, basis.&#xD;
21
  Supports multi-store configurations&#xD;
22
  And more!</description>
23
- <notes>Adding product price and cost to inventory api</notes>
24
  <authors><author><name>Glew</name><user>glewio</user><email>integrations@glew.io</email></author></authors>
25
- <date>2015-11-30</date>
26
- <time>14:40:39</time>
27
- <contents><target name="magecommunity"><dir name="Glew"><dir name="Service"><dir name="Block"><dir name="Adminhtml"><dir name="Widget"><dir name="Info"><file name="Info.php" hash="cb7f32c9a9d9032d9af801834e4ed5af"/></dir></dir></dir><file name="SecretKey.php" hash="244e68e058d731d96f284a9e9a0bf13a"/></dir><dir name="Helper"><file name="Data.php" hash="e1bcfc59c84b1647949465613a0dd4b4"/></dir><dir name="Model"><file name="Glew.php" hash="e665b255ac5983b937eb60febd4a94bf"/><dir name="Resource"><file name="Setup.php" hash="1608ab53c5846ff80b1413693ad2657e"/></dir><dir name="Types"><file name="AbandonedCart.php" hash="ca99b85c3b2b93795013e1929a0d3613"/><file name="AbandonedCarts.php" hash="05ab68ee8093f149c1ebe7268e0eaf1f"/><file name="Address.php" hash="dac4e96501d687ce8c84ddfcc18a8327"/><file name="Categories.php" hash="7f3bb262405c9a9032688093ba6187aa"/><file name="Category.php" hash="a75878be202411265d91a20dd4afa457"/><file name="Customer.php" hash="e1f2058d9358d89a48715f151ab45755"/><file name="Customers.php" hash="656c31b938429d54c2dc4b8c6d7cb259"/><file name="Extension.php" hash="3a0bc967154cfd1ac5e9534ae96921fc"/><file name="Extensions.php" hash="4982616cd7bb0e5770b692420b8bb6cf"/><file name="Inventory.php" hash="4a6442574e2c4c640a1c88e4ca6b87fb"/><file name="InventoryItem.php" hash="7822e8679d17a4806a41e935dcdf950d"/><file name="Order.php" hash="f17622408310699e6cbccbb4b02e1ac3"/><file name="OrderItem.php" hash="b60ae77da7d234c0feebb347f964f8f1"/><file name="OrderItems.php" hash="3d63cc89cdcb79632183eca0a2c7bd82"/><file name="Orders.php" hash="8f215ef68dfa393acfb4a5380d111f75"/><file name="Product.php" hash="08481d9c0c9558a5230ab7a79c517690"/><file name="ProductAlert.php" hash="e7ca7668907dad5547d80ad581519e78"/><file name="ProductAlerts.php" hash="767c8c527156a11ab376292c10c8fd5d"/><file name="Products.php" hash="e6890059117a05d6d1006c13ddf15855"/><file name="Refund.php" hash="1b79b89a2ac66cc0dfb05e1f3100f98c"/><file name="RefundItem.php" hash="1d43007ec2bb990eb08b8d0a2812f4ca"/><file name="RefundItems.php" hash="7b7511e30194b13db1f8671027fe913a"/><file name="Refunds.php" hash="1073e14c4e82f00d0f25eb4dcff48669"/><file name="Store.php" hash="455923168b5d2550af6b862d776db3f2"/><file name="Stores.php" hash="5d057d09db03554807d763d29ade16e9"/><file name="Subscriber.php" hash="727153725fc7be3fd093422d6a67dfa1"/><file name="Subscribers.php" hash="a17ea2cc95f206989fd0b3612fd9f9bb"/></dir></dir><dir name="controllers"><file name="ModuleController.php" hash="aacae6db78a87a94e8e6cdfd0798d87f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d2d95c59dc81f92df0ed6adaba801a52"/><file name="config.xml" hash="928c4d68c787810b8b897aa280c1b7ca"/><file name="system.xml" hash="07aa4da88108940bf267cb2abb854eab"/></dir><dir name="sql"><dir name="glew_setup"><file name="mysql4-install-1.0.0.php" hash="d515369cd1867cf970f27352d927e402"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Glew_Service.xml" hash="db2470cc1c1c36b01cea61416a3f6f37"/></dir></target></contents>
28
  <compatible/>
29
  <dependencies><required><php><min>5.3.0</min><max>9.0.0</max></php></required></dependencies>
30
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Glew</name>
4
+ <version>1.0.15</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
20
  Trending, real-time store performance on a daily, weekly, and yearly, basis.&#xD;
21
  Supports multi-store configurations&#xD;
22
  And more!</description>
23
+ <notes>Fixed issue with getAttributeText where not supported.</notes>
24
  <authors><author><name>Glew</name><user>glewio</user><email>integrations@glew.io</email></author></authors>
25
+ <date>2015-12-16</date>
26
+ <time>14:23:25</time>
27
+ <contents><target name="magecommunity"><dir name="Glew"><dir name="Service"><dir name="Block"><dir name="Adminhtml"><dir name="Widget"><dir name="Info"><file name="Info.php" hash="cb7f32c9a9d9032d9af801834e4ed5af"/></dir></dir></dir><file name="SecretKey.php" hash="244e68e058d731d96f284a9e9a0bf13a"/></dir><dir name="Helper"><file name="Data.php" hash="e1bcfc59c84b1647949465613a0dd4b4"/></dir><dir name="Model"><file name="Glew.php" hash="e665b255ac5983b937eb60febd4a94bf"/><dir name="Resource"><file name="Setup.php" hash="1608ab53c5846ff80b1413693ad2657e"/></dir><dir name="Types"><file name="AbandonedCart.php" hash="ca99b85c3b2b93795013e1929a0d3613"/><file name="AbandonedCarts.php" hash="05ab68ee8093f149c1ebe7268e0eaf1f"/><file name="Address.php" hash="dac4e96501d687ce8c84ddfcc18a8327"/><file name="Categories.php" hash="7f3bb262405c9a9032688093ba6187aa"/><file name="Category.php" hash="a75878be202411265d91a20dd4afa457"/><file name="Customer.php" hash="e1f2058d9358d89a48715f151ab45755"/><file name="Customers.php" hash="656c31b938429d54c2dc4b8c6d7cb259"/><file name="Extension.php" hash="3a0bc967154cfd1ac5e9534ae96921fc"/><file name="Extensions.php" hash="4982616cd7bb0e5770b692420b8bb6cf"/><file name="Inventory.php" hash="4a6442574e2c4c640a1c88e4ca6b87fb"/><file name="InventoryItem.php" hash="7822e8679d17a4806a41e935dcdf950d"/><file name="Order.php" hash="f17622408310699e6cbccbb4b02e1ac3"/><file name="OrderItem.php" hash="b60ae77da7d234c0feebb347f964f8f1"/><file name="OrderItems.php" hash="3d63cc89cdcb79632183eca0a2c7bd82"/><file name="Orders.php" hash="8f215ef68dfa393acfb4a5380d111f75"/><file name="Product.php" hash="65ded98b28ad64da908f74ce1b3cff69"/><file name="ProductAlert.php" hash="e7ca7668907dad5547d80ad581519e78"/><file name="ProductAlerts.php" hash="767c8c527156a11ab376292c10c8fd5d"/><file name="Products.php" hash="e6890059117a05d6d1006c13ddf15855"/><file name="Refund.php" hash="1b79b89a2ac66cc0dfb05e1f3100f98c"/><file name="RefundItem.php" hash="1d43007ec2bb990eb08b8d0a2812f4ca"/><file name="RefundItems.php" hash="7b7511e30194b13db1f8671027fe913a"/><file name="Refunds.php" hash="1073e14c4e82f00d0f25eb4dcff48669"/><file name="Store.php" hash="455923168b5d2550af6b862d776db3f2"/><file name="Stores.php" hash="5d057d09db03554807d763d29ade16e9"/><file name="Subscriber.php" hash="727153725fc7be3fd093422d6a67dfa1"/><file name="Subscribers.php" hash="a17ea2cc95f206989fd0b3612fd9f9bb"/></dir></dir><dir name="controllers"><file name="ModuleController.php" hash="aacae6db78a87a94e8e6cdfd0798d87f"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d2d95c59dc81f92df0ed6adaba801a52"/><file name="config.xml" hash="a7038a582e3c8a5b157c3507b5620df2"/><file name="system.xml" hash="07aa4da88108940bf267cb2abb854eab"/></dir><dir name="sql"><dir name="glew_setup"><file name="mysql4-install-1.0.0.php" hash="d515369cd1867cf970f27352d927e402"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Glew_Service.xml" hash="db2470cc1c1c36b01cea61416a3f6f37"/></dir></target></contents>
28
  <compatible/>
29
  <dependencies><required><php><min>5.3.0</min><max>9.0.0</max></php></required></dependencies>
30
  </package>