You are here:  » Split optional field data


Split optional field data

Submitted by marco@flapper on Wed, 2016-09-21 13:46 in

Hi,
I have created an optional field 'size'. I notice some merchants have multiple sizes in their size fields e.g.: "40/42/44" or "40,42,44"

Is there a way so that I can split it up. So that the same clothing piece can be found for size 40 or 42 or 44?

Submitted by support on Wed, 2016-09-21 14:42

Hi Marco,

The first stage would be to decide on a standard separator, e.g. comma, so for any feed that uses an alternative separator such as "/", attach a Search and Replace filter to the Size field for that feed in order to replace "/" with ",".

If you have not yet created a filter for the size field, follow the guide in this comment using "size" instead of "colour", and then finally modify the new filter code as described in this comment which covers the same scenario...

Cheers,
David.
--
PriceTapestry.com

Submitted by marco@flapper on Fri, 2016-09-23 17:45

Sorry, this was intended for use with the wordpress plugin. I assumed that splitting it up would need to be done with the feeds so I posted it here. I'll repost it in the pricetapestry.org.