ShipHero - Version 1.0.1.7

Version Notes

- Added support for Boost My Shop multi-warehouse management

Download this release

Release Info

Developer Fareed Hosein
Extension ShipHero
Version 1.0.1.7
Comparing to
See all releases


Code changes from version 1.0.1.6 to 1.0.1.7

app/code/community/ShipHero/CatalogExtApi/Model/Api2/Product/Rest/Admin/V1.php CHANGED
@@ -123,8 +123,21 @@ class ShipHero_CatalogExtApi_Model_Api2_Product_Rest_Admin_V1 extends Mage_Catal
123
  );
124
  }
125
  }
126
-
127
- $stock = $product['stock_item']->getData();
 
 
 
 
 
 
 
 
 
 
 
 
 
128
 
129
  foreach ($product->getMediaGalleryImages() as $image) {
130
  $images[] = array('url' => $image->getUrl(), 'position' => $image->getPosition());
123
  );
124
  }
125
  }
126
+
127
+ // Check if Advanced Stock Module is installed so we can pull stock from all warehouses
128
+ $stock = array();
129
+ $modules = Mage::getConfig()->getNode('modules')->children();
130
+ $modulesArray = (array)$modules;
131
+ if(isset($modulesArray['MDN_AdvancedStock'])) {
132
+ $collection = Mage::getModel('cataloginventory/stock_item')
133
+ ->getCollection()
134
+ ->join('AdvancedStock/Warehouse', 'main_table.stock_id=`AdvancedStock/Warehouse`.stock_id')
135
+ ->addFieldToFilter('product_id', $p['entity_id']);
136
+
137
+ $stock = $collection->getData();
138
+ } else {
139
+ $stock = $product['stock_item']->getData();
140
+ }
141
 
142
  foreach ($product->getMediaGalleryImages() as $image) {
143
  $images[] = array('url' => $image->getUrl(), 'position' => $image->getPosition());
app/code/community/ShipHero/WebHooks/Model/ProductObserver.php CHANGED
@@ -73,6 +73,25 @@ class ShipHero_WebHooks_Model_ProductObserver
73
  // Retrieve the product being updated from the event observer
74
  $stock = $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product["entity_id"])->getData();
75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  $images = array();
77
  foreach($product->getMediaGalleryImages() as $image)
78
  {
@@ -107,6 +126,7 @@ class ShipHero_WebHooks_Model_ProductObserver
107
  "status" => $product["status"],
108
  "quantity" => $stock['qty'],
109
  "stock_item_id" => $stock_item_id,
 
110
  "store_id" => $store_id,
111
  "images" => $images,
112
  "attributes" => $this->attributes,
73
  // Retrieve the product being updated from the event observer
74
  $stock = $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product["entity_id"])->getData();
75
 
76
+ // Check if Advanced Stock Module is installed so we can pull stock from all warehouses
77
+ $stockData = array();
78
+ $modules = Mage::getConfig()->getNode('modules')->children();
79
+ $modulesArray = (array)$modules;
80
+ if(isset($modulesArray['MDN_AdvancedStock'])) {
81
+ $collection = Mage::getModel('cataloginventory/stock_item')
82
+ ->getCollection()
83
+ ->join('AdvancedStock/Warehouse', 'main_table.stock_id=`AdvancedStock/Warehouse`.stock_id')
84
+ ->addFieldToFilter('product_id', $product["entity_id"]);
85
+
86
+ $stocks = $collection->getData();
87
+ foreach($stocks as $s){
88
+ $stockData[] = array(
89
+ 'quantity' => $s['qty'],
90
+ 'stock_item_id' => $s['item_id']
91
+ );
92
+ }
93
+ }
94
+
95
  $images = array();
96
  foreach($product->getMediaGalleryImages() as $image)
97
  {
126
  "status" => $product["status"],
127
  "quantity" => $stock['qty'],
128
  "stock_item_id" => $stock_item_id,
129
+ "multi_stock_data" => $stockData,
130
  "store_id" => $store_id,
131
  "images" => $images,
132
  "attributes" => $this->attributes,
package.xml CHANGED
@@ -1,8 +1,8 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ShipHero</name>
4
- <version>1.0.1.6</version>
5
- <stability>beta</stability>
6
  <license>GNU General Public License (GPL)</license>
7
  <channel>community</channel>
8
  <extends/>
@@ -40,11 +40,11 @@ You can see the status of the order in real time and the history of the order in
40
  &lt;p&gt;Please do! Contact us at 1-(877) 671-6011 or &lt;a href="mailto:hello@shiphero.com"&gt;hello@shiphero.com&lt;/a&gt;&lt;/p&gt;&#xD;
41
  &#xD;
42
  &lt;p /&gt;Want to know more about ShipHero? &lt;a href="http://www.ShipHero.com"&gt;Watch video of ShipHero in action, and learn about the full set of features.&lt;/a&gt;</description>
43
- <notes>- Fixed shipping method tracking</notes>
44
  <authors><author><name>Fareed Hosein</name><user>shipherollc</user><email>roger@shiphero.com</email></author></authors>
45
- <date>2015-06-01</date>
46
- <time>03:12:09</time>
47
- <contents><target name="magecommunity"><dir name="ShipHero"><dir name="CatalogExtApi"><dir name="Model"><dir name="Api2"><dir name="Product"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="b5d32a3da264d3ae841ac62888016b10"/></dir><file name=".DS_Store" hash="82133767cb30f899e06a57a6c0215a3d"/></dir></dir></dir></dir><dir name="etc"><file name="api2.xml" hash="a84153a82d1ca4b37909cb836fb0df78"/><file name="config.xml" hash="75fca57d73d1909bfb92a0b4116c3b24"/></dir></dir><dir name="CategoriesExtApi"><dir name="Model"><dir name="Api2"><dir name="Categories"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="1b2132443dacf2e8b7bab5e7aef17765"/></dir></dir></dir><file name="Categories.php" hash="a3e20a32e745bf4360019bd18a77cb3d"/></dir></dir><dir name="etc"><file name="api2.xml" hash="3ecd699dcd137862f6b92bc963b3556f"/><file name="config.xml" hash="286f5304b1db4bffe69238ea661af011"/></dir></dir><dir name="PaymentExtApi"><dir name="Model"><dir name="Api2"><dir name="Payment"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="d172248ff949effa3990191c6a037ef3"/></dir></dir></dir><file name="Payment.php" hash="dd379bf5c286b0924111db0a8fadd658"/></dir></dir><dir name="etc"><file name="api2.xml" hash="792e6b7c9f17b551cb327267427ac128"/><file name="config.xml" hash="3a0e38693d058eb48521a4325b761b2e"/></dir></dir><dir name="SalesExtApi"><dir name="Model"><dir name="Api2"><dir name="Order"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="6dc32a11bbafa30b2de231e99afcd6d1"/></dir></dir></dir></dir></dir><dir name="etc"><file name="api2.xml" hash="7fd3830df03511ab3fd8923e9bf490dc"/><file name="config.xml" hash="a0817be74340d9f9e12861993e5ee2c9"/></dir></dir><dir name="ShipmentExtApi"><dir name="Model"><dir name="Api2"><dir name="Shipment"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="abdb59626a9bd4af1466159ee2383883"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir></dir><file name="Shipment.php" hash="8a804aecde89f00f4d013253e8526cfb"/></dir></dir><dir name="etc"><file name="api2.xml" hash="84d7bb1a150b5b94f0797403ef656f45"/><file name="config.xml" hash="6bcba4e8b893bb78eadfb6038fa01927"/></dir></dir><dir name="WebHooks"><dir name="Model"><file name="OrderObserver.php" hash="d739ed8ae23069cb668fade2fe87418a"/><file name="ProductObserver.php" hash="c6da509d06a30fb18f32b2004a1d8893"/><dir name="Resource"><file name="Setup.php" hash="428887c1ea6151a293d3d4b633963bce"/></dir></dir><dir name="etc"><file name="config.xml" hash="e5e8d6595e85311f3617f63b813e8e35"/><dir name="webapi"><file name="acl.xml" hash="444730c8892d9a14c169b6cd96da1cdd"/></dir></dir><dir name="sql"><dir name="shiphero_setup"><file name="install-0.1.0.php" hash="b793368264d3637cb831dd1ec2dbbeae"/></dir></dir><file name=".DS_Store" hash="5877fb6bf8ef0d0b1ae94df92d07d4cb"/></dir><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></target><target name="mageetc"><dir name="modules"><file name="ShipHero.xml" hash="f6f6ffa93e8158fa631eb960d8872d46"/></dir></target></contents>
48
  <compatible/>
49
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.7.0</min><max>2.0.0</max></package></required></dependencies>
50
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>ShipHero</name>
4
+ <version>1.0.1.7</version>
5
+ <stability>stable</stability>
6
  <license>GNU General Public License (GPL)</license>
7
  <channel>community</channel>
8
  <extends/>
40
  &lt;p&gt;Please do! Contact us at 1-(877) 671-6011 or &lt;a href="mailto:hello@shiphero.com"&gt;hello@shiphero.com&lt;/a&gt;&lt;/p&gt;&#xD;
41
  &#xD;
42
  &lt;p /&gt;Want to know more about ShipHero? &lt;a href="http://www.ShipHero.com"&gt;Watch video of ShipHero in action, and learn about the full set of features.&lt;/a&gt;</description>
43
+ <notes>- Added support for Boost My Shop multi-warehouse management</notes>
44
  <authors><author><name>Fareed Hosein</name><user>shipherollc</user><email>roger@shiphero.com</email></author></authors>
45
+ <date>2015-06-23</date>
46
+ <time>03:37:47</time>
47
+ <contents><target name="magecommunity"><dir name="ShipHero"><dir name="CatalogExtApi"><dir name="Model"><dir name="Api2"><dir name="Product"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="24ace0cdbabb0653e9022ce39b0ee3b1"/></dir><file name=".DS_Store" hash="82133767cb30f899e06a57a6c0215a3d"/></dir></dir></dir></dir><dir name="etc"><file name="api2.xml" hash="a84153a82d1ca4b37909cb836fb0df78"/><file name="config.xml" hash="75fca57d73d1909bfb92a0b4116c3b24"/></dir></dir><dir name="CategoriesExtApi"><dir name="Model"><dir name="Api2"><dir name="Categories"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="1b2132443dacf2e8b7bab5e7aef17765"/></dir></dir></dir><file name="Categories.php" hash="a3e20a32e745bf4360019bd18a77cb3d"/></dir></dir><dir name="etc"><file name="api2.xml" hash="3ecd699dcd137862f6b92bc963b3556f"/><file name="config.xml" hash="286f5304b1db4bffe69238ea661af011"/></dir></dir><dir name="PaymentExtApi"><dir name="Model"><dir name="Api2"><dir name="Payment"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="d172248ff949effa3990191c6a037ef3"/></dir></dir></dir><file name="Payment.php" hash="dd379bf5c286b0924111db0a8fadd658"/></dir></dir><dir name="etc"><file name="api2.xml" hash="792e6b7c9f17b551cb327267427ac128"/><file name="config.xml" hash="3a0e38693d058eb48521a4325b761b2e"/></dir></dir><dir name="SalesExtApi"><dir name="Model"><dir name="Api2"><dir name="Order"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="6dc32a11bbafa30b2de231e99afcd6d1"/></dir></dir></dir></dir></dir><dir name="etc"><file name="api2.xml" hash="7fd3830df03511ab3fd8923e9bf490dc"/><file name="config.xml" hash="a0817be74340d9f9e12861993e5ee2c9"/></dir></dir><dir name="ShipmentExtApi"><dir name="Model"><dir name="Api2"><dir name="Shipment"><dir name="Rest"><dir name="Admin"><file name="V1.php" hash="abdb59626a9bd4af1466159ee2383883"/><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></dir></dir><file name="Shipment.php" hash="8a804aecde89f00f4d013253e8526cfb"/></dir></dir><dir name="etc"><file name="api2.xml" hash="84d7bb1a150b5b94f0797403ef656f45"/><file name="config.xml" hash="6bcba4e8b893bb78eadfb6038fa01927"/></dir></dir><dir name="WebHooks"><dir name="Model"><file name="OrderObserver.php" hash="d739ed8ae23069cb668fade2fe87418a"/><file name="ProductObserver.php" hash="65bbff34432a2fb611f905e4dd26937b"/><dir name="Resource"><file name="Setup.php" hash="428887c1ea6151a293d3d4b633963bce"/></dir></dir><dir name="etc"><file name="config.xml" hash="e5e8d6595e85311f3617f63b813e8e35"/><dir name="webapi"><file name="acl.xml" hash="444730c8892d9a14c169b6cd96da1cdd"/></dir></dir><dir name="sql"><dir name="shiphero_setup"><file name="install-0.1.0.php" hash="b793368264d3637cb831dd1ec2dbbeae"/></dir></dir><file name=".DS_Store" hash="5877fb6bf8ef0d0b1ae94df92d07d4cb"/></dir><file name=".DS_Store" hash="194577a7e20bdcc7afbb718f502c134c"/></dir></target><target name="mageetc"><dir name="modules"><file name="ShipHero.xml" hash="f6f6ffa93e8158fa631eb960d8872d46"/></dir></target></contents>
48
  <compatible/>
49
  <dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.7.0</min><max>2.0.0</max></package></required></dependencies>
50
  </package>