You are here:  » Filters

Support Forum



Filters

Submitted by Paul1107 on Tue, 2008-12-16 19:37 in

Hi David,

I have several feeds which require filtering out 2 criteria in different fields, how can that be done?

Example: a Shoe datafeed that has 20,000 products, I only need "high heels" in the category field, but I also require a filter for the 6 different sizes each product is available in sizes 2,3,4,5,6,7...

thanks again for your help

Regards

Paul

Submitted by support on Wed, 2008-12-17 09:48

Hi Paul,

How are you currently importing the size field? If it is being imported; how do you actually want to filter it? For example, you only want sizes 2-7 etc?

Cheers,
David.

Submitted by Paul1107 on Wed, 2008-12-17 21:44

Hi David,

Only need to show one products so 1 of a particular size so size4 high heels for example, have a similar issue with dresses in John Lewis where each style has 3-4 sizes ie 8,10,12 etc only need to show 1

Thanks

Paul

Submitted by support on Thu, 2008-12-18 11:56

Hi Paul,

How is the size described in the feed - is it part of the product name (as this would cause it to import all versions) - and if so, can you give an example of an exact product name...

Cheers,
David.

Submitted by Paul1107 on Thu, 2008-12-18 19:33

Hi David,

Actually I have 2 types

1. is a shoe feed that has a "TDcategory" field eg: High Heels as well as a "size" field eg:6

2. the other like John Lewis that has the size within the description "John Lewis Esme Long Devore Dress, Black, Size 10"

regards

Paul

Submitted by support on Thu, 2008-12-18 21:18

Hi Paul,

The first situation, this shouldn't be a problem as if the size field is not combined with the product name in any way then the product name should only be imported once (as product name must be unique per merchant).

The second version; there is a filter in the following thread that should help:

http://www.pricetapestry.com/node/2017

(see first reply)

If you add the "Explode" filter code from that thread to your includes/filter.php, you can then register a new Explode filter against the Product Name field, enter "," (comma - without the quotes) as the Explode character or string; and "0" (zero - without the quotes) as the return index - and this will split the product name up and just return everything infront of the first comma - which should do the trick!

Cheers,
David.

Submitted by Paul1107 on Thu, 2008-12-18 21:42

Hi David,

OK, but don't I need to apply 2 filters at the point of upload, as the feed has 22,000 approx I need to have a filter to identify "high heels" and also "size"?

Same with Explode filter as I still need to filter "dresses" in the DROP RECORD IF NOT REGEXP?

or is that me being stupid again?

cheers

Paul

Submitted by support on Thu, 2008-12-18 21:45

Hi Paul,

That's no problem - you can add as many filters as you like - once one Drop Record filter has decided the record should be dropped nothing else will "save it" - so there's no problem having a drop record (on the category) first of all; followed by the Explode filter to clean-up the product name if the record is being allowed in!

Cheers,
David.

Submitted by Paul1107 on Thu, 2008-12-18 22:14

HI David,

works to a degree, however not all descriptions are separated by a comma

eg:

Fenn Wright Manson Blossom Dress Black Size 8

Esprit Long Sleeve V Neck Dress Black X Large

can I put multiple conditions into drop record Size 8, Size 10,...?

Thanks

Paul

Submitted by support on Thu, 2008-12-18 22:18

Hi Paul,

Sure - you could add more than one. If the explode character or string isn't found the filter will return the whole string. You could also explode on words like "Dress" if you wanted...

Cheers,
David.