Hello all,
I'm using jade's short description mod v1.1c (
http://www.zen-cart.com/index.php?main_page=product_contrib_info&cPath=40_47&products_id=271)and the supplied pre-modded files installed perfectly.
The only downside is that the short description textbox is a single line textarea (whereas the regular item description is a multiline, FCKEditor-enabled textbox).
I'm not so bothered about the WYSIWYG functionality for the short description, but it would be
really useful to have a multiline - just three or four lines max, with a 300/400 character limit on it.
I've been sifting through the files to try and figure out how to modify this textbox, and the closest I can seem to get is in admin/info/modules/product/collect_info.php on line 401:
PHP Code:
<td class="main"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']) . ' ' . zen_draw_input_field('products_short_desc[' . $languages[$i]['id'] . ']',
(isset($products_short_desc[$languages[$i]['id']]) ? $products_short_desc[$languages[$i]['id']] : zen_get_products_short_desc($pInfo->products_id, $languages[$i]['id'])),
zen_set_field_length(TABLE_PRODUCTS_DESCRIPTION, 'products_short_desc')); ?></td>
(NB: this is all on one line in collect_info.php, I've just put a couple of line breaks in to make it more readable on the forum).
I think it's the call to the zen_draw_input_field function and also there's something related with the zen_set_field_length call (is there a hard character limit in the database I wonder? I can't find any direct references searching the db for 'products_short_desc' so I'm guessing it's been defined as a PHP variable earlier on)
Anyway, Zen Cart rapidly gets really quite complex if you try and dig through the PHP files and trace back exactly which piece of code actually generates something as simple (or so you'd think) as a textbox! I'm not a bleeding edge newbie, but this is my first major work with ZC, so if someone with a little experience with the short description mod - or just someone who knows their way around hacking the PHP a little better - I'd really appreciate some pointers.
Cheers in advance,
Christopher
Bookmarks