Results 1 to 5 of 5
  1. #1

    Default Matching product_info_display and product_listing

    product_info_display.php displays a nice version of the productDescription

    product_listing truncates it and deformats it for displaying many items.

    I would like for my product listing to achieve the formatting that is available on the product info page.

    I have been working with tpl_product_info_display.php and product_listing.php to try and copy code from one to the other so that description in product listing will look like the description in product info.

    Any help here?

    Is this too vague?

    Here is a link to listing
    Here is a link to info display

    Please do excuse the look of these pages as they are in there beginning stages of development.

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Matching product_info_display and product_listing

    This is pretty straightforward to do, and is described in other threads.

    Edit /includes/modules/your_template/product_listing.php and comment out zen_clean_html in two places as shown here:
    PHP Code:
            case 'PRODUCT_LIST_NAME':
            
    $lc_class 'pLName';
            
    $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 gjh42 4/29/06*/(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'] > 'cPath=' $_GET['cPath'] . '&' '') . 'products_id=' $listing->fields['products_id']) . '">' $listing->fields['products_name'] . '</a></h3><div class="listingDescription">' zen_trunc_string(/*zen_clean_html gjh42 4/29/06*/(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION) . '</div>';
            }
            break; 
    In admin > Configuration > Product Listing, set
    Display Product Description
    to a larger number than you are ever likely to use, like 2000

  3. #3

    Default Re: Matching product_info_display and product_listing

    Thanks, this works very nicely for my quilting classes category, it even retains the exact font formatting because it is from a custom loaded template different from the rest of the site. I am not sure why this happens here, but it is exactly what I wanted! Now I can play around with the look of the text.

    The other categories product listing do not retain the font formatting itself, but still look much better.

  4. #4
    Join Date
    Dec 2006
    Posts
    79
    Plugin Contributions
    0

    Default Re: Matching product_info_display and product_listing

    Hi Glenn....i tried your suggestions as per my other thread....http://www.zen-cart.com/forum/showthread.php?t=83422

    It didnt make any difference and I am wondering if perhaps it might have something to do with a class from the CSS??? what are your thoughts?

    Do you know where i can find a similar file where it would workout the formatting for the specials as they display on the main page?

    Cheers,
    Neil

  5. #5
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Matching product_info_display and product_listing

    Did you do the zen_clean_html bit? I see no sign of that in your output. That would not depend on CSS.

    If you mean by your second question "What file do I edit to get the same layout as Specials", that will happen for the description text when you comment out zen_clean_html as described. For other changes, post specific desires and we can probably help you.
    Some changes may not be possible using standard methods because TM makes templates in strange ways that often cannot be fixed without seeing several of your PHP files in person.

 

 

Similar Threads

  1. my header and footer colors are not matching?
    By mubasher in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 21 Jan 2011, 09:16 PM
  2. Zen Cart and USPS.com not matching
    By unclemantis in forum Built-in Shipping and Payment Modules
    Replies: 4
    Last Post: 20 May 2009, 02:36 PM
  3. Splitting product_listing array and wrapping containers around
    By karl19 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 12 Mar 2009, 02:47 PM
  4. matching left and right sidebox styles
    By Moff in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 9 Oct 2007, 05:24 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR