Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Using tables in my product description.

Using tables in my product description.

Views: 609

Results 1 to 5 of 5
2 Feb 2012, 3:18 PM
#1
4jdesigns avatar

4jdesigns

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Using tables in my product description.

Hi All.

Was wondering if someone could help get around this....

I have used a table to neater some info up on my products description, which looks fine when viewing the product, but when a category is called and lists all products and shows a portion of the description of each, it seems to show the cells in a straight lines, which makes no sense when reading it.

Here's an example:

The description on product page:

<table border="0" style="width: 400px;">
<tbody>
<tr>
<td style="font-weight: bold;">Dimensions(mm): <br />Wash Load: <br />Spin:<br />Variable Spin:<br />Half Load:<br />Colour:<br />Guarantee:<br />Anti-Crease:<br />Wool Wash:<br />Programmes:<br />
</td>
<td>H 850 x W 595 x D 600<br />6Kg<br />1400rpm<br />Yes<br />Yes<br />White<br />5 years parts & 1 year labour<br />Yes<br />Yes<br />16<br />
</td>
</tr>
</tbody>
</table>

The description on category page:

<p>Dimensions(mm): Wash Load: Spin: Variable Spin: Half Load: Colour: Guarantee: Anti-Crease: Wool Wash: Programmes: H 850 x W 595 x D 600 6Kg 1400rpm...</p>

I am most likely going about it all wrong, so any input would be much appreciated.
Thanks,
Jay

2 Feb 2012, 3:33 PM
#2
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Using tables in my product description.

As always, a link to the site would help, but Zencart strips HTML from product descriptions before displaying them (or a portion of them) in the product listings. The reason for this is that if your description is truncated in the middle of an HTML element, it may do strange things to the product listing.

2 Feb 2012, 3:39 PM
#3
gjh42 avatar

gjh42

Black Belt

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

Re: Using tables in my product description.

It is possible to change this, but if you do so you must also set the description length (in Configuration > Product Listing) to something longer than you will ever use, so that all of it is shown in the listing and no HTML tags are lost.

Search the forum for zen_trunc_string to find the threads where this is described.

2 Feb 2012, 4:31 PM
#4
4jdesigns avatar

4jdesigns

Zen Follower

Join Date:
Jul 2011
Posts:
106
Plugin Contributions:
0

Re: Using tables in my product description.

Thanks for the feedback, I tried increasing the value to 10000 which is way above what I have, but still it remains the same.

The choices I have made (which may help someone else) is either switch it off (value=0) or put in a value of say 30 and put a short line of description in.

Thanks for the input, always helpful.

Jay.

2 Feb 2012, 4:35 PM
#5
gjh42 avatar

gjh42

Black Belt

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

Re: Using tables in my product description.

The table formatting will not appear in the listing unless you make the code change I mentioned above. Just increasing the displayed length will do nothing by itself except show more words.