Hi,
I'm starting a site that'll have about 5-6 merchants, and product names are obviously likely to differ across them.
If two merchants sell the same product, but one calls it a "Blue Widget" and the other, "Widget: Blue" how would I go about making them comparable - i.e. as one product?
I thought I could go to the SQL DB and simply rename one, but 48 hours later when the feeds are updated, the change would be undone.
This is a feature I'd probably post on rentacoder if nobody can help, so David let me know if there are any plans for this :)
Just thinking about it, Harvey...
If you didn't want to go to the expense of hiring a coder; and you don't mind managing this by way of a script that you simply have to edit and then run you could just make a script containing an array of matched product names and then a loop to build and execute the above query...
<?php
set_time_limit(0);
require("includes/common.php");
// build up the $match array with master product names and equivalents
$match["Blue Widget"] = array("Widget: Blue","Blue Widgets");
$match["Red Widget"] = array("Widget: Red","Red Widgets");
foreach($match as $k => $v)
{
$names = "'".implode("','",$v)."'";
$sql = "UPDATE products SET name='".$k."' WHERE name IN (".$names.")";
database_queryModify($sql,$result);
}
?>
Remember that your equivalent names would have to be after filters / normalisation; so unless you have made suitable changes the ":" character would ordinarily have been stripped.
Hope this helps!
Cheers,
David.
Ah, great idea. Updating via a script isn't a problem at all, so I'll use this method.
Cheers David :)
Hello Harvey,
The only way to do this is to build a lookup table of matching product names and then reference this when importing (like category mapping, but for product names). I don't have any plans to include this because of the performance issues when it comes to importing; and the large amount of work involved in administering it.
Reasonably straight forward to do, but would make importing some what slower. Your coder would be able to use the way category mapping works as a guide if you want to administer your product list through the admin interface. Rather than trying to match product names during import I would suggest doing it in one go after the import; for example:
UPDATE products SET name='Blue Widget' WHERE name IN ('Widget: Blue', 'Blue Widgets)
etc... These queries would be built up from your product name mapping lists.
Hope this helps!
Cheers,
David.