listingDescription & column_layout_grid
I use the column_layout_grid for the product category page so it will give my a 3 column table. the problem is, i am showing my product descriptions this page.
---The descriptions use html i.e. <br> and div styles but none of the html or atyles are showing up on the category page, just straight text. I viewed the source and relized that it is only using the .listingDescription style and not allowing any other styles that I insert into the html to be used. Yes, i can contol the style of the text by using just that one style but my text requires two different styles and it requires a couple <br>. here is what the code looks like:
Code:
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="cat33_34Table" class="tabTable">
<tr >
<th class="centerBoxContentsProducts centeredContent back" style="width:32.5%;" scope="col" id="listCell0-0"><a href="<A href="http://63.134.211.132/catalog2/index.php?main_page=product_info&cPath=33_34&products_id=10"><img">http://63.134.211.132/catalog2/index.php?main_page=product_info&cPath=33_34&products_id=10"><img src="images/knives/CH10310FS.jpg" alt="CH10310FS" title=" CH10310FS " width="240" height="180" class="listingProductImage" /></a><br /><h3 class="itemTitle"><a href="<A href="http://63.134.211.132/catalog2/index.php?main_page=product_info&cPath=33_34&products_id=10">CH10310FS</a></h3><div">http://63.134.211.132/catalog2/index.php?main_page=product_info&cPath=33_34&products_id=10">CH10310FS</a></h3><div class="listingDescription">OUTFEED VIEW Length - 4.13" Depth of Cut - 1.11"</div></th>
<th class="centerBoxContentsProducts centeredContent back" style="width:32.5%;" scope="col" id="listCell0-1"><a href="<A href="http://63.134.211.132/catalog2/index.php?main_page=product_info&cPath=33_34&products_id=9"><img">http://63.134.211.132/catalog2/index.php?main_page=product_info&cPath=33_34&products_id=9"><img src="images/knives/CH10310L.jpg" alt="CH10310L" title=" CH10310L " width="240" height="180" class="listingProductImage" /></a><br /><h3 class="itemTitle"><a href="div class="listingDescription">OUTFEED VIEW Length - 1" Depth of Cut - 0.24"</div></th>
<th class="centerBoxContentsProducts centeredContent back" style="width:32.5%;" scope="col" id="listCell0-2"><a href="<A href="http://63.134.211.132/catalog2/index.php?main_page=product_info&cPath=33_34&products_id=8"><img">http://63.134.211.132/catalog2/index.php?main_page=product_info&cPath=33_34&products_id=8"><img src="images/knives/CH10310T.jpg" alt="CH10310T" title=" CH10310T " width="240" height="180" class="listingProductImage" /></a><br /><h3 class="itemTitle"><a href="><div class="listingDescription">OUTFEED VIEW Length - 3.13" Depth of Cut - 0.87"</div></th>
</tr>
</table>
As you can see, I have highlighted the last two for an example. However, on the product info page, it does read the html and it does display it correctly. This leads me to believe that the column_layout_grid contibution is the root of the problem. Any ideas???:huh: Anybody???:unsure:
Thanks,
Slabadoo
Re: listingDescription & column_layout_grid
Zen Cart by default strips HTML from the short description in the product listing page. This is at least partly for safety, since truncating the description could mangle some HTML code. With that in mind, if you want HTML in the listing, edit /includes/modules/your_template/product_listing.php to comment out zen_clean_html in two places around lines 98 & 100:
PHP Code:
case 'PRODUCT_LIST_NAME':
$lc_align = '';
if (isset($_GET['manufacturers_id'])) {
$lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(/*zen_clean_html*/(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>' ;
} else {
$lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), ($_GET['cPath'] > 0 ? 'cPath=' . $_GET['cPath'] . '&' : '') . 'products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(/*zen_clean_html*/(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
}
break;
Re: listingDescription & column_layout_grid
Thanks gjh42,
this worked like a charm..... :thumbsup:
Slabadoo
Re: listingDescription & column_layout_grid
AWESOME!!!! this has just solved my probelms with java script not working correctly in the product description.
Re: listingDescription & column_layout_grid
hhhmmmm ok.. it's reverted back to how it was. Oh the headache still continues.
I have a word link and when you hover the mouse over it, it brings up a image, but the image is mostly off the screen when viewing it in FF & IE. but frontpage and the 'preview description' shows the product description perfectly.
Any ideas??
Cheers
Grant.
Re: listingDescription & column_layout_grid
Not without seeing it live...
Never use Frontpage to edit Zen Cart files - it will add extraneous code and mess things up. Use a good file editor like Notepad++.