You are here:  » Inbuilt price tapestry filters not editable by users


Inbuilt price tapestry filters not editable by users

Submitted by jamie on Sun, 2016-10-09 19:11 in

Hi David,

I have a merchant where the product name is in the form...

"ProductName Category"

So basically the product name is the actual product with 2 spaces and then the category.

I have setup a global filter (because 'global' is the first thing to run per http://www.pricetapestry.com/node/5654) search and replace regexp of:

/^(.+?) .*$/

And replace this with

$1

However this doesnt seem to work.

When I check "Tools -> Feed Utilities -> Imported Analysis" it looks like price tapestry runs a check to replace 2xspace with 1xspace prior to the global filters running.

Is this correct? If so its a userful thing to have, but is there a way to override this for product names so that I can clean them up for this merchant?

Many thanks
Jamie

Submitted by support on Mon, 2016-10-10 09:13

Hello Jamie,

Double (or more) spaces are removed from the name field by the following code at line 231 in includes/admin.php

    $importRecord["name"] = preg_replace('/[ ]{2,}/',' ',$importRecord["name"]);

So to prevent this behaviour, either comment out or delete this line, and then re-import.

Cheers,
David.
--
PriceTapestry.com