Zen Cart Logo

Product Name length

Views: 6,193

Results 1 to 13 of 13
23 Jul 2006, 6:19 AM
#1
shawn_parr avatar

shawn_parr

New Zenner

Join Date:
May 2006
Posts:
13
Plugin Contributions:
0

Product Name length

I tried a search and didn't find what I needed, I apologize if this has been covered before.

On a very small selection of items on our store, the default amount of characters available for the Product Name when creating new products in the Admin is just a few too short.

First off since I know this may be more involved I'm going to go ahead and ask a newbie-ish question: Which file is this located in?

Now I also expect that this could be more complicated. Is there a limitation in the code on this as there is also a limitation on the database field? If so is there a safe way to go about adjusting it without potentially causing chaos and destruction?

Thanks for any help. :)

23 Jul 2006, 6:26 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Product Name length

It's pretty safe to start by changing the length in the database. Be reasonable in the number you choose. The code will follow what you set...

23 Jul 2006, 6:38 AM
#3
shawn_parr avatar

shawn_parr

New Zenner

Join Date:
May 2006
Posts:
13
Plugin Contributions:
0

Re: Product Name length

Ah, very simple and elegant. I moved it from 64 to 80 and I hope that we will never need more than that. It works perfectly, and I thank you for your very speedy advice.

:D

23 Jul 2006, 1:40 PM
#4
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Name length

NOTE: Be sure you changed the length of the products_name in all tables ... or you will have some pretty short orders ... :blink:

23 Jul 2006, 2:01 PM
#5
shawn_parr avatar

shawn_parr

New Zenner

Join Date:
May 2006
Posts:
13
Plugin Contributions:
0

Re: Product Name length

Thanks for pointing that out Linda!

I dg through the tables just now in PHPMyAdmin, and the only place I saw products_name was in orders_products and products. Does that sound about right?

24 Jul 2006, 2:56 AM
#6
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Name length

products table does not have a products_description field ...

24 Jul 2006, 2:56 AM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Name length

er ... products_name field ... :smile:

24 Jul 2006, 3:01 AM
#8
shawn_parr avatar

shawn_parr

New Zenner

Join Date:
May 2006
Posts:
13
Plugin Contributions:
0

Re: Product Name length

You are of course correct. I mistyped the two tables where:

orders_products
products_description

Thanks again! :)

24 Jul 2006, 3:04 AM
#9
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Name length

Technically, there is one also in the customers_wishlist table also, but that is not in the current code ... and intended for a future release ...

30 Sep 2006, 1:01 AM
#10
polarduality avatar

polarduality

Zen Follower

Join Date:
Mar 2006
Location:
Los Angeles
Posts:
260
Plugin Contributions:
2

Re: Product Name length

I found this code in an old archived thread.

ALTER TABLE `products_description` CHANGE `products_name` `products_name` VARCHAR( 128 ) NOT NULL 

Can I still use that code under "INSTALL SQL PATCHES" for the latest version of Zen Cart?

I would just replace the table name for each instance right?

orders_products
products_description
customers_wishlist

I would also like to make the category names longer.
Is there a document I can reference to see what tables/fields need to be modified?

I'm a noob and this is the first time trying to modify database tables.

Many thanks in advance for any help.

30 Sep 2006, 2:46 AM
#11
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Name length

I would recommend backing up your database before running commands like this ...

You also must end each statement run in the Insert SQL Patch with a semi-colon or you will get a fail message ...

11 Mar 2011, 8:00 PM
#12
ttmb33 avatar

ttmb33

Zen Follower

Join Date:
May 2009
Posts:
201
Plugin Contributions:
0

Re: Product Name length

Shawn Parr:

You are of course correct. I mistyped the two tables where:

orders_products
products_description

Thanks again! :)

Do I need to change the name lenght for each product in "products_description"?

Is there anyways that I can change the name length for all products at once.

Thanks for your response.

11 Mar 2011, 8:11 PM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Product Name length

You are running the command to change the length of the fields in the tables so you are running the command once per table ... using the proper table name ...