superFreakE Posted September 27, 2006 Posted September 27, 2006 When creating a new product how would I set it so the description box has some default text already in it to save the client typing the same thing every time? Can anyone please point me in the right direction?
superFreakE Posted September 29, 2006 Author Posted September 29, 2006 I worked it out if anyone is interested : Put this at the top and add the string $default_description to the text area value. // default product description if(isset($HTTP_GET_VARS['pID'])){ $default_description = ""; } else { $default_description = "<b>Some default text</b>"; }
fabricclick102 Posted May 16, 2007 Posted May 16, 2007 This is exactly what I'm looking for, but I don't wquite understand, put it in the top of what? and where is the text area value? to put the "$default_description" in? I worked it out if anyone is interested : Put this at the top and add the string $default_description to the text area value. // default product description if(isset($HTTP_GET_VARS['pID'])){ $default_description = ""; } else { $default_description = "<b>Some default text</b>"; }
superFreakE Posted June 3, 2007 Author Posted June 3, 2007 This is exactly what I'm looking for, but I don't wquite understand, put it in the top of what? and where is the text area value? to put the "$default_description" in? File: admin/categories.php After line 18 (approx): Add: // default product description // you can put anything instead of the HTML code I have entered if(isset($HTTP_GET_VARS['pID'])){ $default_description = ""; } else { $default_description = "<b>Dimensions:</b> <br> <b>Length:</b> <br> <b>Width:</b> <br> <b>Height:</b> <br> <b>Depth:</b> <br> <b>Diameter: </b>"; } Then around line 538: Replace: <td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td> With: <td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($HTTP_GET_VARS['pID']) ? tep_get_products_description($pInfo->products_id, $languages[$i]['id']) : stripslashes($default_description))); ?></td>
fabricclick102 Posted June 4, 2007 Posted June 4, 2007 Thank you so much, it works Great! I can't thank you enough, I was also wondering if you knew a way to add several drop down menus, just in the admin and when a selection is made while adding a new product from the drop downs it would show in the description, any help or direction on documents that can help me do this would be great if you know of any, Again THANKS SO MUCH FOR YOUR HELP! File: admin/categories.php After line 18 (approx): Add: // default product description // you can put anything instead of the HTML code I have entered if(isset($HTTP_GET_VARS['pID'])){ $default_description = ""; } else { $default_description = "<b>Dimensions:</b> <br> <b>Length:</b> <br> <b>Width:</b> <br> <b>Height:</b> <br> <b>Depth:</b> <br> <b>Diameter: </b>"; } Then around line 538: Replace: <td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($products_description[$languages[$i]['id']]) ? stripslashes($products_description[$languages[$i]['id']]) : tep_get_products_description($pInfo->products_id, $languages[$i]['id']))); ?></td> With: <td class="main"><?php echo tep_draw_textarea_field('products_description[' . $languages[$i]['id'] . ']', 'soft', '70', '15', (isset($HTTP_GET_VARS['pID']) ? tep_get_products_description($pInfo->products_id, $languages[$i]['id']) : stripslashes($default_description))); ?></td>
Recommended Posts
Archived
This topic is now archived and is closed to further replies.