Results 1 to 5 of 5

Thread: Product Catalog - Import and/or Create Product - Product Name

  1. #1
    boseng is offline Member
    Join Date
    Jan 2008
    Posts
    6

    Default Product Catalog - Import and/or Create Product - Product Name

    hello all,
    we're trying to setup sugar 5 (currently on a test server). it seems that when we import a .csv file of products into the Product Catalog, sugar truncates the "product name" field at 50 chars. A product name cant be longer than 50 characters. I have a few questions regarding that.
    1. Is there a reason for the limit? technical or asthetic?
    2. How can I expand that limit to maybe 150 chars?

    any help would be very much appreciated
    thank you.

  2. #2
    jli
    jli is offline Junior Member
    Join Date
    May 2005
    Posts
    109

    Default Re: Product Catalog - Import and/or Create Product - Product Name

    1) the database column is probably set to 50 chars
    2) alter the column in the database, modify the vardef entry for that field, and possibly change the html form field for that field so that the maxlength is longer

  3. #3
    boseng is offline Member
    Join Date
    Jan 2008
    Posts
    6

    Default Re: Product Catalog - Import and/or Create Product - Product Name

    1) the database column is probably set to 50 chars
    2) alter the column in the database, modify the vardef entry for that field, and possibly change the html form field for that field so that the maxlength is longer
    EDIT: 03-14-08
    Here are the steps I took:

    ALTER TABLE products
    MODIFY name varchar(150);
    ALTER TABLE product_templates
    MODIFY name varchar(150);
    changed vardefs.php - in the /modules/Products Directory
    'name' =>
    array (
    'name' => 'name',
    'vname' => 'LBL_NAME',
    'dbType' => 'varchar',
    'type' => 'name',
    'len' => '150',
    'comment' => 'Name of the product',
    'reportable' => true,
    *changed len from 50 to 150

    changed vardefs.php in the /modules/Product Templates Directory
    'name' =>
    array (
    'name' => 'name',
    'vname' => 'LBL_NAME',
    'dbType' => 'varchar',
    'type' => 'varchar',
    'len' => '150',
    'comment' => 'Name of the product'
    *changed len from 50 to 150

    changed productvardefs.php in the cache/modules/products Directory
    *changed len from 50 to 150

    changed producttemplatevardefs.php in the cache/modules/product templates directory
    *changed len from 50 to 150

    so after all the above steps, i did a product catalog import on a file with the following 3 products
    the first one had a name that was UNDER 150 characters
    the second one had a name that was EXACTLY 150 characters
    the third one had a name that was OVER 150 characters

    the import was successful, but when in "ListView" and "DetailedView" of the product catalog, the name shows up truncated at 50 characters still.

    Next, I tried a force on the mysql database, and i manually set a 150 character string into the database using the following:
    update product_templates set name="THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG THE QUICK BROWN FOX JUMPED OVER THE LAZY DOG 123456789 12345" where id="d7d0cafc-ccba-dc08-fa4c-47dab68cc928";
    Went back to sugar and viewed it, it showed up fine
    see picture here -

    i clicked on it, changed some arbitrary piece of data, like the price, and when i hit save, it reverts to truncated name at 50 chars.

    QUESTIONS / COMMENTS:
    1. It is obvious that sugar is capable of displaying 150chars in the name field, based on the above information, but it seems that during a save, or an import, sugar truncates that field at 50 characters, even if i have the vardefs set to something bigger than 50.
    2. It seems the advice to change the database, and the form that limits the display is good, but there is also "something" else that needs to be done to get this to stick.

    -thanks in advanced
    Last edited by boseng; 2008-03-14 at 07:46 PM.

  4. #4
    jli
    jli is offline Junior Member
    Join Date
    May 2005
    Posts
    109

    Default Re: Product Catalog - Import and/or Create Product - Product Name

    is it only truncated in the edit view (even before the save)? what's the maxlength form field value set to for the product name?

  5. #5
    boseng is offline Member
    Join Date
    Jan 2008
    Posts
    6

    Default Re: Product Catalog - Import and/or Create Product - Product Name

    it is not truncated in the edit view. it shows up fully at 150chars,
    see picture - editview.jpg

    its when i'm in that view, then i hit save,
    it truncates in the detail, and list view



    the form length is 150
    Attached Images Attached Images  

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Missing Studio Items - Product Catalog List
    By eugenevdm in forum Help
    Replies: 1
    Last Post: 2008-08-15, 03:48 PM
  2. Product Catalog Question
    By Angel in forum General Discussion
    Replies: 1
    Last Post: 2008-02-04, 08:25 AM
  3. Product Catalog v. Products
    By mallie in forum Help
    Replies: 3
    Last Post: 2007-11-05, 03:48 PM
  4. Product Catalog list dialog popup in Quotes
    By zonar in forum General Discussion
    Replies: 0
    Last Post: 2006-01-09, 03:42 AM

Bookmarks

Posting Permissions

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