Results 1 to 10 of 10

Hybrid View

  1. #1
    Join Date
    Sep 2005
    Posts
    24
    Plugin Contributions
    0

    Default Bypass Product Listing?

    Hello, I searched for this and couldn't find anything on it, apologies if it's already been answered.

    What I want to do is bypass product listing all together. So, for example, I click on a category, then pick a subcategory, and instead of getting a listing of all the products I just want it to go straight to the first product so I can scroll through with the next button. This would be similar as it would do if there was just one product in the category.

    I know this is a weird way to do things, but it's not my call, it's the clients. -sigh-


    So if anyone has any ideas, or could point me in the right direction it would be appreciated.

    Thank you!

  2. #2
    Join Date
    Jun 2003
    Posts
    33,715
    Plugin Contributions
    0

    Default Re: Bypass Product Listing?

    What is going to determine what the first product seen is?

    As a consumer I would not stick around very long if I had to click through all of the products to find what I want. Might want to educate the client on usability ...

  3. #3
    Join Date
    Sep 2005
    Posts
    24
    Plugin Contributions
    0

    Default Re: Bypass Product Listing?

    Quote Originally Posted by Kim
    What is going to determine what the first product seen is?

    As a consumer I would not stick around very long if I had to click through all of the products to find what I want. Might want to educate the client on usability ...
    I'm aware of the poor navigation of this, but I'm not the one making the decisions. Believe me, I argued a lot about it.


    Basically it would just go straight to the first product in the listing.

  4. #4
    Join Date
    Jan 2004
    Posts
    66,378
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Bypass Product Listing?

    Echoing Kim's sentiments ... I don't recommend it, but you could adapt the code as follows:

    /includes/modules/pages/index/header_php.php
    around line 54:
    Code:
    // if only one product in this category, go directly to the product page, instead of displaying a link to just one item:
    // if filter_id exists the 1 product redirect is ignored
    if (SKIP_SINGLE_PRODUCT_CATEGORIES=='True' and (!isset($_GET['filter_id']) and !isset($_GET['alpha_filter']))) {
      if ($listing->RecordCount() == 1) {
        zen_redirect(zen_href_link(zen_get_info_page($listing->fields['products_id']), ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing->fields['products_id']));
      }
    }
    change that as follows:
    Code:
    // if only one product in this category, go directly to the product page, instead of displaying a link to just one item:
    // if filter_id exists the 1 product redirect is ignored
    if (SKIP_SINGLE_PRODUCT_CATEGORIES=='True' and (!isset($_GET['filter_id']) and !isset($_GET['alpha_filter']))) {
    //  if ($listing->RecordCount() == 1) {
        zen_redirect(zen_href_link(zen_get_info_page($listing->fields['products_id']), ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing->fields['products_id']));
    //  }
    }
    .

    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 2005
    Posts
    24
    Plugin Contributions
    0

    Default Re: Bypass Product Listing?

    That's great! Thank you!

    Is there a way to make it so that it will still show the category page? All the products are going into subcategories, and now it's saying that there are no products to display on the straight category pages.

    You can see here: ***edited***

    If you try to click just the main Butterfly category, it's not letting me get to anything. I'm guessing maybe some kind of if/then, like.. If there are no products, then display the page, else display the first product?

    Sorry, my knowledge of php is limited. This help is VERY appreciated!
    Last edited by Kim; 3 Feb 2007 at 12:19 AM.

  6. #6
    Join Date
    Jan 2004
    Posts
    66,378
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Bypass Product Listing?

    Use:
    Code:
    // if only one product in this category, go directly to the product page, instead of displaying a link to just one item:
    // if filter_id exists the 1 product redirect is ignored
    if (SKIP_SINGLE_PRODUCT_CATEGORIES=='True' and (!isset($_GET['filter_id']) and !isset($_GET['alpha_filter']))) {
      if ($listing->RecordCount() >= 1) {
        zen_redirect(zen_href_link(zen_get_info_page($listing->fields['products_id']), ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $listing->fields['products_id']));
      }
    }
    .

    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.

 

 

Similar Threads

  1. Attribute Link to bypass product display?
    By moesoap in forum Customization from the Admin
    Replies: 5
    Last Post: 23 Aug 2012, 11:50 AM
  2. Is there a way to bypass Product Preview Screen?
    By pinkchalkstudio in forum Setting Up Categories, Products, Attributes
    Replies: 5
    Last Post: 26 Oct 2010, 10:48 AM
  3. Change Category Product Listing Layout To Match All Product Listing
    By Alfonzo in forum Templates, Stylesheets, Page Layout
    Replies: 4
    Last Post: 21 Sep 2010, 11:49 AM
  4. how to add freeshipping listing as new product listing and special listing
    By zeme_09g in forum Built-in Shipping and Payment Modules
    Replies: 0
    Last Post: 15 Apr 2010, 10:35 AM
  5. bypass main product listing screen
    By two7s_clash in forum Setting Up Categories, Products, Attributes
    Replies: 3
    Last Post: 24 Jun 2007, 07:37 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