Tags longer than 32 characters in PrestaShop 1.7

Hi, 

I have a question again :) Product, Option, Tag if I put a longer tag, after saving it truncates it, do you have any idea where I can lengthen the number of characters? 





Hello,
Firstly it is necessary to change databse settings.
log in to your phpmyadmin, go to table ps_tag

it has 3 fields
  1. id_tag
  2. id_lang
  3. name

We are interested in the last one "name" field. By default this field definition is VARCHAR 32, change it to VARCHAR 250

Second thing is a modification of prestashop core.
open file: /classes/Tag.php
change line:
            'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 32),
to:
            'name' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName', 'required' => true, 'size' => 250),


Done!
from now your shop should not "cut" the tag with more than 32 characters. It will accept up to 250 characters :)
Share on Google Plus

About VEKIA

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.
    Blogger Comment

1 comments: