Jump to content
thirty bees forum
  • 0

How migrate products comments from Pshop1.6


x97wehner

Question

I want to migrate the product comments from the stock prestashop module over to a new instance of thirty bees. I'm sure there is a relatively easy way to do this. I just don't know how. I migrated everything else already. Just need this piece.

Can someone help?

Link to comment
Share on other sites

14 answers to this question

Recommended Posts

  • 0

I tried this today and when I try and import the data, I get a primary key error. First it's on the criterion table. Then when I omit that, I get it on other tables.

I tried importing before I installed the module also. This gets around the primary key errors, but after module configure, the comment module doesn't function correctly. In this case, if I enter a new comment on a product to test and approve it, it never shows up on the product's review pane after approval. Suggestion?

In both scenarios, I'm not seeing the review notification working on the dashboard. It always shows 0 no matter how many are submitted during the time period.

Link to comment
Share on other sites

  • 0

There's following SQL clauses in the SQL dump, check, whether it present in your SQL dump: Before inserting table data: /!40000 ALTER TABLE your_table_name DISABLE KEYS */; After inserting table data /!40000 ALTER TABLE your_table_name ENABLE KEYS */;

If not, just add it manually, or make dump again, with appropriate options. Try to use HeidiSQL for this.

Link to comment
Share on other sites

  • 0

HI DaoKakao,

HEidiSQL is great. I use it all the time while switching live and local installations of 30bz. Funny thing is, today I tried to migrate my Yotpo reviews (those we gathered in our shop over years) into the productcomments module's tables you have shown above. Since I can not mysql by heart I tried it via Scalc CSV and a normal texteditor. But I ran into much search&replace issues and so on. Biggest issue is, that my Yotpo review export, that comes in CSV, has only customer name and customer email but not customer_ID. You need that for the module. So, may be I am going to use mysql INSERT table by table. So, why I am telling this :)

Well, actually I would be much happier if the product comments module could be enhanced. At least for an CSV import function. Just like the general csv import functions for categories and articles etc that offer eben a template csv download. Then the module could merge or bind customeremail with the relating customerid that is already in the db of customers who at least registered their email.

Next step would be then to enhance the module with the jsonmodule-v1.0.1markup, after checkout reminder mail and Bees are ready for SEO and customer usability (sensing visually good products in the hive :) in the future without being dependent on Yotpo and Co. vulture companies.

/vote4kickstart

Link to comment
Share on other sites

  • 0

@x97wehner I mensioned Heidi just because this is a tool for "not dba" people, it could help you with various options, which you may not have to know.

More important is sql clauses i've pasted from my dump. This is what switches off the table keys before inserting data and switches on that keys after data inserts complete

Link to comment
Share on other sites

  • 0

I'm pretty sure I inserted the snippets in correctly. When I ran the import, I got the same error I've seen a few times already which is telling me the keys didn't disable correctly.

Error

SQL query:

--

-- Dumping data for table tbxn_product_comment_criterion

INSERT INTO tbxn_product_comment_criterion (id_product_comment_criterion, id_product_comment_criterion_type, active) VALUES (1, 1, 1);

MySQL said: Documentation

1062 - Duplicate entry '1' for key 'PRIMARY'

Here is the beginning of the dump file: -- phpMyAdmin SQL Dump -- version 4.3.8

-- http://www.phpmyadmin.net

-- Host: localhost -- Generation Time: Oct 09, 2017 at 04:01 PM -- Server version: 5.5.51-38.2 -- PHP Version: 5.6.30

SET SQLMODE = "NOAUTOVALUEONZERO"; SET timezone = "+00:00";

/!40000 ALTER TABLE tbxn_product_comment DISABLE KEYS */; /!40000 ALTER TABLE tbxnproductcommentcriterion DISABLE KEYS */; /*!40000 ALTER TABLE tbxnproductcommentcriterioncategory DISABLE KEYS */; /*!40000 ALTER TABLE tbxnproductcommentcriterionlang DISABLE KEYS */; /*!40000 ALTER TABLE tbxnproductcommentcriterionproduct DISABLE KEYS */; /*!40000 ALTER TABLE tbxnproductcommentgrade DISABLE KEYS /; /!40000 ALTER TABLE tbxnproductcommentreport DISABLE KEYS */; /*!40000 ALTER TABLE tbxnproductcommentusefulness DISABLE KEYS /; /!40101 SET @OLDCHARACTERSETCLIENT=@@CHARACTERSETCLIENT */; /*!40101 SET @OLDCHARACTERSETRESULTS=@@CHARACTERSETRESULTS /; /!40101 SET @OLDCOLLATIONCONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */;

And here is the end of the dump file:

-- AUTO_INCREMENT for table tbxn_product_comment_criterion

ALTER TABLE tbxn_product_comment_criterion MODIFY id_product_comment_criterion int(10) unsigned NOT NULL AUTOINCREMENT,AUTOINCREMENT=2; /!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /!40101 SET CHARACTERSETRESULTS=@OLDCHARACTERSETRESULTS */; /*!40101 SET COLLATIONCONNECTION=@OLDCOLLATIONCONNECTION /; /!40000 ALTER TABLE tbxnproductcomment ENABLE KEYS /; /!40000 ALTER TABLE tbxnproductcommentcriterion ENABLE KEYS */; /*!40000 ALTER TABLE tbxnproductcommentcriterioncategory ENABLE KEYS */; /*!40000 ALTER TABLE tbxnproductcommentcriterionlang ENABLE KEYS */; /*!40000 ALTER TABLE tbxnproductcommentcriterionproduct ENABLE KEYS */; /*!40000 ALTER TABLE tbxnproductcommentgrade ENABLE KEYS /; /!40000 ALTER TABLE tbxnproductcommentreport ENABLE KEYS */; /*!40000 ALTER TABLE tbxnproductcommentusefulness ENABLE KEYS */;

Link to comment
Share on other sites

  • 0

I opened a different bug report because I'm still experiencing issues with the functionality of the comments module. The migration was done and I"ve triple checked the data and it's correct. The new topic is https://forum.thirtybees.com/topic/932/product-comments-module-bugs

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...