Results 1 to 10 of 18

Hybrid View

  1. #1
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    Default Add prev/next buttons to navigate through CATEGORIES

    Hi.
    I have a project where I simply have one product per category, hence the categories skip direct to the product. I would like to add navigation buttons to the *product page* that would navigate to the next *category* therefore making it possible for customers to navigate as if the category had multiple products as would be the more normal case.
    The simple solution, of course would be to have one category with all the products in that category, but I want to avoid this ideally.
    tkd revision dot com

    Thank you

  2. #2
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    Default Re: Add prev/next buttons to navigate through CATEGORIES

    A polite bump please.

  3. #3
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Add prev/next buttons to navigate through CATEGORIES

    You need custom code that uses the current category id or cPath (available from the URL as $_GET['cPath']) to look up the previous and next categories (by sort orders? or ??), then populate buttons with those cPaths in the URL. How would you determine the prev/next order that should be followed? Will these all be top cats, or is there a hierarchy? Hopefully somebody will feel like writing out the actual code to do this.
    Last edited by gjh42; 17 Jun 2013 at 03:33 PM.

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Add prev/next buttons to navigate through CATEGORIES

    You need a SQL query to select * from the categories table, order by ??your criteria. Then you can find the location of the current category in the resulting array and step backward and forward in the array to get the desired destinations.

  5. #5
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    Default Re: Add prev/next buttons to navigate through CATEGORIES

    Quote Originally Posted by gjh42 View Post
    You need a SQL query to select * from the categories table, order by ??your criteria. Then you can find the location of the current category in the resulting array and step backward and forward in the array to get the desired destinations.
    Hmm, you lost me there lol.

  6. #6
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Add prev/next buttons to navigate through CATEGORIES

    Meta-code :) not real code, but describes the sequence of what it should do... You can help by clarifying the questions I posted on criteria.

  7. #7
    Join Date
    Dec 2010
    Location
    UK
    Posts
    1,771
    Plugin Contributions
    3

    Default Re: Add prev/next buttons to navigate through CATEGORIES

    Thank you Glenn.
    Yes hopefully indeed...anyone seen Lat9 today?

 

 

Similar Threads

  1. Prev/Next Buttons
    By Paul1981 in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 2 Apr 2011, 08:16 PM
  2. Product Page moving 'add to cart' and prev/next buttons
    By scouting82 in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 Feb 2009, 04:55 AM
  3. Prev and Next buttons ...
    By tcschmit in forum Templates, Stylesheets, Page Layout
    Replies: 7
    Last Post: 27 Apr 2007, 06:26 AM
  4. Prev/Next navigation through Subcats... possible?
    By Sybil in forum Setting Up Categories, Products, Attributes
    Replies: 6
    Last Post: 28 Oct 2006, 07:06 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