LinnLiveConnect - Version 1.1.59

Version Notes

Fixed an issue with multiple select

Download this release

Release Info

Developer Albert Andrejev
Extension LinnLiveConnect
Version 1.1.59
Comparing to
See all releases


Code changes from version 1.1.58 to 1.1.59

app/code/local/LinnSystems/LinnLiveConnect/Helper/Data.php CHANGED
@@ -249,40 +249,50 @@ class LinnSystems_LinnLiveConnect_Helper_Data extends Mage_Core_Helper_Abstract
249
 
250
  $additional_attributes = new stdClass();
251
  $additional_attributes->single_data = array();
252
- $i = 0;
253
 
254
  if (is_array($productData->additional_attributes))
255
  {
256
  foreach ($productData->additional_attributes as $option) {
257
- $additional_attributes->single_data[$i] = new stdClass();
258
- $additional_attributes->single_data[$i]->key = $option->code;
259
-
260
- $value = isset($option->value)? $option->value : "";
261
-
262
- if (isset($_availableOptions[$option->attribute_id]) && isset($_availableOptions[$option->attribute_id][strtolower($option->label)]))
263
- {
264
- $value = $_availableOptions[$option->attribute_id][strtolower($option->label)];
265
- }
266
-
267
 
268
  if ($option->type == 'multiselect')
269
- {
270
- if(!isset($additional_attributes->single_data[$i]->value)){
271
- $additional_attributes->single_data[$i]->value = array();
 
 
272
  }
273
-
274
- array_push($additional_attributes->single_data[$i]->value, $value);
 
 
 
 
 
 
 
275
  }
276
  else
277
  {
278
- $additional_attributes->single_data[$i]->value = $value;
279
- }
 
280
 
281
- $i++;
 
 
 
 
 
 
282
  }
 
 
 
 
283
  }
284
 
285
- if ($i>0)
286
  {
287
  $productData->additional_attributes = $additional_attributes;
288
  }
249
 
250
  $additional_attributes = new stdClass();
251
  $additional_attributes->single_data = array();
252
+ $multiAttributes = array();
253
 
254
  if (is_array($productData->additional_attributes))
255
  {
256
  foreach ($productData->additional_attributes as $option) {
 
 
 
 
 
 
 
 
 
 
257
 
258
  if ($option->type == 'multiselect')
259
+ {
260
+ if(!isset($multiAttributes[$option->code])){
261
+ $multiAttributes[$option->code] = new stdClass();
262
+ $multiAttributes[$option->code]->key = $option->code;
263
+ $multiAttributes[$option->code]->value = array();
264
  }
265
+
266
+ $value = isset($option->value)? $option->value : "";
267
+
268
+ if (isset($_availableOptions[$option->attribute_id]) && isset($_availableOptions[$option->attribute_id][strtolower($option->label)]))
269
+ {
270
+ $value = $_availableOptions[$option->attribute_id][strtolower($option->label)];
271
+ }
272
+
273
+ array_push($multiAttributes[$option->code]->value, $value);
274
  }
275
  else
276
  {
277
+ $newAttribute = new stdClass();
278
+ $newAttribute->key = $option->code;
279
+ $newAttribute->value = isset($option->value)? $option->value : "";
280
 
281
+ if (isset($_availableOptions[$option->attribute_id]) && isset($_availableOptions[$option->attribute_id][strtolower($option->label)]))
282
+ {
283
+ $newAttribute->value = $_availableOptions[$option->attribute_id][strtolower($option->label)];
284
+ }
285
+
286
+ $additional_attributes->single_data[] = $newAttribute;
287
+ }
288
  }
289
+
290
+ foreach($multiAttributes as $key=>$data){
291
+ $additional_attributes->single_data[] = $data;
292
+ }
293
  }
294
 
295
+ if (sizeof($additional_attributes->single_data))
296
  {
297
  $productData->additional_attributes = $additional_attributes;
298
  }
