I was recently reworking the import of attributes and noticed that something like this was possible to occur. Original design appeared to consider that all installs would have at least a language_id of 1. Where 1 was the default language. The file admin/easypopulate_4_attrib.php is the one that has the "issue". Now that the problem has been clearly identified as likely to occur, I have the following suggestion, though in the upcoming release it will likely be different because there is
some code consolidation being done to reduce duplication and give the code a little more logical structure.
In admin/easypopulate_4_attrib.php make the following modifications (to suit your store) which are captured in the github commit:
https://github.com/mc12345678/EasyPo...d73083136f623a or by replacing the file with the one provided at:
https://github.com/mc12345678/EasyPo...e_4_attrib.php
In line 11:
From:
Code:
$language_id = 1; // default 1=english
To:
Code:
$language_id = $epdlanguage_id; // default 1=english or the language_id for your default language
Line 69:
From:
Code:
$l_id = 1; // temporary check - should this be the default language id?
To:
Code:
$l_id = $language_id; // temporary check - should this be the default language id?
Line 107:
From:
Code:
$number_of_elements = count($values_names_array[1]); // all elements count must be the same
To:
Code:
$number_of_elements = count($values_names_array[$language_id]); // all elements count must be the same
Line 141:
From:
Code:
$l_id = 1; // first defined language is main key - mandatory
To:
Code:
$l_id = $language_id; // first defined language is main key - mandatory
Line 208:
From:
Code:
$l_id = 1; // default first language is main key
To:
Code:
$l_id = $language_id; // default first language is main key
Line 241:
From:
Code:
$l_id = 1; // default first language is main key
To:
Code:
$l_id = $language_id; // default first language is main key
Line 316:
From:
Code:
$v_products_model, $v_products_options_name[1], implode(",", $values_names_array[1]));
To:
Code:
$v_products_model, $v_products_options_name[$language_id], implode(",", $values_names_array[$language_id]));
And Line 321:
From:
Code:
$v_products_model, $v_products_options_name[1], implode(",", $values_names_array[1]));
To:
Code:
$v_products_model, $v_products_options_name[$language_id], implode(",", $values_names_array[$language_id]));
Bookmarks