Menu

#115 Mass Select/Multiselect Attribute value translater - requires two col key

v1.0_(example)
open
nobody
None
5
2015-05-12
2015-05-12
coedycode
No

re: plugins/utilities/massopt_translate/massattr.php

The plugin currently creates duplicate values in Magento 1.9.1

in the function setAttrOptionVal

these lines:

$sql="INSERT INTO $eaov (option_id,store_id,value)
    VALUES " . join(",", $ins) . " ON DUPLICATE KEY UPDATE value=VALUES(`value`)";

The 'ON DUPLICATE KEY UPDATE' part only works if you first add a two column unique key to option_id and store_id in eav_attribute_option_value

Without that two col key, the duplicates created break the magento admin when opening the attribute in the admin area, so the duplicates have to be removed from the db directly to make the attribute editable again.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB