Skip to content

Commit

Permalink
Fixed to compatible with Magento2 Merchant - beta 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
quynhvv committed Sep 18, 2015
1 parent 4a4c2f6 commit aab00f0
Show file tree
Hide file tree
Showing 14 changed files with 596 additions and 540 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ For example: go to http://localhost/migrate-data-tool/ and press Enter key.
Some step screenshots will go here...

<h4># Step 4: Complete the tasks below to finish the data migration process.</h4>
- Re-save all the Attribute Sets (Stores/Attributes/Product Template) migrated in the back-end of your Magento 2 website. (Open the attribute set, edit it if needed and click the save button)
- Re-save all the Product Templates (Stores/Attributes/Product Template) migrated in the back-end of your Magento 2 website. (Open the Product Template, edit it if needed and click the save button)
- Reindex all data:
- In Linux: Run command line: php -f PATH_TO_YOUR_WEB_ROOT_FOLDER\your_magento2_folder\dev\shell\indexer.php --reindexall
- In Window: Open the command line window and go to the folder: <strong> PATH_TO_YOUR_WEB_ROOT_FOLDER\your_magento2_folder\dev\shell </strong>
Expand All @@ -46,6 +46,7 @@ Some step screenshots will go here...
- Copy media files to complete migration:<br/>
- Copy the folder at PATH_TO_YOUR_WEB_ROOT_FOLDER\your_magento1_folder\media\catalog and paste replace to PATH_TO_YOUR_WEB_ROOT_FOLDER\your_magento2_folder\pub\media\
- Copy the folder at PATH_TO_YOUR_WEB_ROOT_FOLDER\your_magento1_folder\media\downloadable and paste replace to PATH_TO_YOUR_WEB_ROOT_FOLDER\your_magento2_folder\pub\media\
- Make recursive write able to catalog and downloadable recursive which you have just copied.
- Remove all folders and files in <strong>PATH_TO_YOUR_WEB_ROOT_FOLDER\your_magento2_folder\var</strong> but take the .htaccess file.
- Remove all folders and files in <strong>PATH_TO_YOUR_WEB_ROOT_FOLDER\your_magento2_folder\pub\static\</strong> but take the .htaccess file.

Expand Down
39 changes: 20 additions & 19 deletions protected/controllers/MigrateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -1530,25 +1530,26 @@ public function actionStep5()
}
}

//catalog_product_super_attribute_pricing
$condition = "product_super_attribute_id = {$model2->product_super_attribute_id}";
if ($migrated_website_ids) {
$str_website_ids = implode(',', $migrated_website_ids);
$condition .= " AND website_id IN ({$str_website_ids})";
}
$super_attribute_pricing_models = Mage1CatalogProductSuperAttributePricing::model()->findAll($condition);
if ($super_attribute_pricing_models) {
foreach ($super_attribute_pricing_models as $super_attribute_pricing) {
$super_attribute_pricing2 = new Mage2CatalogProductSuperAttributePricing();
$super_attribute_pricing2->value_id = $super_attribute_pricing->value_id;
$super_attribute_pricing2->product_super_attribute_id = $super_attribute_pricing->product_super_attribute_id;
$super_attribute_pricing2->value_index = $super_attribute_pricing->value_index;
$super_attribute_pricing2->is_percent = $super_attribute_pricing->is_percent;
$super_attribute_pricing2->pricing_value = $super_attribute_pricing->pricing_value;
$super_attribute_pricing2->website_id = $super_attribute_pricing->website_id;
$super_attribute_pricing2->save();
}
}
//catalog_product_super_attribute_pricing
//This was not used from merchant beta 100
// $condition = "product_super_attribute_id = {$model2->product_super_attribute_id}";
// if ($migrated_website_ids) {
// $str_website_ids = implode(',', $migrated_website_ids);
// $condition .= " AND website_id IN ({$str_website_ids})";
// }
// $super_attribute_pricing_models = Mage1CatalogProductSuperAttributePricing::model()->findAll($condition);
// if ($super_attribute_pricing_models) {
// foreach ($super_attribute_pricing_models as $super_attribute_pricing) {
// $super_attribute_pricing2 = new Mage2CatalogProductSuperAttributePricing();
// $super_attribute_pricing2->value_id = $super_attribute_pricing->value_id;
// $super_attribute_pricing2->product_super_attribute_id = $super_attribute_pricing->product_super_attribute_id;
// $super_attribute_pricing2->value_index = $super_attribute_pricing->value_index;
// $super_attribute_pricing2->is_percent = $super_attribute_pricing->is_percent;
// $super_attribute_pricing2->pricing_value = $super_attribute_pricing->pricing_value;
// $super_attribute_pricing2->website_id = $super_attribute_pricing->website_id;
// $super_attribute_pricing2->save();
// }
// }
}
}
}
Expand Down
Loading

0 comments on commit aab00f0

Please sign in to comment.