Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2007
    Location
    Huntington, Indiana
    Posts
    66
    Plugin Contributions
    0

    Idea or Suggestion Search results direct to product detail page

    Is there any way to have a search result to directly to the detail product information page?

    If I enter a specific part number (or ask a customer to do so), it first goes to the search results page, shows just the one item, and the user has to click again for the detail page.

    It would be slick if the search results would go direct to the detail page when just one result is found in the search.

    Possible?

    Thanks,

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,696
    Plugin Contributions
    6

    Default Re: Search results direct to product detail page

    You could edit the file:
    /includes/modules/pages/advanced_search_results/header_php.php

    and add the code in RED so when ever there is only 1 Product found it goes to the product_info page ...
    Code:
    $breadcrumb->add(NAVBAR_TITLE_2);
    
    // bof: if only 1 search result skip listing and go to product_info
    $chk_count = $db->Execute($listing_sql);
    if ($chk_count->RecordCount() == 1) {
        zen_redirect(zen_href_link(zen_get_info_page($chk_count->fields['products_id']), 'cPath=' . zen_get_generated_category_path_rev($chk_count->fields['master_categories_id']) . '&products_id=' . $chk_count->fields['products_id']));
    }
    // eof: if only 1 search result skip listing and go to product_info
    
    $result = new splitPageResults($listing_sql, MAX_DISPLAY_PRODUCTS_LISTING, 'p.products_id', 'page');
    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: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  3. #3
    Join Date
    Nov 2007
    Location
    Huntington, Indiana
    Posts
    66
    Plugin Contributions
    0

    Default Re: Search results direct to product detail page

    Great piece of code... Way above my coding ability, so thank you!

    As for the other post, that was a different topic so I created a different thread. That was looking for a way to enter a list of items directly into the shopping cart without having to visit each product page first. Like a user entry box on the shopping cart page.

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    64,696
    Plugin Contributions
    6

    Default Re: Search results direct to product detail page

    Thanks for the update that this worked ... sorry for the mix up on your other post ...
    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: v1.5.1]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...

  5. #5
    Join Date
    Mar 2008
    Location
    Cape Town & London (depends on the season)
    Posts
    2,974
    Plugin Contributions
    0

    Default Re: Search results direct to product detail page

    Some years ago we developed a ZC site for a supplier of teaching aids. Each year, he would send detailed printed product catalogs to schools, listing the Products, and (naturally) the Product Code.

    We found and installed THIS module.

    One drawback is that it does not handle products with attributes, nor products with quantity discounts.

    Also... it hasn't been updated for some time.

    You may consider installing it on a TEST site, and see if it works for you.

  6. #6
    Join Date
    Nov 2007
    Location
    Huntington, Indiana
    Posts
    66
    Plugin Contributions
    0

    Default Re: Search results direct to product detail page

    Thank you for the link. That sounds like what I was looking for. We don't use attributes but do use qty discounts, so we will look at that and run some tests.

    Thanks again!

  7. #7
    Join Date
    Nov 2007
    Location
    Huntington, Indiana
    Posts
    66
    Plugin Contributions
    0

    Default Re: Search results direct to product detail page

    fairestcape:

    Thanks again for the referral to the Quick Order module. It seemed to work fine with our quantity discounts.

    I did make one code change to allow users (and us) to enter the product_id instead of the product_model which, in our case, is much simpler.

 

 

Similar Threads

  1. Search results for model to bring up product page?
    By oregongardener in forum General Questions
    Replies: 0
    Last Post: 3 Dec 2011, 08:44 PM
  2. Replies: 0
    Last Post: 19 Jun 2011, 09:03 PM
  3. css changes on search results page
    By weirdorecords in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 7 Mar 2011, 01:56 AM
  4. search results page
    By stalb33 in forum General Questions
    Replies: 0
    Last Post: 26 Nov 2008, 12:48 AM
  5. Replies: 8
    Last Post: 5 Dec 2006, 10:52 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
  •