You are here:  » Feed Import Cleaning up process.

Support Forum



Feed Import Cleaning up process.

Submitted by sbedigital on Tue, 2012-08-21 09:45 in

Hi Dave,

I have been busy updating few minor issues with my web site. I have manged to get rid off lot of minor issues but, I am not knowledgeable enough to modify one last minor issue.

Now problem is, some of the feeds I get, have either multiple category, or have sub-categories separated by either > sign or comma or pipe. For example:

Television > LCD TV
or
Televicion, LCD TV
or even
Television | LCD TV

Now is there way create a global filter to be used for this purpose. What I mean is, If we can create a filter to read up to the first separator sign (i.e first > symbol) then keep everything up to that point and delete the rest. Obviously, creating a global filter means this can be used in other scenarios as well.

Can you help?

Noor

Submitted by support on Wed, 2012-08-22 07:09

Hello Noor,

The Explode filter will do exactly what you want. You enter the character on which to split the text up by and a return index value, most likely either 0 for the first item (main category) or if you wanted to -1 would return the last value...

Cheers,
David.
--
PriceTapestry.com

Submitted by sbedigital on Wed, 2012-08-22 07:44

Hi Dave,

Sorry, your guide is bit short cut. Following an instruction is not best assert. Could you pleas explain bit more how I can do this using explode function? One of the feed has follonwing category structure:

Category: electronic > television > LCD tv

So using the example above, I only want to keep television part of it and get rid of the rest.

Noor

Submitted by support on Wed, 2012-08-22 07:50

Hello Noor,

Sorry, in this specific example, adding an Explode filter using

Explode Character or String:

>

Return Index:

1

...that will return "television" (return index is zero based). However, bear in mind that this will require that all all category values have a suitable value as the second item. If that's not the case let me know and a simple mod to the filter perhaps would be to check if a value exists and decrement return index until a value is found...

Cheers,
David.
--
PriceTapestry.com

Submitted by sbedigital on Sat, 2012-08-25 18:27

Am I right to call this as

String Vale = >
Return Value = 2

makes it LCD TV using above example?

Noor

Submitted by support on Sat, 2012-08-25 18:51

That's correct, Noor!

Cheers,
David.
--
PriceTapestry.com