Page 1 of 2 12 LastLast
Results 1 to 10 of 20
  1. #1
    Join Date
    Mar 2006
    Posts
    65
    Plugin Contributions
    0

    Default A Categories / Products can only be 31 letters?

    Is there any way to make the name of category longer than 31 letters/signs or whatever it is? There's a limit, how do i change that?

  2. #2
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: A Categories / Products can only be 31 letters?

    I guess you have to make change in the

    admin\categories.php

    where it says
    Code:
     $category_inputs_string = '';
        $languages = zen_get_languages();
        for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
          $category_inputs_string .= '<br />' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . zen_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', '', zen_set_field_length(TABLE_CATEGORIES_DESCRIPTION, 'categories_name'));
        }
    Might not be the best way, but this is the only one I know of!
    San
    Last edited by superprg; 2 Oct 2006 at 11:08 PM.
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  3. #3
    Join Date
    Mar 2006
    Posts
    65
    Plugin Contributions
    0

    Default Re: A Categories / Products can only be 31 letters?

    found it, but what should i change?

  4. #4
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: A Categories / Products can only be 31 letters?

    Well before I suggest the solution I just want to say that be very careful when you edit the code...

    So here it is
    just after that code say
    echo htmlspecialchars($category_inputs_string);

    You will get output like

    ----------
    <br /><img src="http://localhost/zencart/includes/languages/english/images/icon.gif" border="0" alt="English" title=" English ">&nbsp;<input type="text" name="categories_name[1]" size = "33" maxlength = "32">

    ----------
    This is the value which is getting assinged to $category_inputs_string
    (this step was just for understanding as to whats happening!)

    You can change it now by assigning it like this after removing the echo statement

    ----------
    $category_inputs_string='<br /><img src="http://localhost/zencart/includes/languages/english/images/icon.gif" border="0" alt="English" title=" English ">&nbsp;<input type="text" name="categories_name[1]" size = "133" maxlength = "132">';
    ----------
    See how I have changed the value of size and maxlength...

    So final code looks like
    Code:
    for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
          $category_inputs_string .= '<br />' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . zen_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', '', zen_set_field_length(TABLE_CATEGORIES_DESCRIPTION, 'categories_name'));
        }
    	//echo htmlspecialchars($category_inputs_string);
    
    	$category_inputs_string='<br /><img src="http://localhost/zencart/includes/languages/english/images/icon.gif" border="0" alt="English" title=" English ">&nbsp;<input type="text" name="categories_name[1]" size = "133" maxlength = "132">';
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  5. #5
    Join Date
    Mar 2006
    Posts
    65
    Plugin Contributions
    0

    Default Re: A Categories / Products can only be 31 letters?

    You've tryed it so you know it's working?

    I put

    ##################################################################################################################################___

    $category_inputs_string = '<br /><img src="http://localhost/zencart/includes/languages/english/images/icon.gif" border="0" alt="English" title=" English ">&nbsp;<input type="text" name="categories_name[1]" size = "133" maxlength = "132">';
    $languages = zen_get_languages();
    for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
    $category_inputs_string .= '<br />' . zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . '&nbsp;' . zen_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', '', zen_set_field_length(TABLE_CATEGORIES_DESCRIPTION, 'categories_name'));
    }
    //echo htmlspecialchars($category_inputs_string);

    $category_inputs_string='<br /><img src="http://localhost/zencart/includes/languages/english/images/icon.gif" border="0" alt="English" title=" English ">&nbsp;<input type="text" name="categories_name[1]" size = "133" maxlength = "132">';

    ##################################################################################################################################___

    Correct?

  6. #6
    Join Date
    Feb 2006
    Location
    Chicago
    Posts
    1,162
    Plugin Contributions
    0

    Default Re: A Categories / Products can only be 31 letters?

    Right...Did that work for you?
    Tutorials on Zen Cart
    http://tutorials.zen-cart.com/index.php
    ---------------
    advanced.programmer at gmail dot com
    In love with Zen Cart!!

  7. #7
    Join Date
    Mar 2006
    Location
    Los Angeles
    Posts
    287
    Plugin Contributions
    3

    Default Re: A Categories / Products can only be 31 letters?

    doesn't this change need to happen in the database too?

  8. #8
    Join Date
    Mar 2006
    Posts
    65
    Plugin Contributions
    0

    Default Re: A Categories / Products can only be 31 letters?

    Quote Originally Posted by superprg
    Right...Did that work for you?
    Nope, nothing =(

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

    Default Re: A Categories / Products can only be 31 letters?

    Guys ... that is a self-learning function that is based on physical size of the categories_description field length for:
    categories_name varchar(32)

    As you change the physical size in the database table categories_description it will automatically grow in the code there ...
    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: v1.5.5]
    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!

  10. #10
    Join Date
    Mar 2006
    Posts
    65
    Plugin Contributions
    0

    Default Re: A Categories / Products can only be 31 letters?

    So how do i change the physical size in the database table categories_description?

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Replies: 6
    Last Post: 21 Nov 2010, 01:35 PM
  2. only 5 Greek letters to the categories...
    By AlexG in forum General Questions
    Replies: 3
    Last Post: 31 Oct 2010, 10:05 AM
  3. only 5 Greek letters to the categories...
    By AlexG in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 28 Oct 2010, 10:27 AM
  4. Replies: 1
    Last Post: 9 Mar 2009, 11:40 PM
  5. CATEGORIES limits to only four first letters of each word.
    By Rol in forum Addon Language Packs
    Replies: 8
    Last Post: 30 Nov 2008, 06:09 PM

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
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR