Jump to content

character limit for custom text field for specific product


Recommended Posts

Hi guys, 

 

I want to add a custom text field for customers for a specific product. I want to limit text field to 250 characters. Just for this product. I know I can add a text field via the back office > catalog > products > selected product > customization

 

But how do I limit the amount of characters for this specific text field on this product?

 

Using prestashop 1.6

 

Thank you so much. 

Link to comment
Share on other sites

  • 2 weeks later...

Hi gore.m!

 

I have a temporary solution - I use google forms for my text fields. It is not the most ideal solution. Because...

 

1. Although I can put a character limit, google forms does not count the characters for the customer as they type. This is frustrating!

2. As it's not part of prestashop, there's no way to make it a mandatory field prior to adding product to cart.

 

You can see what I did here: https://penguinyell.com/colony/23-textured-vintage-label-colony.html

 

When my life is a little better economically, I plan on purchasing presto-changeo's module, Attribute Wizard Pro: http://www.presto-changeo.com/en/attribute-modules/23-attribute-wizard.html  It seems like the perfect solution (not just for this, but for dealing with product combinations in different ways.) 

 

They have excellent customer support from my past experience with them. And there's a demo you can check out.

 

Should you come across a better do-it-yourself solution, please let me know!  :)  Have a great day/night! Nice shop.

Link to comment
Share on other sites

  • 1 year later...

Finally ha have found the solution, here: http://nemops.com/prestashop-customization-fields/#.WCbKZtXhCUk

 

Login to your control panel, and reach your database with phpMyAdmin (or another software you use to manage the database). Once you have all the tables listed, click on ps_customized_data (note that your prefix might be other than ps_), and then on structure. Finally, hit change for the value field, as shown on the next picture:

customization_data-680x289.jpg

A dialog will open. Select TEXT as a new type from the dropdown, and remove 255 from Length / Values.

customization_data_2-680x352.jpg

Then hit save. We are done! The field now accepts longer data! 
If you need the texst to be REALLY long, you can try MEDIUMTEXT or LONGTEXT as a type. However, this is usually not needed.

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

  • 3 weeks later...

 

Finally ha have found the solution, here: http://nemops.com/prestashop-customization-fields/#.WCbKZtXhCUk

 

 

Thank you, that's exactly what I was looking for. Despite making these changes (and going in to double check that the field had definitely stayed as a text field and hadn't somehow reverted back to VARCHAR), my customisation field on my product stubbornly remains at a character limit of 250.

 

hDFvAOw.jpg

 

I've deleted the customisation field from my product and put it back, and it's still got:

qbxo3eC.jpg

:(

Link to comment
Share on other sites

×
×
  • Create New...