Zen Follower
- Join Date:
- Feb 2006
- Posts:
- 111
- Plugin Contributions:
- 0
Expanding the product name field
I am trying to figure out how i can extend the product field name length because the max length of 64 does not suffice.
Thanks!
Zen Follower
I am trying to figure out how i can extend the product field name length because the max length of 64 does not suffice.
Thanks!
Zen Follower
i meant expanding the field in the admin section when adding the product to the catalog
Totally Zenned
You can use phpmyadmin to do this. In your web host cotrol panel, click on phpmyadmin. Then select your zen cart database.
Find the table products_description on the left pane. Click on it. On the right side pane, find the field products_name. Click on the edit button, it looks like a pencil. In the length/values set to 255.
Zen Follower
actually the problem is not in the db. the actual field in the html form is too small.
Black Belt
You should be able to add a name longer than the field box. It should just scroll left.
If you need product names longer than 64 characters, bobdog's advice is correct.
Zen Follower
so, i just tried it and it maxes out at 64 characters. it only scrolls until you get to 64.
1234567890123456789012345678901234567890123456789012345678901234
that is all i can put in.
Black Belt
Exactly. That's because that field is set to 64 characters in the database. bobdog's advice will fix the problem.
New Zenner
stevesh:
Exactly. That's because that field is set to 64 characters in the database. bobdog's advice will fix the problem.
It won't work for me, either. There's no "length" option at where you directed us above. Please see attached screenshot. Thanks.
Black Belt
It's the type - varchar64. Edit that field and change it to varchar128, say.
New Zenner
I just had to do the same thing - and fixed it so it is working now. There is a hilarious logical loop following the advice above in practice. If you actually drop the products_description table and try and upload a new one with your lengthy product names, the new sql upload defines the number of characters here:
products_name varchar(64) NOT NULL default '',
and undoes your previous efforts and puts the name length back to 64.
If you are going to drop and reload that table anyway, then this is the only place it needs changing - for example:
products_name varchar(72) NOT NULL default '',
(for a max of 72 characters in the product name)
Tell staff why this post should be reviewed.