Child pages
  • RMA - Magento 2

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Column
width50%

What should one know before migrating Aheadworks RMA for M1 to RMA for M2?

Warning

Read carefully and consider this information as the top priority, or the migration may result in accidental data losses.

  1. The Magento Data Migration Tool is required to be installed prior to starting the migration.
    The migration script relies heavily on the Magento Data Migration tool. Understanding how it works will be useful during the migration process.
  2. Backup Magento 2 databases before performing the migration to have an opportunity to revert any changes.
    RMA migration may involve rewriting database tables, backup is advised.
  3. All the files attached to RMA request should be migrated manually
    More information on manual migration can be found in the Magento instructions on manual migration.

Video guide

A similar migration process is highlighted in the educational Video Guide on the Aheadworks Youtube channel. Don't forget to enable subtitles to the video to follow the data migration process.

Migration process

Below, you can see the migration guide with more detailed step-by-step description.

Panel
borderStylesolid
borderWidth2px

 1. Log into your Magento server as file owner and navigate to the directory where you have your Magento 2 store installed

Expand
titleClick to view details

For example:

No Format
cd /var/www/my_magento2_store/
Panel

2. Install the Magento Data Migration Tool

Expand
titleClick to view details

The installation instructions for the Magento Data Migration Tool along with the basic information can be found here: http://devdocs.magento.com/guides/v2.0/migration/migration-tool-install.html

Magento provides two ways of installing the Magento Data Migration Tool:

Next, you may want to navigate to vendor/magento/ to make sure the Migration Tool has been installed successfully.


Panel

 3. Download RMA migration distributive and unpack it to the desired location

Expand
titleClick to view details

The RMA migration distributive can be downloaded by the following link: http://s3.amazonaws.com/aheadworks_cdn/catalog/rma-data-migration-tool.zip

Unpack the contents of the distributive to find the /etc and /scr folders inside.

Panel

 4. Copy the contents of the RMA migration distributive to the Magento Data Migration Tool main folder

Expand
titleClick to view details
Copy the /etc and /scr folders included in the RMA migration package to: vendor/magento/data-migration-tool/

Rewrite on prompt.

Panel

 5. Edit the config.xml file of the Magento Data Migration Tool

Expand
titleClick to view details
Navigate to vendor/magento/data-migration-tool/etc/aw_rma/ and open config.xml for edit.
More information on tag values and which one should be put inside can be found in the Magento Data Migration Tool configuration instructions.

 

Note

Pay close attention to the <aw_rma_remove_requests_before_migration> tag value you enter if you already have some RMA requests on your Magento 2 store and want to keep them untouched.
The "1" value set by default will remove all existing Magento 2 RMA requests, the "0" value will add new RMA requests to the already existing ones.

Panel

 6. Run the migration script in the console

Expand
titleClick to view details

Run the following command considering the path to config.xml to start the migration process:

No Format
bin/magento migrate:data [-r|--reset] {<path to config.xml>}

According to the demo video, you can also use the following command considering the path to config.xml:

No Format
bin/magento migrate:data -r vendor/magento/data-migration-tool/etc/aw_rma/config.xml
Panel

 7. Data migration is complete. Make sure to migrate the attached files and images manually.

  • Copy all the files in the folder m1store_root/media/aw_rma

  • And moved them to the m2store_root/pub/media/aw_rma/media folder.

Migration Process Explanation

The migration process consists of two stages.

Panel

Stage 1. Synchronization

First of all, the synchronization process of ‘Fields’ (RMA request options) of the RMA extension for Magento 1 (hereinafter M1 RMA) and ‘Custom Fields’ of the RMA extension for Magento 2 (hereinafter M2 RMA) happens.

Here is how the fields conformance looks like:

  • Request type -> Resolution;

  • Package Opened -> Package Condition;

  • Reason -> Reason.

Conformance logics

M1 RMA ‘Fields’ values are compared by their names with the corresponding M2 RMA ‘Custom Fields’ values. In case of exact matches, the value is transferred directly to Magento 2. If the names do not match, the tool adds a new option to M2 RMA.

Info
titleExample

For example, if one of the names of the M1 RMA "Request type" values does not match any name of M2 RMA "Resolution" custom fields, we add a new option to M2 RMA ‘Resolution’ custom field.

The same procedure is applied to all field values of M1 RMA. To avoid additional negative effects we recommend you to migrate to a ‘clean’, not customized RMA extension for Magento 2 in order to reduce the number of mismatches.

Stage 2. Migration

Requests data is transferred as it is with the preservation of the order_id, customer_id, product_id, and store_id fields. Therefore, it is important that all orders, products, customers, and stores match each other.

Info
titleExample

For example, if the M1 product with ID 5 has product_name1, and the same product with ID 5 in M2 has other product_name2, then after the migration, you will see data discrepancy (same applies to customers and stores).

Info
titleNote

Note: Ideally, you should migrate all your data to Magento 2 first, and only then migrate the RMA requests.

When you transfer request statuses, the following conformance pattern is used:

  • M1 Pending Approval -> M2 Pending Approval

  • M1 Approved -> M2 Approved

  • M1 Package sent -> M2 Package sent

  • M1 Resolved (canceled) -> M2 Canceled

  • M1 Resolved (refunded) -> M2 Issue Refund

  • M1 any other status -> M2 Closed

 
Info
titleNote

Note: The migration configuration file data-migration-tool/etc/aw_rma/config.xml contains the aw_rma_remove_requests_before_migration option, which is enabled by default. This option clears all the Magento 2 RMA requests created before the migration procedure, so if necessary, you can disable it and make the new migration data added to the existing Magento 2 RMA requests.

...