Forums / General Questions / How to extend Product Model Field length in the ADMIN?

How to extend Product Model Field length in the ADMIN?

Locked

Views: 2,644

Results 1 to 9 of 9
This thread is locked. New replies are disabled.
15 Sep 2009, 7:38 AM
#1
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

How to extend Product Model Field length in the ADMIN?

Hi,

I'd like to know how to change the maxlength="32" applied on the product model textfield when adding a product in the admin. I need to change this so I can workaround a design problem I have when some products need a long name to appear correct in my mirror site that is linked to a price comparison website. The workaround is basically to use the model textfield to hold the full name of the product needed to make it appear correctly in the price comparison website, while I can put whatever name I want in the product name so my design won't collapse. Later on, I'll change my mirror script to pull out the product name value from the MODEL textfield instead. Hope you understand so far. Last question I have, is basically, why is the model textfield limited to 32 chars? Any specific reason? Also, if I change this parameter or totally delete it do I also have to change something in the SQL? type of var? something like that?...thanks for any help. :smile:

Asdesign.co.il - Extreme Sports Blog

15 Sep 2009, 10:38 AM
#2
stevesh avatar

stevesh

Black Belt

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

Re: How to extend Product Model Field length in the ADMIN?

Not sure I understand completely, but if you want to increase the length allowed in the product name fields, that's done with phpMyAdmin in your hosting control panel:

http://www.zen-cart.com/forum/showthread.php?t=48154

15 Sep 2009, 10:41 AM
#3
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

Re: How to extend Product Model Field length in the ADMIN?

Awesome...it's done like I thought it'd be. Thanks!

Asdesign.co.il - Extreme Sports Blog

15 Sep 2010, 5:10 PM
#4
new2u avatar

new2u

Zen Follower

Join Date:
Sep 2009
Posts:
186
Plugin Contributions:
0

Re: How to extend Product Model Field length in the ADMIN?

Did you ever get this to work. The link shows how to change the product name, which works, but i can't get the model field to work.

15 Sep 2010, 6:19 PM
#5
asdesign avatar

asdesign

Zen Follower

Join Date:
Jun 2009
Location:
Israel
Posts:
152
Plugin Contributions:
0

Re: How to extend Product Model Field length in the ADMIN?

You can change the model field just like you do with the product name...you just have to increase the maximum chars value and it should work.

Asdesign.co.il - Extreme Sports Blog

15 Sep 2010, 11:56 PM
#6
new2u avatar

new2u

Zen Follower

Join Date:
Sep 2009
Posts:
186
Plugin Contributions:
0

Re: How to extend Product Model Field length in the ADMIN?

I have tried to increase the length of the product model field but am unable to.
I have changed the table under zen_orders_products to the following:

products_model varchar(64) utf8_unicode_ci Yes NULL

The default is 32. However even after changing it to 64, it is still stuck at 32. What am I doing wrong?

16 Sep 2010, 3:33 AM
#7
ajeh avatar

ajeh

Oba-san

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

Re: How to extend Product Model Field length in the ADMIN?

Be sure you change the model in two tables:
products
orders_products

NOTE: only new orders will have the new 64 character products_model ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

16 Sep 2010, 4:44 AM
#8
new2u avatar

new2u

Zen Follower

Join Date:
Sep 2009
Posts:
186
Plugin Contributions:
0

Re: How to extend Product Model Field length in the ADMIN?

Is there any way to modify it to work on existing products?

16 Sep 2010, 1:16 PM
#9
ajeh avatar

ajeh

Oba-san

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

Re: How to extend Product Model Field length in the ADMIN?

I would test a new order to ensure it is working ...

The reason they do not magically fix in the orders_products is that you have "allowed" the new length to be added but the data was already added when the order was created ...

You would have to update the products_model in the orders_products table from the products table to get the full length for products that match ...

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!