Custom Field and Truncation Issue

  • Posts: 18
  • Thank you received: 3
12 years 3 months ago #60477

On the Registration page, during check-out, I need to add a custom field--i.e. a single selection dropdown. The contents of the dropdown comprises over 1200 items. Unfortunately, a truncation effect is happening--i.e. if I edit the Custom Field, the full list is not shown and the Title of the last item is truncated. From what I can tell, all 1200+ items are in the database and it looks like the data is stored in "field_value" in the "_hikashop_field" table as a single string where each item is separated by "::".

Some of the items in the dropdown are very long. As I've been shortening them, I'm noticing this is allowing more rows to be seen in the dropdown. It's almost like there is a character count limit and I've exceeded it. I wasn't sure if this was a bug or not so I apologize if I posted in the wrong area. I'm hoping I can shrink enough of the items to get all to appear in the dropdown but this list will grow.

Thanks.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
12 years 3 months ago #60500

Hi,

That's because you reached the limit of the number of characters of the column where the values are stored in the database. We didn't think someone would enter so much data in there.
You will need to go edit the table hikashop_field via phpmyadmin and change the type of the column field_value from "text" to "long text".
That will allow you to enter all the data in that field.
Also, you could directly enter all the field values directly from there. You would have to do some search and replace in a text editor and you should be able to get your list of values really rapidly in it.

The following user(s) said Thank You: tspires

Please Log in or Create an account to join the conversation.

  • Posts: 18
  • Thank you received: 3
12 years 3 months ago #60514

nicolas wrote: Hi,

That's because you reached the limit of the number of characters of the column where the values are stored in the database. We didn't think someone would enter so much data in there.
You will need to go edit the table hikashop_field via phpmyadmin and change the type of the column field_value from "text" to "long text".
That will allow you to enter all the data in that field.
Also, you could directly enter all the field values directly from there. You would have to do some search and replace in a text editor and you should be able to get your list of values really rapidly in it.


Hey nicolas, as always, thanks for the insight and assistance. We are needing customers to identify an entity with their order and the list of entities is quite extensive. As I said, I wasn't sure if it was a bug report or by design, though you've answered that question. I came close to changing the data type for that field but thought I'd wait to confirm it wasn't a bug. Change has been made and everything looks good! I use the old MySQL Query Browser. Knowing the format for the dropdown list, I was able to format my data correctly and simply copy-paste into the field directly (via MySQL Query Browser).

Please Log in or Create an account to join the conversation.

Time to create page: 0.055 seconds
Powered by Kunena Forum