You are here:  » copyfilters.php

Support Forum



copyfilters.php

Submitted by Ch3W on Fri, 2008-08-29 08:53 in

Well hello there! Hope all is well.

I've been using filters with my feeds (really awesome and time saving by the way). After taking some time to create some rather lengthy filters for a LARGE feed, I was wanting to save time by using copyfilters.php. So I tried it: "copyfilters.php sourcefilename.xml destinationfilename.xml"

At first, it seemed to work a treat. But then I noticed that it has only copied the filed name have not copied at all, it has recongised the filter type (in this case, DROP if CAT = x)... but not the field names.

I've checked admin_copyFilters in includes/admin.php and it seems fine... I've also tried using a fresh copy of includes/admin.php but it still doesn't work.

Have you noticed this before?

Thanks,
Matt

Submitted by support on Fri, 2008-08-29 09:55

Hello Matt,

Is the destination feed of exactly the same format to the first feed - i.e. are the field names the same; or are they different?

Cheers,
David.

Submitted by Ch3W on Fri, 2008-08-29 13:05

How silly of me!! Thanks for that *blush*

One question though, instead of saying, drop row if cat = $x, is it possible to say: drop row if cat =!$x (not equal to)

Cheers,
Matt

Submitted by support on Fri, 2008-08-29 13:12

Hi,

There's code for the opposite of the "Drop Record" filter - "Drop Record (If Not)" in this thread:

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

Cheers,
David.

Submitted by Ch3W on Sat, 2008-08-30 23:52

Great stuff, thanks.

I used it, and it works... but I wanted to give add more than one filter, so I added a number of Drop (if not) filters to my feed. I've noticed that if I add more than one Drop (if not) filter, it doesn't import any products. Is it possible to add more than one Drop (if not) filter?

Submitted by support on Sun, 2008-08-31 03:24

Hi Matt,

Sure - see the following thread for a link to another filter - Drop Record If Not (RegExp) and an explanation of how to use it to what (I hope) you want...

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

Cheers,
David.