You are here:  » Create a category name into another language except English


Create a category name into another language except English

Submitted by D.Tzortzis on Sat, 2014-09-06 14:44 in

I install today the 14/06A i have set the char set into utf-8 the Greek language working correct.
When i try to create a Category from admin panel with Greek language the Name Category was highlighted as Red.

How can i create a category name into another language except English?

Thanks,
D. Tzortzis

Submitted by support on Sat, 2014-09-06 15:30

Hi,

This is actually a legacy from a very early version of Price Tapestry that didn't use "normalisation" in SEO friendly URLs so the restriction can be removed, which I will also do for the next update to Price Tapestry. To do this, edit admin/categories.php and look for the following code at line 18:

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

...and REPLACE with:

  if(!widget_posted($_POST["name"]))

You'll then be able to create Category Mapping entries in the full UTF-8 character set.

Cheers,
David.
--
PriceTapestry.com

Submitted by D.Tzortzis on Sat, 2014-09-06 19:22

David,
Working OK.

Thanks,
D. Tzortzis

Submitted by D.Tzortzis on Sun, 2014-09-07 08:08

Hello,
We have the same function in any other file like Feed Registration or Product Mapping?

Thanks,
D. Tzortzis

Submitted by support on Sun, 2014-09-07 10:39

Hi,

Product Mapping shouldn't be restricted in the same but let me know if you're having any problem creating a new mapping with UTF-8 characters. Similar changes to admin/feeds_register_step2.php, for Merchant Name, look for the following code at line 26:

  elseif (($_POST["field_merchant"]=="") && (!preg_match("/^[0-9a-zA-Z\. ]{1,255}$/",$_POST["merchant"])))

...and REPLACE with;

  elseif (($_POST["field_merchant"]=="") && (!$_POST["merchant"]))

For Category Name, look for the following code at line 39:

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

...and REPLACE with:

  if(FALSE)

And for Brand Name, look for the following code at line 47:

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

...and REPLACE with:

  if(FALSE)

Cheers,
David.
--
PriceTapestry.com