Jump to content

Limit description 6000 P.S. 1.7.2


Rhyme94

Recommended Posts

How to increase the maximum characters of the product description.

I have increased the space on the database but the limit remains fixed at 6000 when I tried to decrease the space even though it did not go 6000 characters but it marked me a maximum of 6000, now I do nothing but find "the description has no limits depends on the database "But in this case I mistake to overcome it.
I apologize for writing but the Italian forum is useless.
 
Link to comment
Share on other sites

In most of the cases, product fiels are not only restricted by their database field lengths but also with some javascript checking the field length before sending the data to the database. Hence you also have to check the javascript related to the product controller.

 

If you are using a unix based system, you could try the following:

 

1. Log into server, change path to your prestashop installation path.

2. Run the following command.

grep -rnw . -e '6000' | cut -c1-100

Recursive search for the term '6000' in all files, print file name and the contents of the first 100 characters.

 

Since I am not using 1.7, I cannot assist with a more detailled answer.

Edited by Scully (see edit history)
  • Like 1
Link to comment
Share on other sites

Hi 
In \src\PrestaShopBundle\Form\Admin\Product\ProductInformation.php 
in line: 161, 165. Try change value counter and max

 

I haven't actually tested it. :)

            'options' => [
                'attr' => array(
                    'class' => 'autoload_rte',
                    'counter' => 6000,
                ),
                'constraints' => array(
                    new TinyMceMaxLength(array(
                        'max' => 6000
                    ))
                ),
                'required' => false
            ], 
Edited by Loboo (see edit history)
  • Like 3
  • Thanks 3
Link to comment
Share on other sites

 

Hi 

In \src\PrestaShopBundle\Form\Admin\Product\ProductInformation.php 

in line: 161, 165. Try change value counter and max

 

I haven't actually tested it. :)

            'options' => [
                'attr' => array(
                    'class' => 'autoload_rte',
                    'counter' => 6000,
                ),
                'constraints' => array(
                    new TinyMceMaxLength(array(
                        'max' => 6000
                    ))
                ),
                'required' => false
            ], 

Very thanks!

Link to comment
Share on other sites

  • 4 months later...

Hello,

I am migrating to 1.7.2. I am not managing to bring in the whole description, I need to increase the characters in the product description apparently . If I make this change above will this be overwritten when I do the next Prestashop update? Could someone possibly give the exact steps to increase both the long and short description size? I understand there are 2 steps? In the database then in the javascript? Thanks.

Link to comment
Share on other sites

Short description limit you can change in BO or in database.
Description limit you can change in  \src\PrestaShopBundle\Form\Admin\Product\ProductInformation.php.

In Prestashop 1.7.3.0 this limit will be delete.

Link to comment
Share on other sites

Thanks for the reply! So I don't need to change the limit in the database then?

Am I right in thinking that if I change the ProductInformation.php then this will be overridden when the update to 1.7.3 happens. Will this break my page potentially on update to 1.7.3? 

Thanks so much for the help!

 

Link to comment
Share on other sites

  • 2 years 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...