Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow for value translation with select/multiselect attributes when is_configurable=0 and scope is global #556

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions magmi/engines/magmi_productimportengine.php
Original file line number Diff line number Diff line change
Expand Up @@ -1619,10 +1619,10 @@ public function createAttributes($pid, &$item, $attmap, $isnew, $itemids)
// get the item value
$ivalue = $item[$attrcode];
// get item store id for the current attribute
//if is global then , global scope applies but if configurable, back to store view scope since
//it's a select
// if the attribute is global, then global scope applies. However, for select & multiselect
// attributes, we go back to the store view scope to allow for values translation
$scope = $attrdesc["is_global"];
if ($attrcode != "price" && $attrdesc["is_configurable"] == 1)
if ($attrcode != "price" && $attrdesc["is_global"] && ($attrdesc["frontend_input"] == 'select' || $attrdesc["frontend_input"] == 'multiselect'))
{
$scope = 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function processItemAfterId(&$item, $params = null)
$inserts=array();
foreach ($group_cols as $key) {
$price=str_replace(",", ".", $item[$key]);
if (!empty($price)) {
if (is_numeric($price)) {
$group_id = $this->_groups[$key]['id'];

foreach ($website_ids as $website_id) {
Expand Down