Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Hybrid View

  1. #1
    Join Date
    Jul 2015
    Posts
    43
    Plugin Contributions
    0

    Default Geek wanting HTML in product description

    I've combed through too many posts to count, and each one is either for old versions of Zen Cart or requires plug-ins...

    I want to enter raw HTML into product descriptions and have it show up on the product page. I don't want WYSIWYG, since I don't want more plug-ins to manage and troubleshoot.

    I'm looking for where Zen Cart 1.5.4 strips HTML tags...K.I.S.S.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Geek wanting HTML in product description

    Try looking in \includes\modules\product_listing.php
    About line 186
    Make any alterations in a copy for your template
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jul 2015
    Posts
    43
    Plugin Contributions
    0

    Default Re: Geek wanting HTML in product description

    Quote Originally Posted by kobra View Post
    Try looking in \includes\modules\product_listing.php
    About line 186
    Make any alterations in a copy for your template
    I saw a recommendation in a previous post, which appears to be where you're pointing and tried it to no avail...

    Any references to product_description are on line 97
    Code:
     
    $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>';
    or lines 175 to 187, which are all commented out.

    Line 97
    Code:
     
    zen_trunc_string(zen_clean_html(stripslashes(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']))), PRODUCT_LIST_DESCRIPTION)
    changed to

    Code:
     
    zen_trunc_string(zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']), PRODUCT_LIST_DESCRIPTION)
    -to permit the truncating descriptions that are too long

    or

    Code:
     
    zen_get_products_description($listing->fields['products_id'], $_SESSION['languages_id']
    -to ignore truncating and leave it up to us to control the length of our descriptions manually

  4. #4
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Geek wanting HTML in product description

    Do you know who and why they were commented out?
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jul 2015
    Posts
    43
    Plugin Contributions
    0

    Default Re: Geek wanting HTML in product description

    No I don't...
    Zen Cart 1.5.4
    Products with attributes stock
    CEON URI mapping
    alien stemware template

    All installed < 2 weeks ago

    ...of course, this is one of 40 active updates on my bullet list since this is a new site and the owner wants it up yesterday...

  6. #6
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Geek wanting HTML in product description

    Were you looking at a ZenCart core file?
    Or a copy of it in your template override folder?
    Zen-Venom Get Bitten

  7. #7
    Join Date
    Jul 2015
    Posts
    43
    Plugin Contributions
    0

    Default Re: Geek wanting HTML in product description

    Core file. product_listing.php isn't in the template directory tree.

  8. #8
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Geek wanting HTML in product description

    Core file. product_listing.php isn't in the template directory tree
    Suggest that you create a folder named for your template under "modules"
    This is allowed because out of the box there exists a "classic" folder under "modules"

    Reload a clean copy of the file back to /modules
    Check the 3rd party addons you have installed for this file - maybe one of them overwrote the original
    If so, compare the dates at the top of the file or better yet, use a file comparison program and compare it to an original

    Make a copy of the original file and upload it to the created template folder
    Make your edits to this file
    Zen-Venom Get Bitten

  9. #9
    Join Date
    Jul 2015
    Posts
    43
    Plugin Contributions
    0

    Default Re: Geek wanting HTML in product description

    Quote Originally Posted by kobra View Post
    Suggest that you create a folder named for your template under "modules"
    This is allowed because out of the box there exists a "classic" folder under "modules"

    Reload a clean copy of the file back to /modules
    Check the 3rd party addons you have installed for this file - maybe one of them overwrote the original
    If so, compare the dates at the top of the file or better yet, use a file comparison program and compare it to an original

    Make a copy of the original file and upload it to the created template folder
    Make your edits to this file
    product_listing.php only exists at /includes/modules/product_listing.php. I'm not able to copy from "classic" to my "current" template folder since it doesn't exist in the "classic" directory structure. It doesn't exist in the current (altered by template/mod installation) directory structure or that of the zen-cart-v1.5.4-12302014 ZIP file I used for the base install...

  10. #10
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Geek wanting HTML in product description

    and have it show up on the product page
    What page are you trying to get html to display
    a producting listing page or a product info page?
    A listing page will have the url similar to this
    Code:
    index.php?main_page=index&cPath=1
    A product info page will look similar to this
    Code:
    index.php?main_page=index&cPath=1_4
    Can you post a link??
    Zen-Venom Get Bitten

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. Product description HTML
    By yoppo in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 4 Aug 2009, 06:31 PM
  2. Product description in product more info in html format but not in product listing?
    By this side up in forum Customization from the Admin
    Replies: 1
    Last Post: 18 Dec 2006, 06:25 PM
  3. Wanting to link to HTML bookmarks in Page 2
    By mommydesigns in forum General Questions
    Replies: 2
    Last Post: 1 Oct 2006, 06:58 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