1

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

  • Do you want to migrate only the Products with ratings or reviews, or the whole magento to a new server/hosting? – Rahul Kumar Das Jul 23 '15 at 6:25
  • it seems that this extension exactly does what you want magentocommerce.com/magento-connect/… – Raks Jul 23 '15 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 '15 at 14:33
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

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.

protected by Community Feb 9 '16 at 6:17

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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