This looks like a good opportunity to post a mod I've had on the back burner for a while. I worked this out a few months ago here; the current version is just tidied up from that.
This is more complex than your requirement, but can be simplified to fit.
################################################################################____
Multiple Product Descriptions
################################################################################____
This mod gives the ability to have different descriptions in product listing and product info pages, and different parts of the info page description in different places.
First you need to allow HTML to function on the product listing page. Edit /includes/modules/your_template/product_listing.php to comment out zen_clean_html in two places around lines 98 & 100, as explained in this thread. You may also need to do a similar thing in products_all_listing.php (not sure of the filename) to allow HTML on the all products page.
It is also necessary to set the product listing description to allow a larger number of characters than you are ever likely to use (Configuration > Product Listing), so HTML tags don't get truncated. That would be bad. I set mine to 2000.
Enter all the different parts you want to display, with <span class=productDescList>text text text</span><span id=productDesc1>text text text</span><span id=productDesc2>text text text</span> tags around each section.
Put the short description for listing pages in productDescList, and blocks for the info page in 1, 2, etc.
You can use this as a template to paste into the description textarea and fill in:
HTML Code:
<span class=productDescList>your text here
</span>
<span id=productDesc1>your text here
</span>
<span id=productDesc2>your text here
</span>
Copy the product description block in tpl_product_info_display to all the locations where you want to display a section of text, and give each block (including the original) a separate id.
PHP Code:
<!--bof Product description -->
<?php if ($products_description != '') { ?>
<div id="productDescription1" class="biggerText productGeneral"><?php echo stripslashes($products_description); ?></div>
<?php } ?>
<!--eof Product description -->
<br class="clearBoth" />
Give any desired styling to each description block.
In your stylesheet, find #productDescription and change it to #productDescription1. Below that declaration, add
#productDescription2 {your desired styling} etc.
Next, turn off all display of #productDesc1 and #productDesc2 etc., and .productDescList in the product info page, and turn them on again selectively.
Code:
#productGeneral .productDescList, #productDesc1, #productDesc2 { display: none; }
#productDescription1 #productDesc1 { display: block; } /*or inline*/
#productDescription2 #productDesc2 { display: block; }
The desired parts of the description will display in their respective locations.
Bookmarks