Hi David,
I've just started a new round of product mapping for my golf site - 1,000s of new products for 2009!!
It's such a repetitive task to go through pages and pages of products to map things. This is a typical scenario for my site. Some feeds have up to 30 variations of the same product while other feeds just have it listed once. Such as:
FEED 1
Titleist 909 D2 Driver Voodoo shaft 9degrees Regular
Titleist 909 D2 Driver Voodoo shaft 9degrees stiff
Titleist 909 D2 Driver Voodoo shaft 9degrees x-stiff
Titleist 909 D2 Driver Diamana shaft 10degrees Regular
Titleist 909 D2 Driver Diamana shaft 10degrees stiff
etc
etc
up to 30/40 variations!!!
FEED 2
Titleist golf Mens 909 D2 Driver
So what I normally do is create a master product "Titleist 909 D2 Driver" and map all these products to it. That way when a visitor searches for a particular product they don't get multiple listings showing all the variations
- otherwise it just looks messy and gives a poor user experience.
Thing is, it's such a repetitive task but I can help feeling there's got to be a way to automate this in some way. For instance in the above example all items contain [Titleist 909 D2 Driver].
Is there a known way to make lighter work of this? Are you working on an enhancement?
How difficult would it be to make a search script to dump a list of product titles for search - for example [Titleist 909 D2 Driver]. Even that would speed things up very dramatically, as I wouldn't have to browse through lots of pages cutting & pasting multiple times on each page.
Hoping there's a better way to do this!
Thanks,
Neil
Hi Neil,
Have a go with this simple "helper" script to print a list of products either containing the words entered in the search form or as an exact match. To be run in the main Price Tapestry folder; although if you want to run it from /admin/ just change
require("includes/common.php");
torequire("../includes/common.php");
helper.php
<?php
require("includes/common.php");
print "<form method='post'>";
print "<input type='text' name='q' value='".htmlentities($_POST["q"])."' /> ";
print "<input type='checkbox' name='exact' ".($_POST["exact"]=="on"?"checked='checked'":"")." /> Exact Match ";
print "<input type='submit' value='Search' />";
print "</form>";
print "<hr />";
if ($_POST["q"])
{
if ($_POST["exact"]=="on")
{
$sql = "SELECT DISTINCT(name) FROM `".$config_databaseTablePrefix."products` WHERE name LIKE '%".database_safe($_POST["q"])."%' ORDER BY name";
}
else
{
$words = explode(" ",$_POST["q"]);
foreach($words as $word)
{
$wheres[] = "search_name LIKE '%".database_safe($word)."%'";
}
$where = implode(" AND ",$wheres);
$sql = "SELECT DISTINCT(name) FROM `".$config_databaseTablePrefix."products` WHERE ".$where." ORDER BY name";
}
if (database_querySelect($sql,$products))
{
print "<textarea cols='80' rows='80'>";
foreach($products as $product)
{
print $product["name"]."\n";
}
print "</textarea>";
}
else
{
print "<p>There are no products to display.</p>";
}
}
?>
Hope this helps!
Cheers,
David.