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?
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?
I guess you have to make change in the
admin\categories.php
where it says
Might not be the best way, but this is the only one I know of!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']) . ' ' . zen_draw_input_field('categories_name[' . $languages[$i]['id'] . ']', '', zen_set_field_length(TABLE_CATEGORIES_DESCRIPTION, 'categories_name')); }
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!!
found it, but what should i change?
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 "> <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 "> <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']) . ' ' . 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 "> <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!!
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 "> <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']) . ' ' . 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 "> <input type="text" name="categories_name[1]" size = "133" maxlength = "132">';
##################################################################################################################################___
Correct?
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!!
doesn't this change need to happen in the database too?
Nope, nothing =(Originally Posted by superprg
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!
So how do i change the physical size in the database table categories_description?
Bookmarks