Hi David
I'm looking at exporting reviews from old pt databases and importing into new databases. So far using myphpadmin i've exported but when re-importing I get an error as the ID's are wrong. Could you advise which would be the easiest way to do this.
Thanks
Chris
Thanks David
I'll give that a go over the weekend.
Chris
Hi Chris,
Here's how to extend the Database Tool to export / import Reviews. In admin/database_tool.php look for the following comment at line 20:
// feeds
...and REPLACE with:
$fields["reviews"][] = "created";
$fields["reviews"][] = "approved";
$fields["reviews"][] = "product_name";
$fields["reviews"][] = "rating";
$fields["reviews"][] = "comments";
// feeds
Then look for the followign code at line 159:
if (isset($_POST["feeds"]))
...and REPLACE with:
if (isset($_POST["reviews"]))
{
$xml .= database_toolDumpTable("reviews");
}
if (isset($_POST["feeds"]))
And then the following code at line 237:
$table = "feeds";
...and REPLACE with:
$table = "reviews";
$first = TRUE;
MagicParser_parse("string://".$xml,"myRecordHandler","xml|BACKUP/REVIEWS/REVIEWS_R/");
$table = "feeds";
And finally the following code at line 301:
print "<input type='checkbox' name='feeds' id='feeds' checked='checked' /> <label for='feeds'>Feed Registration, Filters, Global Filters</label><br />";
...and REPLACE with:
print "<input type='checkbox' name='reviews' id='reviews' checked='checked' /> <label for='reviews'>Reviews</label><br />";
print "<input type='checkbox' name='feeds' id='feeds' checked='checked' /> <label for='feeds'>Feed Registration, Filters, Global Filters</label><br />";
Cheers,
David.
--
PriceTapestry.com