Forums / Templates, Stylesheets, Page Layout / Display Custom Product Description

Display Custom Product Description

Views: 4,837

Results 1 to 9 of 9
30 Oct 2006, 6:57 PM
#1
bgroup99 avatar

bgroup99

Zen Follower

Join Date:
Aug 2006
Posts:
197
Plugin Contributions:
0

Display Custom Product Description

I am aware that you can turn the display product description to 0 in Admin:Configuration to remove the product description under product titles whhen browsing by categories.

Example:
http://shop.thebricktongroup.com/index.php?main_page=index&cPath=3

I would like to put something there however. I don't want to use my long description because some items have dropdown menus at the begining for model/color selection at the beginning of product description pages. Is there anyway to insert a separate description i.e. a "short" description for each product that only shows when browsing by category? Any advice is much appreciated!

Thanks.:smile:

6 Nov 2006, 12:59 PM
#2
jonequest avatar

jonequest

New Zenner

Join Date:
Nov 2006
Posts:
6
Plugin Contributions:
0

Re: Display Custom Product Description

Hi, I'm new on Zencart, would you please let me know how did you add a link on your product list so it displays product description in another page?

6 Nov 2006, 4:57 PM
#3
bgroup99 avatar

bgroup99

Zen Follower

Join Date:
Aug 2006
Posts:
197
Plugin Contributions:
0

Re: Display Custom Product Description

Anyone? ::Bump::

6 Nov 2006, 5:34 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,685
Plugin Contributions:
0

Re: Display Custom Product Description

More details?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

7 Nov 2006, 9:50 PM
#5
bgroup99 avatar

bgroup99

Zen Follower

Join Date:
Aug 2006
Posts:
197
Plugin Contributions:
0

Re: Display Custom Product Description

Basically when someone is looking at all of the products in a category
or subcategory, we want a small custom description to appear next to
each product (a different description than may be found once the
person clicks on a specific product...)

I know I can turn descriptions completely off, but I was hoping to display something other than the first so many characters of the product info.

any ideas are greatly appreciated

23 Feb 2009, 1:10 PM
#6
hetalsagar avatar

hetalsagar

New Zenner

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

Re: Display Custom Product Description

hi can u guide me how to uninstall product listing column_layout_grid_v_1_3_8 module.

https://www.sizzlingshop.com
hetalsagar

10 Dec 2010, 9:38 AM
#7
jeniferous avatar

jeniferous

New Zenner

Join Date:
Oct 2010
Posts:
46
Plugin Contributions:
0

Re: Display Custom Product Description

Has anyone found a way to do this since 09? I want to do the same. On my site I wanted thje user to be able to see size and colour variants on the product listing but didnt want them to be as a drop down attribute fields. Therefore i enabled HTML within the product description and put swatches of the colour and the sizes in the top of the description.

The thing is that now i'm getting more and more products i can't fit many per page as theres loads of text. In an ideal world i would just show the swatches at the top and the size text. I know i can limit the amount of text which shows on the product listing, but there will be a different amount for each product, and it ruins the grid layout i've got installed if i amend the listing length.

If i could have two different descriptions it would solve my problem!

Example page is http://www.jambaroo.co.uk/babies/accessories

Thanks!

12 Feb 2011, 4:49 PM
#9
bobmoss avatar

bobmoss

New Zenner

Join Date:
Dec 2010
Posts:
20
Plugin Contributions:
0

Re: Display Custom Product Description

In case anyone wants to do this, I've come up with some simple custom code to allow the display of a short descriptions.

Basically, enter your description as normal with a <br /> where you want to short description to end.

So for example, enter your full description as:

"Tasty Strawberry Jam<br />This is the best Strawberry jam you will have ever tasted."

The code below will look for the <br /> tag and only display "Tasty Strawberry Jam" as the description on the product listing page. If you don't put in a <br /> tag then the description will display as normal.

You need to edit your overridden product_listing.php file (found in includes\modules\YOURTEMPLATE) , and find the line:

$lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id'] > 0) ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_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>';

And replace it with this code:

        $shortDesc = zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']);
        // Now find the first occurance of <br /> - We actually look for <br in case we have forgotten the space
        $brPos = stripos($shortDesc, '<br');
        // If no <br /> tag then just show whole description as normal.
        if ($brPos != 0)
        {
             $shortDesc = substr($shortDesc, 0, $brPos );
        }
        $lc_text = '<h3 class="itemTitle"><a href="' . zen_href_link(zen_get_info_page($listing->fields['products_id']), 'cPath=' . (($_GET['manufacturers_id'] > 0 and $_GET['filter_id'] > 0) ?  zen_get_generated_category_path_rev($_GET['filter_id']) : ($_GET['cPath'] > 0 ? zen_get_generated_category_path_rev($_GET['cPath']) : zen_get_generated_category_path_rev($listing->fields['master_categories_id']))) . '&products_id=' . $listing->fields['products_id']) . '">' . $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' . zen_trunc_string(zen_clean_html(stripslashes($shortDesc)), PRODUCT_LIST_DESCRIPTION) . '</div>';

You can of course change this to look for a different tag instead or even to not show the short description on the product detail page.

Hope this helps someone else.

Bob.