carbar Posted September 20, 2015 Share Posted September 20, 2015 (edited) Hi, I increased the size of the name field in ps_tag table from 32 to 50 to meet my requirements, however it seems that PS still trims the tags to 32 characters. Is there any workaround this problem? I use Prestashop 1.6.1.1 Thanks, Max Edited September 20, 2015 by carbar (see edit history) Link to comment Share on other sites More sharing options...
SirPresta Posted September 20, 2015 Share Posted September 20, 2015 (edited) Please create new file in location: ./override/classes/Tag.php Put there this code. <?php class Tag extends TagCore { public static $definition = array( 'table' => 'tag', 'primary' => 'id_tag', 'fields' => array( 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 50), ), ); } Next remove file if exist: ./cache/class_index.phpAnd after refreshing your website - it should work as you wish Edited September 20, 2015 by SirPresta (see edit history) Link to comment Share on other sites More sharing options...
carbar Posted September 21, 2015 Author Share Posted September 21, 2015 Thanks but still chopping off the tags! :| Link to comment Share on other sites More sharing options...
veeleung Posted August 8, 2016 Share Posted August 8, 2016 You should change the char(32) to chart(128) also in the phpmyadmin. Link to comment Share on other sites More sharing options...
orlovskyy Posted November 1, 2016 Share Posted November 1, 2016 Please create new file in location: ./override/classes/Tag.php Put there this code. <?php class Tag extends TagCore { public static $definition = array( 'table' => 'tag', 'primary' => 'id_tag', 'fields' => array( 'id_lang' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedId', 'required' => true), 'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 50), ), ); } Next remove file if exist: ./cache/class_index.php And after refreshing your website - it should work as you wish Hello, I have the same problem and I already increased the name column on ps_tag to 255 and the prestashop dont assume this changes on BO product page. I already added this changes to classes, I mean I already created a Tag.php and nothing...there is other away to fix this? Thanks Link to comment Share on other sites More sharing options...
rocky Posted November 1, 2016 Share Posted November 1, 2016 You should change the 50 in the code above to 255 to match the size you put in the database. 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