You are here:  » Character use in category mapping

Support Forum



Character use in category mapping

Submitted by henk on Mon, 2012-07-30 19:20 in

Hi David,

What character can I use in category mapping I need it for import in joomla ( subcategories ):

Like:

category 1/sub1
category 1/sub2

/ doesn't work or httaces file must be changed.

Thx Henk

Submitted by support on Tue, 2012-07-31 11:34

Hello Henk,

">" would work as a separator if you wanted to permit that; and wouldn't break the URLs. To enable this, first in admin/categories.php look for the following code at line 20:

if(!preg_match("/^[0-9a-zA-Z\. ]{0,255}$/",widget_posted($_POST["name"])))

...and REPLACE with:

if(!preg_match("/^[>0-9a-zA-Z\. ]{0,255}$/",widget_posted($_POST["name"])))

Then in includes/admin.php look for the following code at line 189:

 $importRecord["category"] = tapestry_normalise($importRecord["category"]);

...and REPLACE with:

 $importRecord["category"] = tapestry_normalise($importRecord["category"],">");

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by henk on Tue, 2012-07-31 15:07

Hi David,

The import is ok, category list is also ok but it doesn't find any products:

http://elektronica.linkik.com/category/Keuken>Afzuigkappen/

Thx
Henk

Submitted by support on Tue, 2012-07-31 15:15

Ah, sorry Henk - ">" also needs to be permitted in query normalisation (input to search.php).

In search.php look for the following code at line 6:

$q = (isset($_GET["q"])?tapestry_normalise($_GET["q"],":\."):"");

...and REPLACE with:

$q = (isset($_GET["q"])?tapestry_normalise($_GET["q"],">:\."):"");

Bear in mind that line _may_ have been modified in respect of other modifications; the change is simply to add ">" (without the quotes) to the list of permitted characters which is the second paramteter in the call to the tapestry_normalise() function...

Cheers,
David.
--
PriceTapestry.com

Submitted by henk on Tue, 2012-07-31 19:11

Hi David,

Thx again great service!!!!

HEnk