Glad you made this work. If you can package it into a contribution, I'm sure a lot of people would thank you. Someone else just asked today about doing this.
For those who don't want to get into building new database tables and files, there is a way to use the CSS method above for separate description blocks on one page without the hassle of trying to use absolute positioning on dynamic elements.
Enter all the different parts you want to display, with <span id=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.
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.
Disclaimer: I haven't tested this implementation yet, so if anything doesn't work as expected, ask and we'll sort it out.
Bookmarks