You are here:  » I can not run the filter "EXPLODE"


I can not run the filter "EXPLODE"

Submitted by DVDAFFAIRES on Wed, 2012-09-26 22:37 in

Hi David.

I can not run the filter "EXPLODE".

I have a category in the feed:
"Métiers et formations,Entreprise,Romans & Ludique"

If I configure the filter with a comma "," then "-1", I have as a result:
"Métiers et formationsEntrepriseRomans Ludique"

Like another stream with the ">" character.
"Métiers et formations > Entreprise > Romans"

I configure the filter with ">" and "-1" as I result
"Métiers et formationsEntrepriseRomans"

I do not understand or come to the problem.
Could you help me?

Thank you in advance.
Cheers,
Raoul

Submitted by support on Thu, 2012-09-27 08:56

Hello Raoul,

In both cases it's because the separator character is actually being removed by normalisation before the point at which the filter is applied.

Easily fixed - normalisation can simply be moved so that it is applied after user filters. In includes/admin.php, look for the following block of code beginning at line 187:

    if ($importRecord["category"])
    {
      $importRecord["category"] = tapestry_normalise($importRecord["category"]);
    }

CUT the above section, and then PASTE back into the script around line 321, immediately before the following comment:

    /* create normalised version of product name for use in URLs */

Your filters should then work as expected; and you'll still have the resulting category names being normalised (so that they can safely appear in clean URLs).

Cheers,
David.
--
PriceTapestry.com

Submitted by DVDAFFAIRES on Thu, 2012-09-27 10:03

Hi David.

It works perfectly!

Thank you for your help.

Cheers,
Raoul