app/code/local/LinnSystems/LinnLiveConnect/Model/Community.php CHANGED
@@ -203,7 +203,7 @@ class LinnSystems_LinnLiveConnect_Model_Community extends LinnSystems_LinnLiveCo
203
  'api_config' => $config,
204
  'compilation_enabled' => (bool)(defined('COMPILER_INCLUDE_PATH')),
205
  'max_upload_size' => min((int)ini_get("upload_max_filesize"), (int)ini_get("post_max_size"), (int)ini_get("memory_limit")),
206
- 'store'=>Mage::helper('linnLiveConnect') -> currentStoreCode($store),
207
  'is_multi_store'=> !Mage::app()->isSingleStoreMode(),
208
  'extension_version'=>Mage::helper('linnLiveConnect/settings') -> getVersion(),
209
  'max_execution_time'=>ini_get("max_execution_time")
@@ -596,7 +596,7 @@ class LinnSystems_LinnLiveConnect_Model_Community extends LinnSystems_LinnLiveCo
596
  /**
597
  * Bulk price update, TODO: success change to isError
598
  */
599
- public function updateProductPrices($data, $store, $identifierType = 'id') {
600
 
601
  $this -> lockIndexer();
602
 
203
  'api_config' => $config,
204
  'compilation_enabled' => (bool)(defined('COMPILER_INCLUDE_PATH')),
205
  'max_upload_size' => min((int)ini_get("upload_max_filesize"), (int)ini_get("post_max_size"), (int)ini_get("memory_limit")),
206
+ 'store'=>Mage::helper('linnLiveConnect') -> currentStoreCode(null),
207
  'is_multi_store'=> !Mage::app()->isSingleStoreMode(),
208
  'extension_version'=>Mage::helper('linnLiveConnect/settings') -> getVersion(),
209
  'max_execution_time'=>ini_get("max_execution_time")
596
  /**
597
  * Bulk price update, TODO: success change to isError
598
  */
599
+ public function updateProductPrices($data, $store = null, $identifierType = 'id') {
600
 
601
  $this -> lockIndexer();
602
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>LinnLiveConnect</name>
4
- <version>1.1.58</version>
5
  <stability>stable</stability>
6
  <license>GPL v2</license>
7
  <channel>community</channel>
@@ -9,11 +9,11 @@
9
  <summary>Extended SOAP WS-I compliant API to support integration with LinnLive2.</summary>
10
  <description>Extended SOAP WS-I compliant API to support integration with LinnLive2 (http://www.linnlive.com).&#xD;
11
  Contains some workarounds to avoid bugs in original Magento modules and additional functionality to operate Magento store remotely.</description>
12
- <notes>fixes for store support</notes>
13
  <authors><author><name>Albert Andrejev</name><user>albert_andrejev</user><email>albert@linnsystems.com</email></author><author><name>Pavel Nikolajev</name><user>Pavel_LL2</user><email>pavel.nokolajev@linnsystems.com</email></author><author><name>Aleksandr Kornev</name><user>alex_LL2</user><email>alex.kornevs@linnsystems.com</email></author></authors>
14
- <date>2014-11-24</date>
15
- <time>07:30:33</time>
16
- <contents><target name="magelocal"><dir name="LinnSystems"><dir name="LinnLiveConnect"><dir name="Helper"><file name="Data.php" hash="456a8274c2f1d0565a2345fbc7677069"/><file name="Factory.php" hash="7e0a0e26fa3618917f3540b799b05840"/><file name="Settings.php" hash="086ba912d38dc66964a2f40f685394a5"/></dir><dir name="Model"><dir name="Api"><file name="V2.php" hash="a60247b30a00144ee34b77b74821266a"/></dir><dir name="Category"><file name="Api.php" hash="c01d5bb1dfb59a559c3b94615593e38d"/></dir><file name="Community.php" hash="45032879e486d12760830b1f33d63ebb"/><file name="Main.php" hash="bdf4ddce8fa2b01d75bd9f69ae854ab3"/><dir name="Product"><dir name="Api"><file name="V2.php" hash="0497a6775a80f0292b47aa0e64eee77d"/></dir><file name="Api.php" hash="721f80734374313c91d2cfbf46fb7a17"/><dir name="Attribute"><file name="Api.php" hash="d0678623a145bc2d76993819bd63bdb9"/><dir name="Media"><file name="Api.php" hash="62d58c61d93371793ebe94162755c4cd"/></dir></dir><dir name="Link"><file name="Api.php" hash="d42a76ca6368eabad4e4a96fd40a93a2"/></dir></dir></dir><dir name="etc"><file name="api.xml" hash="a4b2a568bf5b2def5f3fe32c06b4528c"/><file name="config.xml" hash="3d8aebae53e3d62a7db21165743d244e"/><file name="wsdl.xml" hash="2b450fd6a6332d20583aaa4fc52012b6"/><file name="wsi.xml" hash="ad8aa3b49ac9cd24a3d1a4bef61d846d"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="LinnSystems_LinnLiveConnect.xml" hash="19c48712cd0516815d6784592ada0881"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
19
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>LinnLiveConnect</name>
4
+ <version>1.1.59</version>
5
  <stability>stable</stability>
6
  <license>GPL v2</license>
7
  <channel>community</channel>
9
  <summary>Extended SOAP WS-I compliant API to support integration with LinnLive2.</summary>
10
  <description>Extended SOAP WS-I compliant API to support integration with LinnLive2 (http://www.linnlive.com).&#xD;
11
  Contains some workarounds to avoid bugs in original Magento modules and additional functionality to operate Magento store remotely.</description>
12
+ <notes>Fixed an issue with multiple select</notes>
13
  <authors><author><name>Albert Andrejev</name><user>albert_andrejev</user><email>albert@linnsystems.com</email></author><author><name>Pavel Nikolajev</name><user>Pavel_LL2</user><email>pavel.nokolajev@linnsystems.com</email></author><author><name>Aleksandr Kornev</name><user>alex_LL2</user><email>alex.kornevs@linnsystems.com</email></author></authors>
14
+ <date>2014-12-09</date>
15
+ <time>06:02:06</time>
16
+ <contents><target name="magelocal"><dir name="LinnSystems"><dir name="LinnLiveConnect"><dir name="Helper"><file name="Data.php" hash="485c6f3d935314445a56739d9094d3a6"/><file name="Factory.php" hash="7e0a0e26fa3618917f3540b799b05840"/><file name="Settings.php" hash="086ba912d38dc66964a2f40f685394a5"/></dir><dir name="Model"><dir name="Api"><file name="V2.php" hash="a60247b30a00144ee34b77b74821266a"/></dir><dir name="Category"><file name="Api.php" hash="c01d5bb1dfb59a559c3b94615593e38d"/></dir><file name="Community.php" hash="cd28f6a1fa1f1982852e0c12b8147bda"/><file name="Main.php" hash="bdf4ddce8fa2b01d75bd9f69ae854ab3"/><dir name="Product"><dir name="Api"><file name="V2.php" hash="0497a6775a80f0292b47aa0e64eee77d"/></dir><file name="Api.php" hash="721f80734374313c91d2cfbf46fb7a17"/><dir name="Attribute"><file name="Api.php" hash="d0678623a145bc2d76993819bd63bdb9"/><dir name="Media"><file name="Api.php" hash="62d58c61d93371793ebe94162755c4cd"/></dir></dir><dir name="Link"><file name="Api.php" hash="d42a76ca6368eabad4e4a96fd40a93a2"/></dir></dir></dir><dir name="etc"><file name="api.xml" hash="a4b2a568bf5b2def5f3fe32c06b4528c"/><file name="config.xml" hash="3d8aebae53e3d62a7db21165743d244e"/><file name="wsdl.xml" hash="2b450fd6a6332d20583aaa4fc52012b6"/><file name="wsi.xml" hash="ad8aa3b49ac9cd24a3d1a4bef61d846d"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="LinnSystems_LinnLiveConnect.xml" hash="19c48712cd0516815d6784592ada0881"/></dir></target></contents>
17
  <compatible/>
18
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
19
  </package>