Results 1 to 10 of 10
  1. #1
    Join Date
    Dec 2010
    Posts
    31
    Plugin Contributions
    0

    Default Search Results show code

    When I do a basic search, the result grabs the css code, instead of the body with information. Any ideas

    www.dizzydeals.net search for "paint" for example

    JMH Painting Contractors 15%-20% Discount
    @media print { input#printButton { display: none; } } table.sample { border-width: 2px; border-spacing: 2px; border-style: dashed; border-color:...

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Search Results show code

    The HTML is stripped from the products_description ...

    In your case, that is leaving in half the code for your description and stripping out the the part needed to display it ...

    1 you need to set the description length to be longer than your longest products_description so that nothing is cut out ...

    2 you need to change how the products_description is managed so that it does not clean out the HTML if you want to display everything ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  3. #3
    Join Date
    Dec 2010
    Posts
    31
    Plugin Contributions
    0

    Default Re: Search Results show code

    How do you change the product description to just show the description and not the code?
    Last edited by UnSub; 21 Jan 2011 at 05:58 PM.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Search Results show code

    You can change the configuration settings for the Product Listing in the Configuration ... Product Listing ...
    0= OFF
    150= Suggested Length, or enter the maximum number of characters to display
    then using your templates and overrides you can change the module for the product_listing.php for the output of the products_description field to be as you need it ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  5. #5
    Join Date
    Dec 2010
    Posts
    31
    Plugin Contributions
    0

    Default Re: Search Results show code

    I really appreciate all the replies, but being new to this, can you please assist me any further? what part and how of the product description php file should i edit to have it only show the description without the code

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Search Results show code

    Around line 98 you should see:
    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>';
    Using your templates and overrides, you can change that line to something like:
    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>';
            $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_products_lookup($listing->fields['products_id'], 'products_description') . '</div>';
    the first line being the original code commented out and the second line displaying the full products_description ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  7. #7
    Join Date
    Dec 2010
    Posts
    31
    Plugin Contributions
    0

    Default Re: Search Results show code

    Works perfect for the search, now the only problem is when you look at it from the product listing stand point, it shows everything. I like when i showed a quick list of product then you clicked on that product for more details.
    Any ideas?
    Last edited by UnSub; 21 Jan 2011 at 07:46 PM.

  8. #8
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Search Results show code

    You would need to fix the code further where if the main_page is advanced_search_result then show it one way and if that isn't true, show it the other way ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

  9. #9
    Join Date
    Dec 2010
    Posts
    31
    Plugin Contributions
    0

    Default Re: Search Results show code

    Thank you, if anyone can offer the coding for that suggestion it would be greatly appreciated

  10. #10
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Search Results show code

    You can use an IF statement to test if the main_page is the advanced_search_result with:
    Code:
            case 'PRODUCT_LIST_NAME':
            $lc_align = '';
    if ($_GET['main_page'] == 'advanced_search_result') {
    // use full products_description
            $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_products_lookup($listing->fields['products_id'], 'products_description') . '</div>';
    } else {
    // use original cleaned products_description
            $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>';
    }
            break;
    Unfortunately, the problem you are going to have is you will still have the mess on the products_description in the navigation of your Categories ...

    You might try searching the forum or the Free Software Add Ons for:
    short description

    as I believe there is an add on that might help you to maintain two types ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. v150 Search Results show a completely blank page?
    By vmarty123 in forum General Questions
    Replies: 5
    Last Post: 9 Mar 2012, 06:52 PM
  2. Show custom product fields in search results?
    By DigitalShadow in forum General Questions
    Replies: 2
    Last Post: 24 Jul 2011, 01:06 AM
  3. Show Parent Category in Search Results
    By flymmt in forum General Questions
    Replies: 0
    Last Post: 28 Sep 2010, 07:58 PM
  4. Don't show documents in search results
    By MattC in forum General Questions
    Replies: 4
    Last Post: 5 Feb 2007, 05:42 AM
  5. Replies: 8
    Last Post: 5 Dec 2006, 10:52 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