Apologies David,
I've seen a couple of threads where this has been discussed, but I can't see anything about dropping multiple categories in the same filter.
I think I need the "drop record" filter? but how do you list multiple categories to be dropped? I've tried a comma separated list, but it doesn't work, neither does idem surrounded by brackets?
Can you please help?
Regards
Paul
Thanks David,
got that filter and works perfectly, may I just confirm if you've got a big feed which is easier to identify the categories you want to keep is it drop record filter and list the categories in the same was as above?
Thanks
Paul
Hi Paul,
For the opposite, use Drop Record If Not (RegExp). Again, if you don't have it send me your includes/filter.php and I'll add it for you...
Cheers,
David.
Is there a way to find out what categories a merchant has?
I need to drop categories but it is very difficult adding a filter per merchant when you don't know exactly which categories they are actually in. So it would be ideal if I could just click on a specific merchant link to get all the categories they have.
I only need this from an admin point of view
Cheers
---------
Jill
Hi Jill,
Here's a Merchant Info script, save to /admin/ and browse to /admin/merchant_info.php
merchant_info.php
<?php
require("../includes/common.php");
$admin_checkPassword = TRUE;
require("../includes/admin.php");
require("admin_header.php");
require("admin_menu.php");
print "<h2>Merchant Info</h2>";
if ($_GET["merchant"])
{
print "<h3>".$_GET["merchant"]."</h3>";
print "<h4>Categories</h4>";
$sql = "SELECT DISTINCT(category) FROM `".$config_databaseTablePrefix."products`
WHERE merchant='".database_safe($_GET["merchant"])."' ORDER BY category";
if (database_querySelect($sql,$rows))
{
foreach($rows as $row)
{
print "<p>".$row["category"]."</p>";
}
}
else
{
print "There are no categories to display.";
}
print "<h4>Brands</h4>";
$sql = "SELECT DISTINCT(brand) FROM `".$config_databaseTablePrefix."products`
WHERE merchant='".database_safe($_GET["merchant"])."' ORDER BY brand";
if (database_querySelect($sql,$rows))
{
foreach($rows as $row)
{
print "<p>".$row["brand"]."</p>";
}
}
else
{
print "There are no brands to display.";
}
}
else
{
$sql = "SELECT DISTINCT(merchant) FROM `".$config_databaseTablePrefix."products`
ORDER BY merchant";
if (database_querySelect($sql,$rows))
{
foreach($rows as $row)
{
print "<p><a href='?merchant=".urlencode($row["merchant"])."'>".$row["merchant"]."</a></p>";
}
}
}
require("admin_footer.php");
?>
Cheers,
David.
Fantastic! Works a treat - thanks David!
---------
Jill
Hi Paul,
It's Drop Record RegExp that you need (if that's not in your filter list, email me your includes/admin.php and i'll add it for you); then add a "Drop Record RegExp" filter to the Category field; containing
(Category 1|Category 2|Category 3)
After next import, Category 1, Category 2 etc. will be excluded from the import...
Cheers,
David.