Originally Posted by
mrcastle
Ok, I'm not a programmer but I've been able to modify the collect_info.php file to display default info in some fields. On my attached picture, you can see I've modified the products_quantity and products_price fields and these work great. But on the products_description field I cannot get this text to display... I've played around with quotes within the quotes and some other feeble attempts but this is beyond my ability. I'd really appreciate some help.... thx in advance.
You're on the right track, but it is the default zencart code that is preventing it from working the way you expect.
I've had a play with the code and the solution isn't too difficult.
Find this code (in the collect_info.php file)
Code:
<tr>
<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main" width="25" valign="top"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>
<td class="main" width="100%"><?php echo zen_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '100%', '30', htmlspecialchars((isset($products_description[$languages[$i]['id']])) ? stripslashes($products_description[$languages[$i]['id']]) : zen_get_products_description($pInfo->products_id, $languages[$i]['id']), ENT_COMPAT, CHARSET, TRUE)); //,'id="'.'products_description' . $languages[$i]['id'] . '"'); ?></td>
</tr>
</table></td>
</tr>
Replace it with this:
Code:
<tr>
<td class="main" valign="top"><?php if ($i == 0) echo TEXT_PRODUCTS_DESCRIPTION; ?></td>
<td colspan="2"><table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="main" width="25" valign="top"><?php echo zen_image(DIR_WS_CATALOG_LANGUAGES . $languages[$i]['directory'] . '/images/' . $languages[$i]['image'], $languages[$i]['name']); ?> </td>
<td class="main" width="100%"><?php echo zen_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '100%', '30', htmlspecialchars((isset($products_description[$languages[$i]['id']])) ? stripslashes($products_description[$languages[$i]['id']]) : (zen_get_products_description($pInfo->products_id, $languages[$i]['id'])) ? :$pInfo->products_description , ENT_COMPAT, CHARSET, TRUE)); //,'id="'.'products_description' . $languages[$i]['id'] . '"'); ?></td>
</tr>
</table></td>
</tr>
Although this probably looks a bit of a mess, there is only the one line of code that needs changing. It's a very long line though.
Cheers
RodG
Bookmarks