Closed raiwa closed 4 years ago
The new SQL is the one to base a fix on. If you could take a look at fixing this it would be helpful.
$attributes = sprintf(<<<'EOSQL'
select pa.*
from products_attributes pa
left join products_options po on po.products_options_id = pa.options_id and po.language_id = %1$d
left join products_options_values pov on pov.products_options_values_id = pa.options_values_id and pov.language_id = %1$d
left join products_description pd on pa.products_id = pd.products_id and pd.language_id = %1$d
order by pd.products_name, po.products_options_name, pov.products_options_values_name
EOSQL
, (int)$languages_id);
Does that fix it while retaining the new behavior? It seems to work in the single language case with the sample products.
It does thank you Matt. I tested on my dual language EN/FR shop. We'll drop that in 1073 as there are a couple of other things to do in the page in 1073.
TY Raiwa for the heads up on the language problem.
Tested in my 2 language store and it works
TY both
In Admin/products_attributes.php in the Products Attributes table, the popducts attributes get duplicated for each additional store language, Not noticeable if only one store language. The error was introduced in 1.0.6.2 with the query update line 505: good one 1.0.6.1:
$attributes = "select pa.* from products_attributes pa left join products_description pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_name";
bad one 1.0.6.2:$attributes = "select pa.* from products_attributes pa left join products_options po on po.products_options_id = pa.options_id left join products_options_values pov on pov.products_options_values_id = pa.options_values_id left join products_description pd on pa.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' order by pd.products_name, po.products_options_name, pov.products_options_values_name";