softbeach Posted February 20, 2010 Share Posted February 20, 2010 Hello,How to increase the characters field of META tags?it only aalows 128 chars max and some where just 255 chars maxwhat if we want to give more than this?Urgent help required Link to comment Share on other sites More sharing options...
rocky Posted February 21, 2010 Share Posted February 21, 2010 You need to modify the ps_product_lang and ps_category_lang tables in your database and increase the size of the meta fields from varchar(128) to however many characters you want to use. Please note that Google only displays the first 160 characters of a metadescription. You'll also need to modify the $fieldSizeLang variable on line 186 of classes/Product.php and line 64 of classes/Category.php and increase the size from 128 to whatever number you put in the database. 1 Link to comment Share on other sites More sharing options...
uddhava Posted February 21, 2010 Share Posted February 21, 2010 This was logged as a "bug" in the tracker.I just got conformation that this will be fixed in the next version of PS. (1.3.0.2 ?) Link to comment Share on other sites More sharing options...
PatJ Posted May 3, 2010 Share Posted May 3, 2010 You need to modify the ps_product_lang and ps_category_lang tables in your database and increase the size of the meta fields from varchar(128) to however many characters you want to use. Please note that Google only displays the first 160 characters of a metadescription. You'll also need to modify the $fieldSizeLang variable on line 186 of classes/Product.php and line 64 of classes/Category.php and increase the size from 128 to whatever number you put in the database. Hi,I am trying to modify just how you say.I am facing a little trouble in the classes/Category.php file, line 64 I have:protected $fieldsSizeLang = array('name' => 64, 'link_rewrite' => 64, 'meta_title' => 128, 'meta_description' => 128, 'meta_description' => 128); the size for name filed is not the same as in the ps_categoy_lang table (64 versus 128)same for link_rewrite. I am a bit confused ...and there is 2 meta_description but no meta_keywords in this line ...What should I do ?Thanks for your help Link to comment Share on other sites More sharing options...
nick_escu Posted May 6, 2010 Share Posted May 6, 2010 and there is 2 meta_description but no meta_keywords in this line ... I would also like to know if this duplicate is a bug in Category.php line 64 vers. 1.2.5, and what is the form of the corrected line in order to correctly modify the length of the meta_description field.Thank you, Link to comment Share on other sites More sharing options...
nick_escu Posted May 6, 2010 Share Posted May 6, 2010 This is how I did it, and it works but I still need a confirmation: protected $fieldsSizeLang = array('name' => 64, 'link_rewrite' => 64, 'meta_title' => 128, 'meta_description' => 254, 'meta_keywords' => 254); Thank you, Link to comment Share on other sites More sharing options...
PatJ Posted May 6, 2010 Share Posted May 6, 2010 Hi,I tested to change the value of the meta_keywords field in the database (changed to 255), without changing the category.php file.It seems to work well. No errors and I can use 255 characters in the meta field.But I would like to know if there may be a possible problem ?? Link to comment Share on other sites More sharing options...
nick_escu Posted May 6, 2010 Share Posted May 6, 2010 Ok but what version of prestashop ? Link to comment Share on other sites More sharing options...
[email protected] Posted August 22, 2013 Share Posted August 22, 2013 You need to modify the ps_product_lang and ps_category_lang tables in your database and increase the size of the meta fields from varchar(128) to however many characters you want to use. Please note that Google only displays the first 160 characters of a metadescription. You'll also need to modify the $fieldSizeLang variable on line 186 of classes/Product.php and line 64 of classes/Category.php and increase the size from 128 to whatever number you put in the database. I did This on version 1.5.4.1 and it worked perfectly. Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now