Results 1 to 9 of 9
  1. #1
    Join Date
    Jun 2009
    Location
    Israel
    Posts
    161
    Plugin Contributions
    0

    Default 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.

  2. #2
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default 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

  3. #3
    Join Date
    Jun 2009
    Location
    Israel
    Posts
    161
    Plugin Contributions
    0

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

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

  4. #4
    Join Date
    Sep 2009
    Posts
    186
    Plugin Contributions
    0

    Default 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.

  5. #5
    Join Date
    Jun 2009
    Location
    Israel
    Posts
    161
    Plugin Contributions
    0

    Default 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

  6. #6
    Join Date
    Sep 2009
    Posts
    186
    Plugin Contributions
    0

    Default 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?

  7. #7
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default 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!

  8. #8
    Join Date
    Sep 2009
    Posts
    186
    Plugin Contributions
    0

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

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

  9. #9
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default 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!

 

 

Similar Threads

  1. How can I change the field length for product description?
    By 1speedbump in forum Customization from the Admin
    Replies: 11
    Last Post: 9 Nov 2014, 04:54 PM
  2. v139h How change the Length of field?
    By dmagic in forum General Questions
    Replies: 1
    Last Post: 23 Jul 2012, 08:05 AM
  3. Increase the length of the product model field
    By new2u in forum General Questions
    Replies: 5
    Last Post: 13 May 2011, 04:04 PM
  4. How do I change the length of the products_name field in the admin
    By shrimp-gumbo-mmmhhh in forum General Questions
    Replies: 1
    Last Post: 25 Dec 2009, 07:36 AM
  5. extend page length to fill the browser window
    By jamesdavid in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 6 May 2008, 08:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg