You are here:  » Filters and Global Filters

Active Forum Topics


Filters and Global Filters

General Information

There may be situations in which you need to make changes to product data before it is imported. The most common scenario is when a feed does not contain your actual affiliate URL, but instead either has a direct link to the merchant's website (in which case you may be required to preceed the URL with a tracking link); or where the URL contains a placeholder that must be replaced with your affiliate ID.

Filters are applied in the order in which they are created, with Global Filters applied first, followed by individual feed filters. Once filters have been configured for a particular feed they will remain in place and will be applied whenever the feed is imported in the future.

To add a new filter or to modify an existing one, either click Global Filters or Filters alongside the feed you wish to configure filters against from the Admin home page. You will then be able to select an existing filter in order to change its configuration, or use the form to create a new filter - in which case select the filter type you wish to add and the field from the feed to which it should be applied. Proceed to configure the filter as follows:

Search and Replace

Search: Enter the text you wish to match in this field
Replace: Enter the text you wish to replace the matched text with in this field

Search and Replace RegExp

Search: Enter the regular expression to match in this field. The most common style of regular expression that would be used with this filter would be to replace multiple keywords with a single replacement which can be expressed as a pipe separated list all enclosed in brackets, for example:

/(keyword1|keyword2|keyword3)/i

Using the "i" flag following the closing delimiter makes the match case insensitive. An empty value can be matched using:

/^$/

Replace: Enter the text you wish to replace the matched text with in this field

Text Before

Text: Enter the text you wish to prefix to the selected field, which may contain placeholders that refer to the value of other fields in the feed using %FIELDNAME% (where FIELDNAME is the exact field name as displayed in the sample data below the form on Feed Registration Step 2) or other values being prepared for import using {fieldname} (where fieldname is one of merchant, name, price, category, brand, image_url, description or any additional custom field name).

Text After

Text: Enter the text you wish to postfix to the selected field, which may contain placeholders that refer to the value of other fields in the feed using %FIELDNAME% (where FIELDNAME is the exact field name as displayed in the sample data below the form on Feed Registration Step 2) or other values being prepared for import using {fieldname} (where fieldname is one of merchant, name, price, category, brand, image_url, description or any additional custom field name).

Name Case

There are no configuration parameters for this fitler. The filter will convert the selected field into "Name Case", for example, "SONY PLASMA" would be converted into "Sony Plasma".

Strip HTML

Allowable Tags: Enter any HTML tags that you do not wish to strip in their opening form only; for example to permit P and BR tags, use "<p> <br>" (without the quotes).

Drop Record

Drop record if field contains text: Enter the text to match. If the selected field contains this text the record will be dropped from the import process. You can leave the field blank if you wish to match an empty field.

Drop Record RegExp

Drop record if field matches regular expression: Enter the regular expression to match. If the selected field is a match for the regular expression the record will be dropped from the import process. The most common style of regular expression that would be used with this filter would be to drop fields based on a number of keywords; which can be expressed as a pipe separated list all enclosed in brackets, for example:

/(keyword1|keyword2|keyword3)/

Drop Record If Not

Drop record if field does not contain text: Enter the text to match. If the selected field does not contain this text the record will be dropped from the import process. You can leave the field blank if you wish to match an empty field.

Drop Record If Not RegExp

Drop record if field does not match regular expression: Enter the regular expression to match. If the selected field is not a match for the regular expression the record will be dropped from the import process.

Explode

Explode Character or String: Enter the character or string to split the field value by
Return Index: Enter the zero based return value required from the beginning of the exploded parts (0 being the first), or -1 based value required from the end of the exploded parts (-1 being the last).

UTF8 Encode

There are no configuration parameters for this fitler. The filter will convert a field from a feed encoded in the ISO-8859-1 character set into UTF-8. Use this filter if your site is configured for the UTF-8 character set but you wish to import a feed that is ISO-8859-1 encoded. You will normally only need to apply this filter against the product name and description fields.

UTF8 Decode

There are no configuration parameters for this fitler. The filter will convert a field from a feed encoded in the UTF-8 character set into ISO-8859-1. Use this filter if your site is configured for the ISO-8859-1 character set but you wish to import a feed that is UTF-8 encoded. You will normally only need to apply this filter against the product name and description fields.