Skip to content

Commit

Permalink
fix for option creation
Browse files Browse the repository at this point in the history
  • Loading branch information
dweeves committed Dec 17, 2014
1 parent 535834e commit 6a49d8a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions magmi/engines/magmi_productimportengine.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public function getSkuStats()
*/
public function getEngineInfo()
{
return array("name"=>"Magmi Product Import Engine","version"=>"1.9","author"=>"dweeves");
return array("name"=>"Magmi Product Import Engine","version"=>"1.9.1","author"=>"dweeves");
}

/**
Expand Down Expand Up @@ -672,11 +672,13 @@ public function getOptionIds($attid, $storeid, $values)
//if not existing in cache,create it
if(!isset($optAdmin[$avalues[$i]]))
{
//if no position set, default to 0
$xpos=$pos==-1?0:$pos;
//create new option entry
$newoptid = $this->createOption($attid,$pos);
$newoptid = $this->createOption($attid,$xpos);
$this->createOptionValue($newoptid, 0,$avalues[$i]);
//cache new created one
$this->cacheOpt($attid, 0, $newoptid, $avalues[$i],$pos==-1?0:$pos);
$this->cacheOpt($attid, 0, $newoptid, $avalues[$i],$xpos);
}
//else check for position change
else{
Expand Down

0 comments on commit 6a49d8a

Please sign in to comment.