Jump to content

Increase Product Tag Character Limit from 32 to 80


Balks

Recommended Posts

Hi All,

 

I have spent weeks searching for a solution without success and am hoping you might be able to assist.

 

We currently use a module which requires us to enter text in the Product "Tag" Field for it to work correctly and currently this field is limited to 32 characters. I need to increase this character limit from 32 to a 80 characters.

 

See below field i am referring (attached)

 

post-1375459-0-81399400-1488230915_thumb.png

 

When i try to enter a sentence with 80 character length it appears fine but when i hit save and stay the entry gets cut down to 32 characters and anything over this is simply cut off and disappears.

 

Is there a way to change this character limit from 32 to 80?

 

I understand that i may need to use phpadmin to change the "NAME" field in the "ps_tag" table VARCHAR value from 32 to 80 but when i do this it makes no difference.

 

Prestashop Version: 1.6.1.5

 

Any assistance that can be offered is greatly appreciated.

 

Thanks

 

Balks.

Edited by Balks (see edit history)
Link to comment
Share on other sites

You need to do more than just increase the length in phpMyAdmin. You'll also need to create override/classes/Tag.php with the following:

<?php

class Tag extends TagCore
{
    public function __construct($id = null, $name = null, $idLang = null)
    {
        self::$definition['fields']['name']['size'] = 80;
        parent::__construct($id, $name, $idLang);
    }
}
Link to comment
Share on other sites

  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...