shoppingfeeder - Version 1.4.5

Version Notes

More flexible support for variant attribute values

Download this release

Release Info

Developer ShoppingFeeder
Extension shoppingfeeder
Version 1.4.5
Comparing to
See all releases


Code changes from version 1.4.4 to 1.4.5

app/code/community/ShoppingFeeder/Service/Model/Offers.php CHANGED
@@ -44,6 +44,7 @@ class ShoppingFeeder_Service_Model_Offers extends Mage_Core_Model_Abstract
44
  $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
45
 
46
  $attributes = $product->getAttributes();
 
47
  $manufacturer = '';
48
  $brand = '';
49
 
@@ -59,7 +60,15 @@ class ShoppingFeeder_Service_Model_Offers extends Mage_Core_Model_Abstract
59
  {
60
  $attributeCode = $attribute->getAttributeCode();
61
  $attributeLabel = $attribute->getData('frontend_label');
62
- $value = $attribute->getFrontend()->getValue($product);
 
 
 
 
 
 
 
 
63
 
64
  // var_dump($attributeCode. ' : '.print_r($value, true));
65
  // var_dump($attributeLabel. ' : '.print_r($value, true));
@@ -199,6 +208,7 @@ class ShoppingFeeder_Service_Model_Offers extends Mage_Core_Model_Abstract
199
 
200
  if ($isVariant && isset($variant))
201
  {
 
202
  $p['internal_variant_id'] = $variant->getId();
203
 
204
  $variantOptionsTitle = array();
@@ -375,8 +385,22 @@ class ShoppingFeeder_Service_Model_Offers extends Mage_Core_Model_Abstract
375
  /** @var Mage_Catalog_Model_Product_Type_Configurable $configModel */
376
  $configModel = Mage::getModel('catalog/product_type_configurable');
377
 
378
- //$children = $configModel->getChildrenIds($product->getId());
379
- $children = $configModel->getUsedProducts(null,$product);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
380
 
381
  if (count($children) > 0)
382
  {
@@ -410,10 +434,10 @@ class ShoppingFeeder_Service_Model_Offers extends Mage_Core_Model_Abstract
410
  $variantOptions['refactoredOptions'] = $variantAttributes;
411
 
412
 
413
- foreach ($children as $variant)
414
  {
415
  /** @var Mage_Catalog_Model_Product $variant */
416
- //$variant = Mage::getModel('catalog/product')->load($variantId);
417
 
418
  $productData = $this->getProductInfo($variant, $parent, $variantOptions, $lastUpdate, $priceCurrency, $priceCurrencyRate);
419
  if (!empty($productData))
44
  $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product);
45
 
46
  $attributes = $product->getAttributes();
47
+
48
  $manufacturer = '';
49
  $brand = '';
50
 
60
  {
61
  $attributeCode = $attribute->getAttributeCode();
62
  $attributeLabel = $attribute->getData('frontend_label');
63
+
64
+ if ($isVariant)
65
+ {
66
+ $value = $attribute->getFrontend()->getValue($variant);
67
+ }
68
+ else
69
+ {
70
+ $value = $attribute->getFrontend()->getValue($product);
71
+ }
72
 
73
  // var_dump($attributeCode. ' : '.print_r($value, true));
74
  // var_dump($attributeLabel. ' : '.print_r($value, true));
208
 
209
  if ($isVariant && isset($variant))
210
  {
211
+ // var_dump($usefulAttributes);
212
  $p['internal_variant_id'] = $variant->getId();
213
 
214
  $variantOptionsTitle = array();
385
  /** @var Mage_Catalog_Model_Product_Type_Configurable $configModel */
386
  $configModel = Mage::getModel('catalog/product_type_configurable');
387
 
388
+ // $timeStart = microtime(true);
389
+ // $children = $configModel->getChildrenIds($product->getId());
390
+ // $children = array_pop($children);
391
+ // var_dump("Time for GetIDs: ".(microtime(true) - $timeStart));
392
+
393
+ $timeStart = microtime(true);
394
+ $children = Mage::getResourceSingleton('catalog/product_type_configurable')
395
+ ->getChildrenIds($product->getId());
396
+ // var_dump("Time for GetIDs 2: ".(microtime(true) - $timeStart));
397
+ $children = array_pop($children);
398
+ // var_dump($children);
399
+
400
+ // $timeStart = microtime(true);
401
+ // $children = $configModel->getUsedProducts(null,$product);
402
+ // var_dump("Time for GetUsed: ".(microtime(true) - $timeStart));
403
+ // exit();
404
 
405
  if (count($children) > 0)
406
  {
434
  $variantOptions['refactoredOptions'] = $variantAttributes;
435
 
436
 
437
+ foreach ($children as $variantId)
438
  {
439
  /** @var Mage_Catalog_Model_Product $variant */
440
+ $variant = Mage::getModel('catalog/product')->load($variantId);
441
 
442
  $productData = $this->getProductInfo($variant, $parent, $variantOptions, $lastUpdate, $priceCurrency, $priceCurrencyRate);
443
  if (!empty($productData))
app/code/community/ShoppingFeeder/Service/controllers/VersionController.php CHANGED
@@ -5,7 +5,7 @@ require_once(Mage::getModuleDir('Controller','ShoppingFeeder_Service').DS.'Contr
5
 
6
  class ShoppingFeeder_Service_VersionController extends Mage_Core_Controller_Front_Action
7
  {
8
- protected static $_version = '1.4.4';
9
 
10
  public function indexAction()
11
  {
5
 
6
  class ShoppingFeeder_Service_VersionController extends Mage_Core_Controller_Front_Action
7
  {
8
+ protected static $_version = '1.4.5';
9
 
10
  public function indexAction()
11
  {
app/code/community/ShoppingFeeder/Service/etc/config.xml CHANGED
@@ -9,7 +9,7 @@
9
  <config>
10
  <modules>
11
  <ShoppingFeeder_Service>
12
- <version>1.4.4</version>
13
  </ShoppingFeeder_Service>
14
  </modules>
15
  <global>
9
  <config>
10
  <modules>
11
  <ShoppingFeeder_Service>
12
+ <version>1.4.5</version>
13
  </ShoppingFeeder_Service>
14
  </modules>
15
  <global>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>shoppingfeeder</name>
4
- <version>1.4.4</version>
5
  <stability>stable</stability>
6
  <license>GNU General Public License (GPL)</license>
7
  <channel>community</channel>
@@ -16,11 +16,11 @@ Use ShoppingFeeder to import your Shopify product catalogue, export it to numero
16
  Export to Google, Shopping.com, Nextag, kelkoo, PriceCheck, Shopmania, Fruugo and more!&#xD;
17
  &#xD;
18
  To set up your ShoppingFeeder account and install this extension seamlessly, create an account at: &lt;a href="http://www.shoppingfeeder.com/register"&gt;http://www.shoppingfeeder.com/register&lt;/a&gt;</description>
19
- <notes>Bugfix for category listing in Facebook Audience Pixel Tracking</notes>
20
  <authors><author><name>ShoppingFeeder</name><user>shoppingfeeder</user><email>support@shoppingfeeder.com</email></author></authors>
21
- <date>2015-10-22</date>
22
- <time>20:58:03</time>
23
- <contents><target name="mageetc"><dir name="modules"><file name="ShoppingFeeder_Service.xml" hash="90b374109c2d1281ddf527f24fa7d914"/></dir></target><target name="magecommunity"><dir name="ShoppingFeeder"><dir name="Fbtrack"><dir name="Block"><dir name="Adminhtml"><file name="Service.php" hash="2c0bb6d0c7f965c9583cfaae4890d053"/></dir><file name="Service.php" hash="56cd6921b7bda27e2ed66b80af1d927f"/><dir name="Tracking"><file name="Fb.php" hash="1926b36b1d6092b7566e2688559fa895"/></dir></dir><dir name="Helper"><file name="Data.php" hash="87df6b00fcfb2008697cf46d6d18cf75"/></dir><dir name="Model"><file name="Observer.php" hash="dc3282bb0795790a95abd781e9394ece"/></dir><dir name="etc"><file name="config.xml" hash="2cbb1a1b1f6f9ecc77bf0eb406941a17"/><file name="system.xml" hash="227c0ffc63ff10b814d42cd9a8f8bad4"/></dir></dir><dir name="Service"><dir name="Block"><dir name="Adminhtml"><file name="Service.php" hash="8feb1712d6aa6a6897be8f80ba5d3f0b"/></dir><file name="Service.php" hash="48874f0e80ce70686b81eb5380e9f498"/><dir name="Tracking"><file name="Fb.php" hash="060687f842c896df73feb233b68b069b"/></dir></dir><dir name="Controller"><file name="FrontAuth.php" hash="28ed32e1bf3250362911a26869f0e6d7"/></dir><dir name="Helper"><file name="Data.php" hash="17589bd08352e497806bef9884972300"/></dir><dir name="Model"><file name="Auth.php" hash="2cff17b0750ff70695b32524627b2aaf"/><file name="Observer.php" hash="eb7443554b58eeeb4687ebc2ee6db5ff"/><file name="Offers.php" hash="5fc604e2cd8ea4dc6a917da55c17758c"/><file name="Orders.php" hash="cc3c9f38ae41c11ab7dda0bcb8dd001f"/></dir><dir name="controllers"><file name="AttributesController.php" hash="e937c492f770bc8381a003a080cf878b"/><file name="FeedController.php" hash="92b70af3a048ece99d262480c51aa862"/><file name="OrdersController.php" hash="e0dcf407e15ca212b43ee0015c918675"/><file name="StoresController.php" hash="a29fa0e97299ce764fd66360cbf6632a"/><file name="TestController.php" hash="5138a844cb7cbc8e792df664057bdf9b"/><file name="VersionController.php" hash="4cd9c15c05380019a60333de3a165c37"/></dir><dir name="data"><file name="cacert.pem" hash="380df856e8f789c1af97d0da9a243769"/></dir><dir name="etc"><file name="config.xml" hash="96f8283f8236461be8b57c3c01c5dc53"/><file name="system.xml" hash="e358d831424ccacdd393dfac49b8a994"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="shoppingfeeder_service.xml" hash="4f3a5b5018c0328da4f9490d4c6042fd"/></dir><dir name="template"><dir name="shoppingfeeder"><file name="fbtrack.phtml" hash="9b07f8b42132ee2f675d67ab9e01f675"/><file name="fbtrack_standalone.phtml" hash="9b07f8b42132ee2f675d67ab9e01f675"/></dir></dir></dir></dir></dir></target></contents>
24
  <compatible/>
25
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
26
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>shoppingfeeder</name>
4
+ <version>1.4.5</version>
5
  <stability>stable</stability>
6
  <license>GNU General Public License (GPL)</license>
7
  <channel>community</channel>
16
  Export to Google, Shopping.com, Nextag, kelkoo, PriceCheck, Shopmania, Fruugo and more!&#xD;
17
  &#xD;
18
  To set up your ShoppingFeeder account and install this extension seamlessly, create an account at: &lt;a href="http://www.shoppingfeeder.com/register"&gt;http://www.shoppingfeeder.com/register&lt;/a&gt;</description>
19
+ <notes>More flexible support for variant attribute values</notes>
20
  <authors><author><name>ShoppingFeeder</name><user>shoppingfeeder</user><email>support@shoppingfeeder.com</email></author></authors>
21
+ <date>2015-10-29</date>
22
+ <time>12:02:37</time>
23
+ <contents><target name="mageetc"><dir name="modules"><file name="ShoppingFeeder_Service.xml" hash="90b374109c2d1281ddf527f24fa7d914"/></dir></target><target name="magecommunity"><dir name="ShoppingFeeder"><dir name="Fbtrack"><dir name="Block"><dir name="Adminhtml"><file name="Service.php" hash="2c0bb6d0c7f965c9583cfaae4890d053"/></dir><file name="Service.php" hash="56cd6921b7bda27e2ed66b80af1d927f"/><dir name="Tracking"><file name="Fb.php" hash="1926b36b1d6092b7566e2688559fa895"/></dir></dir><dir name="Helper"><file name="Data.php" hash="87df6b00fcfb2008697cf46d6d18cf75"/></dir><dir name="Model"><file name="Observer.php" hash="dc3282bb0795790a95abd781e9394ece"/></dir><dir name="etc"><file name="config.xml" hash="2cbb1a1b1f6f9ecc77bf0eb406941a17"/><file name="system.xml" hash="227c0ffc63ff10b814d42cd9a8f8bad4"/></dir></dir><dir name="Service"><dir name="Block"><dir name="Adminhtml"><file name="Service.php" hash="8feb1712d6aa6a6897be8f80ba5d3f0b"/></dir><file name="Service.php" hash="48874f0e80ce70686b81eb5380e9f498"/><dir name="Tracking"><file name="Fb.php" hash="060687f842c896df73feb233b68b069b"/></dir></dir><dir name="Controller"><file name="FrontAuth.php" hash="28ed32e1bf3250362911a26869f0e6d7"/></dir><dir name="Helper"><file name="Data.php" hash="17589bd08352e497806bef9884972300"/></dir><dir name="Model"><file name="Auth.php" hash="2cff17b0750ff70695b32524627b2aaf"/><file name="Observer.php" hash="eb7443554b58eeeb4687ebc2ee6db5ff"/><file name="Offers.php" hash="611a312517374bb23e4785f3e346121b"/><file name="Orders.php" hash="cc3c9f38ae41c11ab7dda0bcb8dd001f"/></dir><dir name="controllers"><file name="AttributesController.php" hash="e937c492f770bc8381a003a080cf878b"/><file name="FeedController.php" hash="92b70af3a048ece99d262480c51aa862"/><file name="OrdersController.php" hash="e0dcf407e15ca212b43ee0015c918675"/><file name="StoresController.php" hash="a29fa0e97299ce764fd66360cbf6632a"/><file name="TestController.php" hash="5138a844cb7cbc8e792df664057bdf9b"/><file name="VersionController.php" hash="f1bdefcee15df7825112cd907e7ee2ed"/></dir><dir name="data"><file name="cacert.pem" hash="380df856e8f789c1af97d0da9a243769"/></dir><dir name="etc"><file name="config.xml" hash="9114054424f70360be8811f1cbe10e1a"/><file name="system.xml" hash="e358d831424ccacdd393dfac49b8a994"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="shoppingfeeder_service.xml" hash="4f3a5b5018c0328da4f9490d4c6042fd"/></dir><dir name="template"><dir name="shoppingfeeder"><file name="fbtrack.phtml" hash="9b07f8b42132ee2f675d67ab9e01f675"/><file name="fbtrack_standalone.phtml" hash="9b07f8b42132ee2f675d67ab9e01f675"/></dir></dir></dir></dir></dir></target></contents>
24
  <compatible/>
25
  <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
26
  </package>