Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2008
    Posts
    174
    Plugin Contributions
    0

    help question Any way to get product desc styles to show in index listing?

    Client wants complete product description to show in the full category listing page so customers don't "have to" click to product page for more info.

    Problem is, any paragraph breaks, styles (italics, bold) are lost and so it all runs together.

    Is there any trick to get the styles to stick from the individual product page to the product listing?

  2. #2
    Join Date
    Apr 2009
    Posts
    29
    Plugin Contributions
    0

    Default Re: Any way to get product desc styles to show in index listing?

    I'm so glad that perhaps I am able to help somebody! You need to find this code:

    $products_description = zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($featu red_products->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION);

    and comment out the zen_clean_html thus:

    $products_description = zen_trunc_string(/*zen_clean_html*/(stripslashes(zen_get_products_description($featured_products->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION);


    Beware of a few problems though: I have found that some html code may screw up the alignment on the page. Also, if the description is too long, it gets cut off in funny ways; the other way around is also a problem: if you only want the first say 80 words of the description on the front page but there is a longer description on the product page, you have to add either page or line breaks to force that text out of the main page. If you find another solution, please let me know! See http://www.zen-cart.com/forum/showthread.php?t=38313

  3. #3
    Join Date
    Feb 2008
    Posts
    174
    Plugin Contributions
    0

    Default Re: Any way to get product desc styles to show in index listing?

    I'm excited that you may be helping me with this, too ;)

    But which file am I looking for that in?

  4. #4
    Join Date
    Sep 2004
    Location
    Western Massachusetts
    Posts
    2,945
    Plugin Contributions
    5

    Default Re: Any way to get product desc styles to show in index listing?

    you need to edit an override copy of includes/modules/product_listing.php

    at about lines 98 and 100 you will see two long lines of code beginning with $lc_text = '<h3

    Near the end of each of those lines you will see this segment of code:
    PHP Code:
    zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION
    which displays a part of the product description, stripped of paragraph and break tags.
    To make if display the entire product description as you entered it for the product, replace that segment with
    PHP Code:
    zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']) 
    Neville
    An assumption is what you arrive at when you get tired of thinking...

  5. #5
    Join Date
    Feb 2005
    Location
    Lansing, Michigan USA
    Posts
    20,021
    Plugin Contributions
    3

    Default Re: Any way to get product desc styles to show in index listing?

    Depending on how long the complete description is, the Short Description mod might work, too.

  6. #6
    Join Date
    Feb 2008
    Posts
    174
    Plugin Contributions
    0

    Default Re: Any way to get product desc styles to show in index listing?

    I changed the file in includes/modules/classic
    and in templates/modules/MYTHEME

    Woops, sorry, ok it does work if I edit the straight includes/modules/product_listing.php
    But yea, it messes stuff up, so I gotta fix my html in product descriptions now ;)

    THANK YOU

 

 

Similar Threads

  1. Can't get Manufacturer to show up in Product Listing page
    By KismetDesign in forum General Questions
    Replies: 2
    Last Post: 6 Oct 2009, 08:25 PM
  2. The feature product listing in index page doesn't show correctly
    By Jimmyyu1998 in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 5 Mar 2008, 02:51 AM
  3. Replies: 3
    Last Post: 5 Jul 2007, 06:20 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg