1

How do you migrate products reviews and ratings from one magento site to another?

3
  • Do you want to migrate only the Products with ratings or reviews, or the whole magento to a new server/hosting? Jul 23, 2015 at 6:25
  • it seems that this extension exactly does what you want magentocommerce.com/magento-connect/… Jul 23, 2015 at 6:28
  • I'm looking for instructions on how to migrate the ratings and reviews that exist in one magento installation into another magento installation. I see in the database there are tables for both. However, I am in need of instruction to insure proper migration.
    – user26152
    Jul 24, 2015 at 14:33

2 Answers 2

3

The linked extension Product Review import/export (MK_Reviewexport) worked for me, after making a small change in app/code/local/MK/Reviewexport/Model/Convert/Adapter/Reviewimport.php where it contains unsafe raw SQL which does not take table prefixes into account.

This is my patch:

     public function saveRow( array $data )
     {
-          $write = Mage::getSingleton('core/resource')->getConnection('core_write');
-          $sku = $write->query('select entity_id from `catalog_product_entity` where sku = "'.$data['Sku'].'" ');
-          $sku = $sku->fetch();
-                  
-    if($sku)
+        $product_id = Mage::getResourceModel('catalog/product')->getIdBySku($data['Sku']);
+        if($product_id)
         {
-        $product_id = $sku['entity_id'];

It uses advanced dataflow profiles, so it's quite slow but for a one-shot migration script it was good enough for me. Also I deleted it afterwards because of potential unsecure code.

The good thing is that it uses the SKU as product identifier, so as long as your products still have the same SKU, the association works even with different entity_ids. The customer_id however must be the same. If your products also have the same entity_id, I would rather copy the reviews and rating tables.

One other thing to note is that the date was not preserved, all reviews are saved with the import timestamp.

2
  • The link to the extension no longer works here is a similar extension. marketplace.magento.com/commerceextensions-ext6553.html
    – danmentzer
    Sep 26, 2017 at 12:16
  • ping! it's 2020 and we are all migrating to Magento 2 - this extension now costs $99! I need to export review data from Mage 1 and import it to Mage 2
    – paj
    Jan 9, 2020 at 18:50
2

You need to copy all review_* and rating_* tables. The problem is, that you have foreign keys to the products and customers.

This means your customers and products need the same IDs or you have to fix them.

Not the answer you're looking for? Browse other questions tagged or ask your own question.