Forums / Templates, Stylesheets, Page Layout / want to specify break location in truncated list description

want to specify break location in truncated list description

Locked

Views: 1,102

Results 1 to 5 of 5
This thread is locked. New replies are disabled.
10 Mar 2009, 3:21 AM
#1
arthurc avatar

arthurc

New Zenner

Join Date:
Nov 2008
Posts:
3
Plugin Contributions:
0

want to specify break location in truncated list description

A lengthy product description is truncated in product lists. You can set the number of characters at which the description is truncated.

Is there something I can insert in the text, a pseudo tag, that will cause the description to break where I want it to, rather than always at 150 characters, or whatever?

In Drupal, this is what we use: <!--break-->.

Is there something like this in Zen Cart, or has someone else made up their own equivalent?

Thanks.

10 Mar 2009, 3:25 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: want to specify break location in truncated list description

In the upcoming v2.0, the "short description" field is used for that purpose ... you can actually specify the description to be used in the listing.

I believe there's a similar addon available in the Free Addons section that could be used in a like manner.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

2 Apr 2009, 12:34 AM
#3
eliko avatar

eliko

New Zenner

Join Date:
Mar 2009
Posts:
4
Plugin Contributions:
0

Re: want to specify break location in truncated list description

I have added a single new product to my new Zencart installation, and the entire description shows up (way too long), while test products that were already loaded in the database truncate the description. Have also tried to set the length of Product Description from 150 to 50 or less - but there's no impact. Any ideas? Thanks.

2 Apr 2009, 10:49 PM
#4
eliko avatar

eliko

New Zenner

Join Date:
Mar 2009
Posts:
4
Plugin Contributions:
0

Re: want to specify break location in truncated list description

OK - figured out the issue. It appears that if you have only a single product in a category, the full description will be displayed (without truncation, which makes sense). As soon as I added a second product to the category, the descriptions for both products were truncated.

2 Apr 2009, 11:27 PM
#5
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: want to specify break location in truncated list description

eliko:

OK - figured out the issue. It appears that if you have only a single product in a category, the full description will be displayed (without truncation, which makes sense). As soon as I added a second product to the category, the descriptions for both products were truncated.

That's because if there's only 1 product in a category, the default behavior is to actually open that product's page directly. Thus, there's no reason to truncate, because it's skipping the product-listing page and going directly to the product itself.
If you wish to avoid that, go to Admin->Configuration->Layout->Skip 1-product Categories and turn it off.

Skip 1-prod Categories
Skip single-product categories
If this option is set to True, then if the customer clicks on a link to a category which only contains a single item, then Zen Cart will take them directly to that product-page, rather than present them with another link to click in order to see the product.
Default: True

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.