I’m getting a sales_order_tax_item not found error trying to import on Magento 1.6. That table doesn’t exist in Magento 1.6.
https://www.dropbox.com/s/du6aosaur08qajx/Screenshot%202016-08-30%2009.53.16.png?dl=0
3 answers
Hi netalico,
The table `sales_order_tax_item` is core table of sales data structure and it exists in Magento 1.6.2.0
Please tell me know the exactly version of your Magento 1?
Regards,
Mall.
I’m running Magento 1.6.0.
You can see that that table wasn’t created until Magento 1.6.0.2: https://github.com/steverobbins/Magento-Multi_Client/blob/master/magento/app/code/core/Mage/Tax/sql/tax_setup/upgrade-1.6.0.1-1.6.0.2.php
Hi netalico,
I’m running Magento 1.6.0.
Yeah, i see to continue with step 7 you can do steps as bellow:
Step 1: Click to reset button in step 7 to restart data migration in this step.
Step 2: Open them PHP file at path `pub/ub-tool/protected/controllers/MigrateController.php`
and find to the code lines (2542 -- 2564):
//sales_order_tax_item
$items = Mage1SalesOrderTaxItem::model()->findAll("tax_id = {$model->tax_id}");
if ($items){
foreach ($items as $item){
$item2 = new Mage2SalesOrderTaxItem();
foreach ($item2->attributes as $key => $value){
if (isset($item->$key)){
$item2->$key = $item->$key;
}
}
//bellow fields was not exists in Magento1 -> note
$item2->amount = 0;
$item2->base_amount = 0;
$item2->real_amount = 0;
$item2->real_base_amount = 0;
$item2->associated_item_id = null;
$item2->taxable_item_type = '';
if (!$item2->save()) {
$errors[] = get_class($item2).": ".MigrateSteps::getStringErrors($item2->getErrors());
}
}
}and replace it by code lines (we will comment the related code lines with this table):
/*//sales_order_tax_item
$items = Mage1SalesOrderTaxItem::model()->findAll("tax_id = {$model->tax_id}");
if ($items){
foreach ($items as $item){
$item2 = new Mage2SalesOrderTaxItem();
foreach ($item2->attributes as $key => $value){
if (isset($item->$key)){
$item2->$key = $item->$key;
}
}
//bellow fields was not exists in Magento1 -> note
$item2->amount = 0;
$item2->base_amount = 0;
$item2->real_amount = 0;
$item2->real_base_amount = 0;
$item2->associated_item_id = null;
$item2->taxable_item_type = '';
if (!$item2->save()) {
$errors[] = get_class($item2).": ".MigrateSteps::getStringErrors($item2->getErrors());
}
}
}*/
and you can restart data migration in this step.
and let’s me know how it goes.
Regards,
Mall.