zdavatz Posted August 27, 2008 Posted August 27, 2008 Hi I have one question: How do I change the input field length in the Admin-Area. The input field for "Products Name:" in the Admin-Area is to short for a lot of products of mine. I always have to scroll horizontally. I would like to double the size of that filed. How do I change the length of that field. Any hints are very welcome. Thank you. Best Zeno
shooter-boy Posted August 27, 2008 Posted August 27, 2008 Open up catalog/admin/categories.php You can edit line 507 (of a standard install) <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? stripslashes($products_name[$languages[$i]['id']]) : tep_get_products_name($pInfo->products_id, $languages[$i]['id']))); ?></td> to <td class="main"><?php echo tep_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . tep_draw_input_field('products_name[' . $languages[$i]['id'] . ']', (isset($products_name[$languages[$i]['id']]) ? stripslashes($products_name[$languages[$i]['id']]) : tep_get_products_name($pInfo->products_id, $languages[$i]['id'])), 'width="64"'); ?></td> The database limit for product name is 64 characters, so the width of 64 should be fine :D Of course back up first.. blah blah blah... Rob Rob Bell - Inspired Graphix Customising osCommerce in Australia, and the world! View my profile for web and email links. I'm sorry, but i cannot offer Free support via PM etc, and osCommerce forums prohibit me from putting any reference to paid support in my signauture. However viewing my profile may provide links to my website or something like that which you may find useful.
GemRock Posted August 27, 2008 Posted August 27, 2008 a simple way is to use inline css to define the width as the parameter for that tep function. Ken ps: size of number of character allowed and the PHYSICAL SIZE of the field (the input box) is two different things. commercial support - unProtected channel, not to be confused with the forum with same name - open to everyone who need some professional help: either PM/email me, or go to my website (URL can be found in my profile). over 20 years of computer programming experience.
shooter-boy Posted August 27, 2008 Posted August 27, 2008 ps: size of number of character allowed and the PHYSICAL SIZE of the field (the input box) is two different things. Yes good point, my brain is too tired down here in Aus... change SIZE to WIDTH and it will work - or a CSS rule as GemRock said. Although a CSS rule won't be as accurate as a simple HTML WIDTH attribute i don't think (as far as getting all chars to display). Original post edited. Rob Rob Bell - Inspired Graphix Customising osCommerce in Australia, and the world! View my profile for web and email links. I'm sorry, but i cannot offer Free support via PM etc, and osCommerce forums prohibit me from putting any reference to paid support in my signauture. However viewing my profile may provide links to my website or something like that which you may find useful.
zdavatz Posted August 28, 2008 Author Posted August 28, 2008 Yes good point, my brain is too tired down here in Aus... change SIZE to WIDTH and it will work - or a CSS rule as GemRock said. Although a CSS rule won't be as accurate as a simple HTML WIDTH attribute i don't think (as far as getting all chars to display). Original post edited. Rob Thank you for this reply Rob but this did not work. The size of my input field still has not changed. The length is still to short (same as before). I added the code from line 507 as you advised. The input field for "Products Name" is still only about 22 chars long. I do understand the difference between the length of the field and the actual amount of chars you are allwoed to place into the field. I want to make the field longer so I do not have to scroll for long products names.
zdavatz Posted August 28, 2008 Author Posted August 28, 2008 change SIZE to WIDTH and it will work - or a CSS rule as GemRock said. Rob! You where right! It is "Size" _not_ "Width"! That works just great! Use "SIZE"! Thanks again. Best Zeno
shooter-boy Posted August 28, 2008 Posted August 28, 2008 LOL - oh well, got there in the end. Yeah - size does work now that i think about it - why wouldn't it! :D People can get me confused easily when it's late enough :D You can also put maxlength="64" too to limit it to the database max (since anything longer will get cut off too). Rob Rob Bell - Inspired Graphix Customising osCommerce in Australia, and the world! View my profile for web and email links. I'm sorry, but i cannot offer Free support via PM etc, and osCommerce forums prohibit me from putting any reference to paid support in my signauture. However viewing my profile may provide links to my website or something like that which you may find useful.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.