Glew - Version 1.0.21

Version Notes

Added support for product image of simple product of a configurable product.

Download this release

Release Info

Developer Glew
Extension Glew
Version 1.0.21
Comparing to
See all releases


Code changes from version 1.0.20 to 1.0.21

app/code/community/Glew/Service/Model/Types/.Product.php.swp ADDED
Binary file
app/code/community/Glew/Service/Model/Types/Product.php CHANGED
@@ -12,6 +12,14 @@ class Glew_Service_Model_Types_Product
12
  $this->type_id = $product->getData('type_id');
13
  $this->category_ids = $product->getCategoryIds();
14
 
 
 
 
 
 
 
 
 
15
  foreach ($productAttributes as $field => $usesSource) {
16
  try {
17
  $value = $product->getData($field);
@@ -19,7 +27,10 @@ class Glew_Service_Model_Types_Product
19
  continue;
20
  }
21
 
22
- if ($field == 'image' && $value) {
 
 
 
23
  $imageUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$value;
24
  $this->$field = $imageUrl;
25
  continue;
12
  $this->type_id = $product->getData('type_id');
13
  $this->category_ids = $product->getCategoryIds();
14
 
15
+ $parentProductIds = Mage::getResourceSingleton('catalog/product_type_configurable')
16
+ ->getParentIdsByChild($productId);
17
+ if($parentProductIds) {
18
+ $resource = Mage::getResourceSingleton('catalog/product');
19
+ $this->parent_product_id = $parentProductIds[0];
20
+ $parentProductImage = $resource->getAttributeRawValue($parentProductIds[0], 'image', Mage::app()->getStore());
21
+ }
22
+
23
  foreach ($productAttributes as $field => $usesSource) {
24
  try {
25
  $value = $product->getData($field);
27
  continue;
28
  }
29
 
30
+ if ($field == 'image') {
31
+ if((!$value || $value == 'no_selection') && $parentProductImage) {
32
+ $value = $parentProductImage;
33
+ }
34
  $imageUrl = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA).'catalog/product'.$value;
35
  $this->$field = $imageUrl;
36
  continue;
app/code/community/Glew/Service/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Glew_Service>
5
- <version>1.0.20</version>
6
  <depends>
7
  <Mage_Shipping/>
8
  </depends>
2
  <config>
3
  <modules>
4
  <Glew_Service>
5
+ <version>1.0.21</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.20</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
@@ -21,15 +21,13 @@ Trending, real-time store performance on a daily, weekly, and yearly, basis.&#xD
21
  Merchandising,&#xD;
22
  Inventory,&#xD;
23
  Supports multi-store configurations&#xD;
24
- And more!</description>
25
- <notes>Added support for different root categories.&#xD;
26
- Added store url to config screen&#xD;
27
- Added single id calls to all api endpoints&#xD;
28
- </notes>
29
  <authors><author><name>Glew</name><user>glewio</user><email>integrations@glew.io</email></author></authors>
30
  <date>2016-04-06</date>
31
- <time>14:25:15</time>
32
- <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="6f0dd72fec342ae51953d257c292604a"/></dir></dir></dir><file name="SecretKey.php" hash="48b0b811eaea90539ed2527cb7c88894"/><file name="StoreUrl.php" hash="0feb5ecf9041195a2a3241a979333639"/></dir><dir name="Helper"><file name="Data.php" hash="76c2aa275862ee7e6cb61bb01fe9b875"/></dir><dir name="Model"><file name="Glew.php" hash="b3323852fa360da0f98cf72b43b903c7"/><dir name="Resource"><file name="Setup.php" hash="1608ab53c5846ff80b1413693ad2657e"/></dir><dir name="Types"><file name="AbandonedCart.php" hash="a192370e52bb9e39f17f792b80c15167"/><file name="AbandonedCarts.php" hash="bad5b6ca120808e0bce5e477990865b6"/><file name="Address.php" hash="163419049653b6415ae33aaabd182914"/><file name="Categories.php" hash="b178b1476b2e091f52a44284142d9035"/><file name="Category.php" hash="d61c83a8bf843629ea4f9e101b88e24b"/><file name="Customer.php" hash="684dff09fa7ee1825e43a7b19503d5b6"/><file name="Customers.php" hash="aa6566f45263c4cecd0aa292cd6cfe0f"/><file name="Extension.php" hash="8da4b95f9ca4cd9b1fe39954ed4b2b33"/><file name="Extensions.php" hash="8bdee566c6580d208999b7894ba3a299"/><file name="Inventory.php" hash="363ae968f743895924bbea951f0680b3"/><file name="InventoryItem.php" hash="c032188e8142604e5d3987c39e5e955b"/><file name="Order.php" hash="1ec557ba14fb6ddbcce0d68974b1e005"/><file name="OrderItem.php" hash="5f0e331dc8da0b563ffadb85e828e328"/><file name="OrderItems.php" hash="be688a0caff8862a6e07127f5e644beb"/><file name="Orders.php" hash="1adf32e6dc58e1408c5e2d2c24bf9eb5"/><file name="Product.php" hash="46515fdedf672c3908cf6bba6e0baec8"/><file name="ProductAlert.php" hash="29cf20364651285abf2924f4af6a08f5"/><file name="ProductAlerts.php" hash="de7a7f9fc29a0080dfd9b86f8730cff7"/><file name="Products.php" hash="cfb92207911b4eab6f67689a47d68e29"/><file name="Refund.php" hash="95b166b72360c23f38b38eea00f1c8be"/><file name="RefundItem.php" hash="2570ba6b14be44a48d0fec222ff7e5d9"/><file name="RefundItems.php" hash="75b87b708753ffa4d174216266bbbf3c"/><file name="Refunds.php" hash="c4da0487aac0c6d53364a56be9557796"/><file name="Store.php" hash="e2a6b48ba078d616179a8327f5eede50"/><file name="Stores.php" hash="13419825a201508e996f40429d9e1b58"/><file name="Subscriber.php" hash="7f7f902d7daacc1bd5924899fd7fed9b"/><file name="Subscribers.php" hash="3c4e56eac705bc8b2fdc188e9bb1e527"/></dir></dir><dir name="controllers"><file name="ModuleController.php" hash="f72fe76ae78bbf70c14c78b3db29e947"/></dir><dir name="etc"><file name="adminhtml.xml" hash="520835c098aa86d39edf248ce9fa4869"/><file name="config.xml" hash="70d8913c734d94c2bafb3aabe5e492bd"/><file name="system.xml" hash="8950c687c9a83bfbd109a9f0a74367b3"/></dir><dir name="sql"><dir name="glew_setup"><file name="mysql4-install-1.0.0.php" hash="29346b603eb9a4cf6e2a43b0a3c25d6a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Glew_Service.xml" hash="a245647f56ed8f1553ee6dc41bb0b223"/></dir></target></contents>
33
  <compatible/>
34
  <dependencies><required><php><min>5.3.0</min><max>9.0.0</max></php></required></dependencies>
35
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Glew</name>
4
+ <version>1.0.21</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
21
  Merchandising,&#xD;
22
  Inventory,&#xD;
23
  Supports multi-store configurations&#xD;
24
+ And more!&#xD;
25
+ </description>
26
+ <notes>Added support for product image of simple product of a configurable product.</notes>
 
 
27
  <authors><author><name>Glew</name><user>glewio</user><email>integrations@glew.io</email></author></authors>
28
  <date>2016-04-06</date>
29
+ <time>20:55:45</time>
30
+ <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="6f0dd72fec342ae51953d257c292604a"/></dir></dir></dir><file name="SecretKey.php" hash="48b0b811eaea90539ed2527cb7c88894"/><file name="StoreUrl.php" hash="0feb5ecf9041195a2a3241a979333639"/></dir><dir name="Helper"><file name="Data.php" hash="76c2aa275862ee7e6cb61bb01fe9b875"/></dir><dir name="Model"><file name="Glew.php" hash="b3323852fa360da0f98cf72b43b903c7"/><dir name="Resource"><file name="Setup.php" hash="1608ab53c5846ff80b1413693ad2657e"/></dir><dir name="Types"><file name="AbandonedCart.php" hash="a192370e52bb9e39f17f792b80c15167"/><file name="AbandonedCarts.php" hash="bad5b6ca120808e0bce5e477990865b6"/><file name="Address.php" hash="163419049653b6415ae33aaabd182914"/><file name="Categories.php" hash="b178b1476b2e091f52a44284142d9035"/><file name="Category.php" hash="d61c83a8bf843629ea4f9e101b88e24b"/><file name="Customer.php" hash="684dff09fa7ee1825e43a7b19503d5b6"/><file name="Customers.php" hash="aa6566f45263c4cecd0aa292cd6cfe0f"/><file name="Extension.php" hash="8da4b95f9ca4cd9b1fe39954ed4b2b33"/><file name="Extensions.php" hash="8bdee566c6580d208999b7894ba3a299"/><file name="Inventory.php" hash="363ae968f743895924bbea951f0680b3"/><file name="InventoryItem.php" hash="c032188e8142604e5d3987c39e5e955b"/><file name="Order.php" hash="1ec557ba14fb6ddbcce0d68974b1e005"/><file name="OrderItem.php" hash="5f0e331dc8da0b563ffadb85e828e328"/><file name="OrderItems.php" hash="be688a0caff8862a6e07127f5e644beb"/><file name="Orders.php" hash="1adf32e6dc58e1408c5e2d2c24bf9eb5"/><file name="Product.php" hash="20b4dc428793da1e49e970b2e9899b87"/><file name="ProductAlert.php" hash="29cf20364651285abf2924f4af6a08f5"/><file name="ProductAlerts.php" hash="de7a7f9fc29a0080dfd9b86f8730cff7"/><file name="Products.php" hash="cfb92207911b4eab6f67689a47d68e29"/><file name="Refund.php" hash="95b166b72360c23f38b38eea00f1c8be"/><file name="RefundItem.php" hash="2570ba6b14be44a48d0fec222ff7e5d9"/><file name="RefundItems.php" hash="75b87b708753ffa4d174216266bbbf3c"/><file name="Refunds.php" hash="c4da0487aac0c6d53364a56be9557796"/><file name="Store.php" hash="e2a6b48ba078d616179a8327f5eede50"/><file name="Stores.php" hash="13419825a201508e996f40429d9e1b58"/><file name="Subscriber.php" hash="7f7f902d7daacc1bd5924899fd7fed9b"/><file name="Subscribers.php" hash="3c4e56eac705bc8b2fdc188e9bb1e527"/><file name=".Product.php.swp" hash="598c5c6aab5078c6376c4f53d3f65cef"/></dir></dir><dir name="controllers"><file name="ModuleController.php" hash="f72fe76ae78bbf70c14c78b3db29e947"/></dir><dir name="etc"><file name="adminhtml.xml" hash="520835c098aa86d39edf248ce9fa4869"/><file name="config.xml" hash="182e31a084ca44beeecdb88515d9d0ce"/><file name="system.xml" hash="8950c687c9a83bfbd109a9f0a74367b3"/></dir><dir name="sql"><dir name="glew_setup"><file name="mysql4-install-1.0.0.php" hash="29346b603eb9a4cf6e2a43b0a3c25d6a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Glew_Service.xml" hash="a245647f56ed8f1553ee6dc41bb0b223"/></dir></target></contents>
31
  <compatible/>
32
  <dependencies><required><php><min>5.3.0</min><max>9.0.0</max></php></required></dependencies>
33
  </package>