Results 1 to 5 of 5
  1. #1
    Join Date
    Sep 2007
    Posts
    19
    Plugin Contributions
    0

    Default Keep formatting from Product info on category list

    How might I be able to keep my formatting from the product information page in my listings of the products? I can provide examples if I am not being clear.

  2. #2
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Keep formatting from Product info on category list

    From the "Similar Threads" section below: http://www.zen-cart.com/forum/showthread.php?t=34642
    .

    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.

  3. #3
    Join Date
    Sep 2007
    Posts
    19
    Plugin Contributions
    0

    Default Re: Keep formatting from Product info on category list

    The /includes/modules/<your_template>/product_listing.php file "cleans" html from the description. You can put it back by commenting out this bit (two places on adjacent lines) like this:

    zen_trunc_string(/*zen_clean_html*/(stripslashes(zen_get_products_description(...
    I do not have a /includes/modules/my template folder. Is there a common file for this? I checked the product_listing.php in /includes/modules but that did not have the code in there. Not sure why my template didnt have a folder in here.

    I'll do some hacking to see what I can find in the code.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,443
    Plugin Contributions
    279

    Default Re: Keep formatting from Product info on category list

    1. The "my template" folder would be the extra folder YOU created to match your template name, to differentiate files you've customized vs original core code
    Since you don't have such a folder, you have two options: (1) create it and put your edited version of the product_listing.php file in there, or (2) edit the product_listing.php file directly and deal with conflicts when you upgrade.

    2. Regardless, the zen_clean_html() call is what you're looking for. You could use the developers toolkit to find all instances where it's used and then pick the relevant file in which to make your edits.
    https://www.zen-cart.com/tutorials/index.php?article=38
    https://www.zen-cart.com/tutorials/index.php?article=39
    .

    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.

  5. #5
    Join Date
    Sep 2007
    Posts
    19
    Plugin Contributions
    0

    Default Re: Keep formatting from Product info on category list

    Ok figured that out for the most part. Now it's still truncating the description. I've taken out the zen_trunc_string part and now my string is like this:

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

    or with the comments taken out: stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))

    However it's still truncating the product description.

 

 

Similar Threads

  1. Excluding a product or category from best selling list
    By Moncia in forum Basic Configuration
    Replies: 33
    Last Post: 14 Nov 2010, 04:06 AM
  2. Replies: 0
    Last Post: 5 Aug 2010, 07:19 AM
  3. remove View or change my product notification list from account info page
    By Sushigal in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 19 May 2010, 04:54 PM
  4. Remove category title from Product Info
    By jordana in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 16 Dec 2008, 11:16 PM

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