Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Help Shorten and/or Truncate the Products Model Length

Help Shorten and/or Truncate the Products Model Length

Locked

Views: 1,588

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
21 Sep 2009, 4:05 PM
#1
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Help Shorten and/or Truncate the Products Model Length

Does anyone know how I could shorten the number of characters allowed in the 'Products Model' code field?

http://www.limelites.co.uk/screenPL.jpg

When I sometimes write too much in this field, it pushes onto a new line. It'd be ideal if I could reduce the allowed characters so this never happens again.

Also, if I change PHP code to force a shorter length, what would happen to the existing 'Products Model' Codes? Would they just truncate??

21 Sep 2009, 4:28 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Help Shorten and/or Truncate the Products Model Length

Just as a starter, you can set the size of a field in the database using phpMyAdmin. The existing field is probably something like varchar 64 or varchar 32.

21 Sep 2009, 4:39 PM
#3
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Help Shorten and/or Truncate the Products Model Length

Hi Glen,

I don't know the first thing about using phpMyAdmin. I've heard of it, but never used it before. I don't like tampering with my database in any way.

I wondered if there was maybe a PHP file that specified the character length?

21 Sep 2009, 4:45 PM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: Help Shorten and/or Truncate the Products Model Length

I know how you feel. Messing with the db can be scary, but I don't know of a PHP file that affects the products_model field length. There could be one, but the usual advice given for things like this is to change it in the db.

21 Sep 2009, 5:01 PM
#5
limelites avatar

limelites

Totally Zenned

Join Date:
Jan 2009
Posts:
2,085
Plugin Contributions:
0

Re: Help Shorten and/or Truncate the Products Model Length

If I'd need to screw about with the DB then I think I'll just forget it and I'll just consciously make the effort to keep the Product Model short :unsure:

21 Sep 2009, 8:38 PM
#6
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Help Shorten and/or Truncate the Products Model Length

phpMyAdmin is just another tool, and not that difficult to figure out. I would set up another Zenacrt installation, probably in a subdirectory, with its own database, and try changing the length in that first. You'll find it's really easy.

21 Sep 2009, 10:10 PM
#7
kim avatar

kim

Obaa-san

Join Date:
Jun 2003
Posts:
26,594
Plugin Contributions:
0

Re: Help Shorten and/or Truncate the Products Model Length

Why not just remove/prevent it from showing on the product listing?