You are here:  » Filter - remove products by category at merchant level


Filter - remove products by category at merchant level

Submitted by madstock on Thu, 2006-02-23 18:39 in

Hi,

I don't know how easy this is to do (although as I can explain it in simple terms, I would imagine it may not be too vexing!), but would you possibly be able to include the following in pro:

As an example WHSmith offer books, dvds, video, cds and software etc.

Would it be possible (at filter level), to say (as an example) "Where merchant is WHSmith, and category is software, remove from database", thus removing all software sold by WHSmith. I would of course imagine that a full import would have to be made before applying the filter, in order to populate a category list?? The benefit of doing it this way as opposed to through phpmyadmin would be that as a filter it would automatically kick-in whenever the feeds are imported, although if there is a really simple idiot-proof way to set this up to autorun in phpmyadmin then I would love to know how...

The net result of the above would mean leaner databases and where there is a specialist site more accuracy of search results.

Thanks again for your fast, efficient and helpful replies,
Duncan

Submitted by support on Fri, 2006-02-24 11:34

Hi Duncan,

I've implemented this as a new filter called "Drop Record". The filter configuration panel has a single text field; which can either be left empty (to match an empty field) or contain a text string to match.

If the match is true; the filter exec function sets a new global flag $filter_dropRecordFlag causing the import process to discard the record.

I've checked this into the current distribution. Files modified:

  • includes/admin.php
  • includes/filter.php

As this is a filter; it will be applied whenever the feed is imported; which should achieve what you want to do!

Submitted by madstock on Fri, 2006-02-24 12:24

Thanks,that does just what I wanted - almost!

Would it be possible to be able to either:

1. Apply multiple DROP filters to the same feed , or
2. Introduce something like an "OR" statement (if such a thing exists) into the filter?

The reason I ask is that (for example)...

The "Blah DVD" feed contains the following categories under Category (MASTERCATEGORY):

Consoles
Desktop Computer
Sony Playstation

Using the Drop Record by Category, I set up three filters (one for each phrase), but only one filter works??

If I could enter "Consoles" OR "Desktop Computer" OR "Sony Playstation" that would be a real boon, or alternately if there is a way to get the three filters to work in conjunction with eachother that would do the trick!

Apologies if I appear to be moaning unduly, this is indeed of great benefit, and clears up many other feeds (e.g. Tesco Jersey, who have the good sense to set up decent master categories).

Thanks again,
Duncan

Submitted by support on Fri, 2006-02-24 12:31

It should have worked like that; but a bug meant that each invocation of the filter would reset the drop record flag! I've checked the fix into includes/filter.php.

Submitted by madstock on Fri, 2006-02-24 13:05

Thanks - now works a treat