Version Notes
Added support for special values FARAPPOMIT and FARAPPIGNORE.
Download this release
Release Info
Developer | FarApp |
Extension | FarApp_Connector |
Version | 1.5.7 |
Comparing to | |
See all releases |
Code changes from version 1.5.6 to 1.5.7
- app/code/community/FarApp/Connector/Helper/Data.php +7 -0
- app/code/community/FarApp/Connector/Model/Import/Entity/Product/Type/Bundle.php +2 -2
- app/code/community/FarApp/Connector/Model/Import/Entity/Product/Type/Configurable.php +3 -3
- app/code/community/FarApp/Connector/Model/Import/Entity/Product/Type/Grouped.php +2 -2
- app/code/community/FarApp/Connector/Model/Import/Entity/Product/Type/Simple.php +2 -2
- app/code/community/FarApp/Connector/etc/config.xml +22 -1
- package.xml +3 -3
app/code/community/FarApp/Connector/Helper/Data.php
CHANGED
@@ -1,4 +1,11 @@
|
|
1 |
<?php
|
2 |
class FarApp_Connector_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
}
|
1 |
<?php
|
2 |
class FarApp_Connector_Helper_Data extends Mage_Core_Helper_Abstract
|
3 |
{
|
4 |
+
public function strtolower($str)
|
5 |
+
{
|
6 |
+
if (function_exists('mb_strtolower') && function_exists('mb_detect_encoding')) {
|
7 |
+
return mb_strtolower($str, mb_detect_encoding($str));
|
8 |
+
}
|
9 |
+
return strtolower($str);
|
10 |
+
}
|
11 |
}
|
app/code/community/FarApp/Connector/Model/Import/Entity/Product/Type/Bundle.php
CHANGED
@@ -243,7 +243,7 @@ class FarApp_Connector_Model_Import_Entity_Product_Type_Bundle
|
|
243 |
if (isset($rowData[$attrCode]) && strlen($rowData[$attrCode])) {
|
244 |
$resultAttrs[$attrCode] =
|
245 |
('select' == $attrParams['type'] || 'multiselect' == $attrParams['type'])
|
246 |
-
? $attrParams['options'][Mage::helper('
|
247 |
: $rowData[$attrCode];
|
248 |
} elseif (array_key_exists($attrCode, $rowData)) {
|
249 |
$resultAttrs[$attrCode] = $rowData[$attrCode];
|
@@ -309,7 +309,7 @@ class FarApp_Connector_Model_Import_Entity_Product_Type_Bundle
|
|
309 |
case 'status':
|
310 |
case 'visibility':
|
311 |
case 'weight':
|
312 |
-
$defaultValue = Mage::getStoreConfig('
|
313 |
if (strlen($defaultValue)) {
|
314 |
return $defaultValue;
|
315 |
}
|
243 |
if (isset($rowData[$attrCode]) && strlen($rowData[$attrCode])) {
|
244 |
$resultAttrs[$attrCode] =
|
245 |
('select' == $attrParams['type'] || 'multiselect' == $attrParams['type'])
|
246 |
+
? $attrParams['options'][Mage::helper('connector')->strtolower($rowData[$attrCode])]
|
247 |
: $rowData[$attrCode];
|
248 |
} elseif (array_key_exists($attrCode, $rowData)) {
|
249 |
$resultAttrs[$attrCode] = $rowData[$attrCode];
|
309 |
case 'status':
|
310 |
case 'visibility':
|
311 |
case 'weight':
|
312 |
+
$defaultValue = Mage::getStoreConfig('connector/product/' . $attrParams['code']);
|
313 |
if (strlen($defaultValue)) {
|
314 |
return $defaultValue;
|
315 |
}
|
app/code/community/FarApp/Connector/Model/Import/Entity/Product/Type/Configurable.php
CHANGED
@@ -39,7 +39,7 @@ class FarApp_Connector_Model_Import_Entity_Product_Type_Configurable
|
|
39 |
if (isset($rowData[$attrCode]) && strlen($rowData[$attrCode])) {
|
40 |
$resultAttrs[$attrCode] =
|
41 |
('select' == $attrParams['type'] || 'multiselect' == $attrParams['type'])
|
42 |
-
? $attrParams['options'][Mage::helper('
|
43 |
: $rowData[$attrCode];
|
44 |
} elseif (array_key_exists($attrCode, $rowData)) {
|
45 |
$resultAttrs[$attrCode] = $rowData[$attrCode];
|
@@ -105,7 +105,7 @@ class FarApp_Connector_Model_Import_Entity_Product_Type_Configurable
|
|
105 |
case 'status':
|
106 |
case 'visibility':
|
107 |
case 'weight':
|
108 |
-
$defaultValue = Mage::getStoreConfig('
|
109 |
if (strlen($defaultValue)) {
|
110 |
return $defaultValue;
|
111 |
}
|
@@ -234,7 +234,7 @@ class FarApp_Connector_Model_Import_Entity_Product_Type_Configurable
|
|
234 |
);
|
235 |
}
|
236 |
if (isset($rowData['_super_attribute_option']) && strlen($rowData['_super_attribute_option'])) {
|
237 |
-
$optionId = $attrParams['options'][Mage::helper('
|
238 |
|
239 |
if (!isset($productSuperData['used_attributes'][$attrParams['id']][$optionId])) {
|
240 |
$productSuperData['used_attributes'][$attrParams['id']][$optionId] = false;
|
39 |
if (isset($rowData[$attrCode]) && strlen($rowData[$attrCode])) {
|
40 |
$resultAttrs[$attrCode] =
|
41 |
('select' == $attrParams['type'] || 'multiselect' == $attrParams['type'])
|
42 |
+
? $attrParams['options'][Mage::helper('connector')->strtolower($rowData[$attrCode])]
|
43 |
: $rowData[$attrCode];
|
44 |
} elseif (array_key_exists($attrCode, $rowData)) {
|
45 |
$resultAttrs[$attrCode] = $rowData[$attrCode];
|
105 |
case 'status':
|
106 |
case 'visibility':
|
107 |
case 'weight':
|
108 |
+
$defaultValue = Mage::getStoreConfig('connector/product/' . $attrParams['code']);
|
109 |
if (strlen($defaultValue)) {
|
110 |
return $defaultValue;
|
111 |
}
|
234 |
);
|
235 |
}
|
236 |
if (isset($rowData['_super_attribute_option']) && strlen($rowData['_super_attribute_option'])) {
|
237 |
+
$optionId = $attrParams['options'][Mage::helper('connector')->strtolower($rowData['_super_attribute_option'])];
|
238 |
|
239 |
if (!isset($productSuperData['used_attributes'][$attrParams['id']][$optionId])) {
|
240 |
$productSuperData['used_attributes'][$attrParams['id']][$optionId] = false;
|
app/code/community/FarApp/Connector/Model/Import/Entity/Product/Type/Grouped.php
CHANGED
@@ -19,7 +19,7 @@ class FarApp_Connector_Model_Import_Entity_Product_Type_Grouped
|
|
19 |
if (isset($rowData[$attrCode]) && strlen($rowData[$attrCode])) {
|
20 |
$resultAttrs[$attrCode] =
|
21 |
('select' == $attrParams['type'] || 'multiselect' == $attrParams['type'])
|
22 |
-
? $attrParams['options'][Mage::helper('
|
23 |
: $rowData[$attrCode];
|
24 |
} elseif (array_key_exists($attrCode, $rowData)) {
|
25 |
$resultAttrs[$attrCode] = $rowData[$attrCode];
|
@@ -85,7 +85,7 @@ class FarApp_Connector_Model_Import_Entity_Product_Type_Grouped
|
|
85 |
case 'status':
|
86 |
case 'visibility':
|
87 |
case 'weight':
|
88 |
-
$defaultValue = Mage::getStoreConfig('
|
89 |
if (strlen($defaultValue)) {
|
90 |
return $defaultValue;
|
91 |
}
|
19 |
if (isset($rowData[$attrCode]) && strlen($rowData[$attrCode])) {
|
20 |
$resultAttrs[$attrCode] =
|
21 |
('select' == $attrParams['type'] || 'multiselect' == $attrParams['type'])
|
22 |
+
? $attrParams['options'][Mage::helper('connector')->strtolower($rowData[$attrCode])]
|
23 |
: $rowData[$attrCode];
|
24 |
} elseif (array_key_exists($attrCode, $rowData)) {
|
25 |
$resultAttrs[$attrCode] = $rowData[$attrCode];
|
85 |
case 'status':
|
86 |
case 'visibility':
|
87 |
case 'weight':
|
88 |
+
$defaultValue = Mage::getStoreConfig('connector/product/' . $attrParams['code']);
|
89 |
if (strlen($defaultValue)) {
|
90 |
return $defaultValue;
|
91 |
}
|
app/code/community/FarApp/Connector/Model/Import/Entity/Product/Type/Simple.php
CHANGED
@@ -17,7 +17,7 @@ class FarApp_Connector_Model_Import_Entity_Product_Type_Simple
|
|
17 |
if (isset($rowData[$attrCode]) && strlen($rowData[$attrCode])) {
|
18 |
$resultAttrs[$attrCode] =
|
19 |
('select' == $attrParams['type'] || 'multiselect' == $attrParams['type'])
|
20 |
-
? $attrParams['options'][Mage::helper('
|
21 |
: $rowData[$attrCode];
|
22 |
} elseif (array_key_exists($attrCode, $rowData)) {
|
23 |
$resultAttrs[$attrCode] = $rowData[$attrCode];
|
@@ -78,7 +78,7 @@ class FarApp_Connector_Model_Import_Entity_Product_Type_Simple
|
|
78 |
case 'status':
|
79 |
case 'visibility':
|
80 |
case 'weight':
|
81 |
-
$defaultValue = Mage::getStoreConfig('
|
82 |
if (strlen($defaultValue)) {
|
83 |
return $defaultValue;
|
84 |
}
|
17 |
if (isset($rowData[$attrCode]) && strlen($rowData[$attrCode])) {
|
18 |
$resultAttrs[$attrCode] =
|
19 |
('select' == $attrParams['type'] || 'multiselect' == $attrParams['type'])
|
20 |
+
? $attrParams['options'][Mage::helper('connector')->strtolower($rowData[$attrCode])]
|
21 |
: $rowData[$attrCode];
|
22 |
} elseif (array_key_exists($attrCode, $rowData)) {
|
23 |
$resultAttrs[$attrCode] = $rowData[$attrCode];
|
78 |
case 'status':
|
79 |
case 'visibility':
|
80 |
case 'weight':
|
81 |
+
$defaultValue = Mage::getStoreConfig('connector/product/' . $attrParams['code']);
|
82 |
if (strlen($defaultValue)) {
|
83 |
return $defaultValue;
|
84 |
}
|
app/code/community/FarApp/Connector/etc/config.xml
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
<config>
|
10 |
<modules>
|
11 |
<FarApp_Connector>
|
12 |
-
<version>1.5.
|
13 |
</FarApp_Connector>
|
14 |
</modules>
|
15 |
<global>
|
@@ -134,4 +134,25 @@
|
|
134 |
</resources>
|
135 |
</acl>
|
136 |
</adminhtml>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
</config>
|
9 |
<config>
|
10 |
<modules>
|
11 |
<FarApp_Connector>
|
12 |
+
<version>1.5.7</version>
|
13 |
</FarApp_Connector>
|
14 |
</modules>
|
15 |
<global>
|
134 |
</resources>
|
135 |
</acl>
|
136 |
</adminhtml>
|
137 |
+
<default>
|
138 |
+
<connector>
|
139 |
+
<general>
|
140 |
+
<import_behavior>replace</import_behavior>
|
141 |
+
<partial_indexing>0</partial_indexing>
|
142 |
+
<continue_after_errors>0</continue_after_errors>
|
143 |
+
<error_limit>100</error_limit>
|
144 |
+
<support_nested_arrays>0</support_nested_arrays>
|
145 |
+
<ignore_duplicates>0</ignore_duplicates>
|
146 |
+
<clear_field_on_empty_string>0</clear_field_on_empty_string>
|
147 |
+
<symbol_for_clear_field>FARAPPOMIT</symbol_for_clear_field>
|
148 |
+
<symbol_for_ignore_field>FARAPPIGNORE</symbol_for_ignore_field>
|
149 |
+
</general>
|
150 |
+
<product>
|
151 |
+
<allow_rename_files>1</allow_rename_files>
|
152 |
+
<status>1</status>
|
153 |
+
<visibility>4</visibility>
|
154 |
+
<weight>0</weight>
|
155 |
+
</product>
|
156 |
+
</connector>
|
157 |
+
</default>
|
158 |
</config>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>FarApp_Connector</name>
|
4 |
-
<version>1.5.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://www.farapp.com/signup/">Commercial</license>
|
7 |
<channel>community</channel>
|
@@ -11,8 +11,8 @@
|
|
11 |
<notes>Added support for special values FARAPPOMIT and FARAPPIGNORE.</notes>
|
12 |
<authors><author><name>FarApp</name><user>FarApp</user><email>support@farapp.com</email></author></authors>
|
13 |
<date>2017-05-17</date>
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="FarApp"><dir name="Connector"><dir name="Helper"><file name="Data.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.0.0</min><max>5.7.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>FarApp_Connector</name>
|
4 |
+
<version>1.5.7</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="https://www.farapp.com/signup/">Commercial</license>
|
7 |
<channel>community</channel>
|
11 |
<notes>Added support for special values FARAPPOMIT and FARAPPIGNORE.</notes>
|
12 |
<authors><author><name>FarApp</name><user>FarApp</user><email>support@farapp.com</email></author></authors>
|
13 |
<date>2017-05-17</date>
|
14 |
+
<time>23:01:06</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="FarApp"><dir name="Connector"><dir name="Helper"><file name="Data.php" hash="64b5205d7f0e551d1784682f4b93677a"/></dir><dir name="Model"><dir name="Export"><dir name="Adapter"><file name="Abstract.php" hash="765dc8fbab996f17b9f049cc8aa906a0"/><file name="Array.php" hash="6ca62c702dcb9512ec429563ac1ce1a2"/></dir><dir name="Entity"><file name="Order.php" hash="14a2f735cf8fc5e8f2bcd6682a1e56b1"/></dir></dir><file name="Export.php" hash="01643ef101731c6d98bbc523642f95a0"/><dir name="Import"><dir name="Entity"><file name="Customer.php" hash="376978f635c73605d428037cca8cf594"/><file name="Order.php" hash="38579396825a1bd3ad59de84278085f6"/><dir name="Product"><dir name="Type"><file name="Bundle.php" hash="e53dcb24f6324cb179fa3761a59272d9"/><file name="Configurable.php" hash="6877cb67789c03e9295545ada4c3b346"/><file name="Grouped.php" hash="e99356af57e1e9691e34c44ad75f9a0a"/><file name="Simple.php" hash="8c623e73540c20fd69bcaa9f404658bf"/><file name="Virtual.php" hash="68a0ee5d2af8269d16f56416988e90aa"/></dir></dir><file name="Product.php" hash="95776e1ea7f2bcf2265afdfe7116d22d"/><file name="minVersion2.php" hash="8df670fd68516ba1629304ae8ab6c812"/></dir></dir><file name="Import.php" hash="deb96f4867780788413d96be1c2b9ff9"/><file name="Observer.php" hash="4bc864815ea234f1b0ae064477bdff45"/><dir name="Order"><dir name="Creditmemo"><file name="Api.php" hash="edb85d34679eab92e8990a0dd065632e"/></dir><dir name="Invoice"><file name="Api.php" hash="f133255dae51ab9c44c71ca9cc702d0a"/></dir></dir><dir name="Product"><file name="Api.php" hash="60539725273ed3ce03adef8e90198cc3"/></dir></dir><dir name="controllers"><file name="ExportController.php" hash="83a48feea4dc3d601b2cef7df2d27110"/><file name="ImportController.php" hash="03922ffac029110e4739497c69ba45f5"/><file name="IndexController.php" hash="93918848d3ce7f6ad05688f89a730e75"/></dir><dir name="etc"><file name="api.xml" hash="6178269d7dc6cb7aa1188f059e75a4fc"/><file name="config.xml" hash="4c7065c076c030ccaf1ab306c1d86222"/><file name="system.xml" hash="395c2670f5132a4e617310345185c200"/><file name="wsdl.xml" hash="bab71f49a1053f87094da12d1060d1d5"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="FarApp_Connector.xml" hash="ff3fe315c70239229cb5ff3a49d40967"/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.0.0</min><max>5.7.0</max></php></required></dependencies>
|
18 |
</package>
|