I'm hoping someone can help me with this. I'm looking for a way to indicate visually which product maps are no longer valid on the product mapping page so I can manually delete them.
Hi,
Sure - to show an X alongside deleted Product Mapping entries, edit admin/productsmap.php and look for the following code at line 68:
print "<table>";
...and REPLACE with:
$ins = array(); foreach($rows as $productmap) { $ins[] = "'".database_safe($productmap["name"])."'"; } $sql2 = "SELECT id,name FROM `".$config_databaseTablePrefix."products` WHERE name IN (".implode(",",$ins).")"; database_querySelect($sql2,$rows2); $exists = array(); foreach($rows2 as $row2) { $exists[] = $row2["name"]; } print "<table>";
And then the following code at (now) line 92:
print "<th class='pta_key'>".$productmap["name"]."</th>";
print "<th class='pta_key'>".$productmap["name"]."</th>"; print "<td>".(in_array($productmap["name"],$exists)?" ":"X")."</td>";
Hope this helps!
Cheers, David. -- PriceTapestry.com
It works perfectly! Thanks, David. You're the best. :)
©2006-2025 IAAI Software | Contact Us | Privacy Policy
Hi,
Sure - to show an X alongside deleted Product Mapping entries, edit admin/productsmap.php and look for the following code at line 68:
print "<table>";
...and REPLACE with:
$ins = array();
foreach($rows as $productmap)
{
$ins[] = "'".database_safe($productmap["name"])."'";
}
$sql2 = "SELECT id,name FROM `".$config_databaseTablePrefix."products` WHERE name IN (".implode(",",$ins).")";
database_querySelect($sql2,$rows2);
$exists = array();
foreach($rows2 as $row2)
{
$exists[] = $row2["name"];
}
print "<table>";
And then the following code at (now) line 92:
print "<th class='pta_key'>".$productmap["name"]."</th>";
...and REPLACE with:
print "<th class='pta_key'>".$productmap["name"]."</th>";
print "<td>".(in_array($productmap["name"],$exists)?" ":"X")."</td>";
Hope this helps!
Cheers,
David.
--
PriceTapestry.com