Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / listingDescription & column_layout_grid

listingDescription & column_layout_grid

Locked

Views: 4,187

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
29 Mar 2007, 2:48 PM
#1
slabadoo avatar

slabadoo

Zen Follower

Join Date:
Jan 2007
Posts:
149
Plugin Contributions:
1

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:

<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="[URL="http://63.134.211.132/catalog2/index.php?main_page=product_info&cPath=33_34&products_id=9"]div[/URL] 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="[URL="http://63.134.211.132/catalog2/index.php?main_page=product_info&cPath=33_34&products_id=8"]><div[/URL] 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

29 Mar 2007, 4:52 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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:

       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;
29 Mar 2007, 6:40 PM
#3
slabadoo avatar

slabadoo

Zen Follower

Join Date:
Jan 2007
Posts:
149
Plugin Contributions:
1

Re: listingDescription & column_layout_grid

**Thanks gjh42, **

this worked like a charm..... :thumbsup:

Slabadoo

4 Dec 2009, 10:53 AM
#4
rainyplace avatar

rainyplace

New Zenner

Join Date:
Nov 2009
Location:
QLD, Australia
Posts:
42
Plugin Contributions:
0

Re: listingDescription & column_layout_grid

AWESOME!!!! this has just solved my probelms with java script not working correctly in the product description.

4 Dec 2009, 11:20 AM
#5
rainyplace avatar

rainyplace

New Zenner

Join Date:
Nov 2009
Location:
QLD, Australia
Posts:
42
Plugin Contributions:
0

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.

4 Dec 2009, 12:45 PM
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

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++.