News:

Looking for documentation? Take a look on our wiki

Main Menu

virtuemart 1.9 to 2.0 product reviews lost?

Started by pflaume, January 10, 2012, 15:21:47 PM

Previous topic - Next topic

pflaume

i did the migration from 1.9 to 2.0 and all of my product reviews are gone!? how i can get the product reviews to 2.0? the payment and vouchers are lost,too??

webtechdev

Quote from: pflaume on January 10, 2012, 15:21:47 PM
i did the migration from 1.9 to 2.0 and all of my product reviews are gone!? how i can get the product reviews to 2.0? the payment and vouchers are lost,too??

don't worry i lost so much during this migration still looking for solution hope VM team wake up and provide some solutios to devs.

pflaume

i didnt migrate the live shop. but i cant migrate the live shop still these problems are solved. :(

Milbo

This should not happen, please provide  more information. The product review is something we did not check, yes.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

pflaume

which information do you need? I migrated from 1.9 to 2.0 and all data (products, customer data) was imported correctly. But the product reviews, coupons are empty. ive about 2000 product reviews which i need in 2.0.

Milbo

when you go to a mechanic and say "my car is broken" it helps nothing. So what is exactly missing? the reviews and coupons? Where is it empty, in the db? or only in the edit view? or is it gone in FE?

DB, FE, BE. I cant believe that it is deleted. So to get an idea of your problem we need an exact description
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

woonydanny

Hi,
Same thing happened to me. I migrated my VM1.1.9 store to VM2 on Joomla 1.5.25 and all the reviews did not migrate over.

I am using EN-GB as my language.

There is nothing in my VM2 review list. What sql query can i run to migrate the ones from the jos_vm tables to jos_virtuemart tables?

Milbo

Quote from: pflaume on January 10, 2012, 15:21:47 PM
i did the migration from 1.9 to 2.0
He is talking about vm1.9,... or vm1.1.9? I just noticed, yes, I did not write a migration for the reviews. Tricky task.
Should I fix your bug, please support the VirtueMart project and become a member
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/

agrupe

#8
Hi,

I need this migration, too to keep several hundred ratings. Any new infos on this ?

I have seen that the database has 3 tables with more or less the same content (rating_reviews, rating_votes and ratings). If there is no migration script - where can I find additional documentation? I don't want to write a SQL script on a try & error base.

Thanks

Andreas

P.S: A quick and dirty test shows that it's possible to migrate old text. I just created a new entry in "rating_reviews" and updated comment, product_id and created_by and got the text displayed in the product.

baroen

Andreas, did you manage to get this working yet. I also am seeking a way to retreive my old (VM1.5) reviews into VM2.x

agrupe

Hi,

sorry for my late reply ;-(

Yes, I have made some SQl statements to "migrate" the old comments. It's a bit more complex as I had first thought as the programmers have changed the Product-ID. So a product which had the id of 17 can now be number 1 (first migrated product got number one etc etc).

But it works. Dates will not be migrated but all comments end up where they should be.

I'm looking for a way to show the customer username instead of the full name. Have not found where to change that.

I'll post all my hacks and tricks to get the migration running after I have (hopefully) a stable running shop next week.

Andreas

agrupe

#11
Hi,

I just moved my old ratings into my new shop and it worked well.

Backup your data before you start this procedures and thing about the coding. It changes the database content and your shop might get wracked!!!

Here is my SQL-Code:

Add row product_sku to the original table. The sku is the only connection between the old product-id and the new one:
ALTER table jos_vm_product_reviews add product_sku VARCHAR(64)

Import SKU from jos_vm_product :
UPDATE jos_vm_product_reviews, jos_vm_product SET jos_vm_product_reviews.product_sku = jos_vm_product.product_sku where jos_vm_product_reviews.product_id = jos_vm_product.product_id

read virtuemart_product_id from j25_virtuemart_products and overwrite the old id in jos_vm_product_reviews :
Update jos_vm_product_reviews, j25_virtuemart_products SET jos_vm_product_reviews.product_id = j25_virtuemart_products.virtuemart_product_id WHERE jos_vm_product_reviews.product_sku = j25_virtuemart_products.product_sku

OK, now delete the temporay product_sku :
ALTER TABLE `jos_vm_product_reviews` DROP `product_sku`

The 3 new tables (j25_xxx_rating_xxx) have to be without content (but don't delete the tables!)

Export jos_vm_product_reviews (only the data!) with phpmyadmin graphic interface

In the exported file, change the "header(s)" to:
INSERT INTO `j25_virtuemart_rating_reviews` (`virtuemart_rating_review_id`, `virtuemart_product_id`, `comment`, `created_by`, `created_on`, `review_rating`, `review_ok`, `review_ratingcount`, `published`) VALUES

Import the file into j25_virtuemart_rating_reviews with phpmyadmin graphic interface

copy the relevant data from j25_virtuemart_rating_reviews into  j25_virtuemart_ratings :
INSERT INTO `j25_virtuemart_ratings`( `virtuemart_rating_id`,`virtuemart_product_id`,`published` , `created_by`) SELECT `virtuemart_rating_review_id`,`virtuemart_product_id`,`published` , `created_by` FROM `j25_virtuemart_rating_reviews`


copy the relevant data from j25_virtuemart_rating_reviews into j25_virtuemart_rating_votes :
INSERT INTO `j25_virtuemart_rating_votes`( `virtuemart_rating_vote_id`,`virtuemart_product_id`, `vote`,`created_by`) SELECT `virtuemart_rating_review_id`,`virtuemart_product_id`,`review_rating`, `created_by` FROM `j25_virtuemart_rating_reviews`

Publish them:
UPDATE `j25_virtuemart_rating_reviews` SET `published` = 1

Log into VM, select all reviews and publish them (I thought it wouldn't be necessary after the last step but it still is).

I have got no support at all from the VM developer team. So all I did was to gess why they have now three tables and what sense the rows in the tables have. So if anyone can do it better - feel free!

Cheers

Andreas

4est

Thanks!

I used your solution and it worked perfectly!

Too bad dates are not imported

MAD King

Awesome solution.
The only bad thing about is you cannot edit the reviews from the backend.
I migrated to v2 2 weeks ago and they were still not able to integrate that in the migration.

Thank you
Joomla! 4.4.5
VirtueMart 4.2.12 11012