Skip to main content

Magento Magmi Import tier price bug fix per website

Tier price import using Magmi import have Bug.Its not importing tier price per website.

Here is the fix.

Open the file tierpriceprocessor.php

File location :- magmi/plugins/extra/itemprocessors/tierprice/tierpriceprocessor.php

Step 1:- Find the function 'processItemAfterId'.

Step 2 :- insert the following code right after Line 39 which is $pid=$params["product_id"];

$_websites = $item['websites'];
$_websites = explode(',',$_websites);
if(count($_websites) > 1){
for($i=0;$i<count($_websites);$i++){
$sql = "SELECT website_id FROM ".$this->tablename("core_website")." WHERE code ='".$_websites[$i]."'";
$webIds[$i] = $this->selectOne($sql,array(),"website_id");
}
}else{
$sql = "SELECT website_id FROM ".$this->tablename("core_website")." WHERE code ='".$_websites[0]."'";
$webIds[0] = $this->selectOne($sql,array(),"website_id");
}

Step 3:- Comment Line no 56 which is  $wsids=$this->getItemWebsites($item);

and insert the following code

$wsids = $webIds;

Step 4:- save the file.

You are done !!

Comments