You are here:  » How to create sidebar navigation


How to create sidebar navigation

Submitted by aleks on Thu, 2010-10-07 05:12 in

Hi David,

I am new to the forum and price tapestry. I purchased price tapestry two weeks ago and I created two basic websites. I want to create sidebar navigation menu to include:

price:
0-100
100-200
200-500

brand:
X
Y
Z

style:
M
N
C

something like when you click on price to show you brands and styles available for this price or when you click on brand to show you prices and styles available for this brand.

something like this person achieved here: {link saved}

I was reading trough the forum for two weeks but I couldn't find any treads.

What the best way to achieve this?

Possible?

Any help would be appreciated.

Thanks
Aleks

Submitted by support on Thu, 2010-10-07 08:58

Hi Aleks,

Welcome to the forum!

I'll email you the sidebar filters modification from this thread modified to use a list instead of a drop-down; and to include product count - there shouldn't be any performance issues for a niche site...

Cheers,
David.
--
PriceTapestry.com

Submitted by aleks on Thu, 2010-10-07 19:38

Hi David,

I've received your email. Thank very much. I have two more questions. When I select say price 200-300 it shows me all brands(count in brackets) between this prices that's good, but then when I click on brand x it shows me all prices for brand x. How can I apply additional filters to show price 200-300 for brand x only not all brands or brand x and price 300-400 only and count in brackets to reflect available prices/brands for selected price/brand.
and one more question how can I add additional filter type: so my sidebar navigation have 3 filters brand: type: price:

Thanks
Aleks

Submitted by support on Fri, 2010-10-08 08:16

Hi Aleks,

To make the filters take into account already applied filters - for example so that when a price range is selected only brands applicable to that price range are shown - in the modified html/searchresults.php that I sent to you search for each instance of:

WHERE ".$where

...and REPLACE with:

WHERE ".$where.$priceWhere;

($priceWhere incorporates any filters that have been applied as well as min/max price)

To add a new filter for another field, use the brand section as a guide (lines 53-78), and simply copy the whole section replacing "brand" with "type" (or maybe category if you haven't added a new field to your site for type. Support for categoryFilter on the URL is already included in the search.php that I sent to you yesterday.

If you're not sure of any changes of course, reply to my email with any files that you want me to look at and I'll check it out for you...

Cheers,
David.
--
PriceTapestry.com

Submitted by Leo on Fri, 2010-10-08 08:27

Hi David,

Could you maybe send me the sidebar filters modification to?
I use latest distribution.
I am bussy with same kind of idea.

Leo

Submitted by support on Fri, 2010-10-08 08:34

Hi Leo,

Sure - on the way...

Cheers,
David.
--
PriceTapestry.com

Submitted by Dilson on Fri, 2010-10-08 10:15

Hi David,

Could you send me that mod too ?

Thank you ! :)

Submitted by support on Fri, 2010-10-08 10:24

No probs!

Seems popular, so I'll look at including the filter code in the new distribution!

Cheers,
David.
--
PriceTapestry.com

Submitted by redmosquito on Fri, 2011-01-28 11:53

Hi

Would you mind sending me a copy of that as well please. And any info you have about creating a side bar would be great thank you.

JD

Submitted by support on Fri, 2011-01-28 12:19

Hi JD,

I've added the file (SidebarFilters.zip) to the new Download Extras page...

If you're interested in creating a generic sidebar within your template so that you can add your own content to be displayed on every page to the left (and / or right), there are details in this post. Code for a 3 column layout (left and right sidebars) is a couple of replies further down....

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by pieter on Sun, 2012-07-08 13:30

Hi David,

I would like to receive the mod as well! (list instead of dropdowns).

Thank you,

Pieter.

Submitted by support on Sun, 2012-07-08 15:45

Hello Pieter,

I've added the list version of the Sidebar Filters mod to the goodies download page (SidebarFiltersList.zip).

There are 2 controls over the output in html/searchresults.php at lines 58-60:

  $showCounts = FALSE;
  $maxItems = 0;

To enable the number of results that would be filtered by each option $showCounts can be set to TRUE (only recommended for niche sites as a separate database query for every filter option is required); and for very large sites where the filter options can be overwhelming the number of options per filter can be limited by setting $maxItems to a positive value.

Cheers,
David.
--
PriceTapestry.com

Submitted by Gobbo on Sat, 2012-09-08 16:22

Hi David,

How can I show:-

By price:
0-100
100-200
200-500

By merchant:
1
2
3

By brand:
X
Y
Z

style:
M
N
C

As at the moment it is:-

brand:
X
Y
Z

style:
M
N
C

price:
0-100
100-200
200-500

As I want the price to be always on top.

Also is it possible to only show the top 10 listings in each category with a .... or 'Click here for more'?

Kind Regards,
Gobbo

Submitted by support on Mon, 2012-09-10 08:49

Hi Gobbo,

It should just be a case of moving the price section although I'm not sure if you're already using a range modification; or currently just have the min/max price text box. Either way, if you would like to email me your latest html/searchresults.php I'll move the sections around, add the limit to 10 items for each filter for you...

Cheers,
David.
--
PriceTapestry.com

Submitted by martinn2009 on Sun, 2012-12-02 17:55

Hi David,

I like using SidebarFiltersList.zip,...but the main problem is,
when a visitor typing value : a
It will appear a rest of categories list. could be more than 50 list (depend on category that content a)
meanwhile change $maxItems = 0; into $maxItems = 10;. it would be show only 10 list.
Is there any simple way to show only 10 list to appear and show more click for the rest (something like open/hide)

{link saved}

Best Regards,
Martin

Submitted by support on Mon, 2012-12-03 09:29

Hi Martin,

Sure - It's straight forward to do with a little JavaScript/DHTML - i'll email you a version to try now...

Cheers,
David.
--
PriceTapestry.com

Submitted by martinn2009 on Mon, 2012-12-03 17:05

Wow, Many thanks David.

Regards,
Martin

Submitted by Bakalinge on Wed, 2014-02-05 15:27

Hi David,

I have th same problem as Martin with SideBarsFilters : I can have sometimes more than 200 options in dropdown lists. Would it be possible to dynamically populate dropdown fields ? After user make his choice on 1st dropdown then 2nd dropdown will display the options that are available and so on with others dropdown...

Thank you

Bak

Submitted by support on Wed, 2014-02-05 16:06

Hello Bak,

I know you've been using the script for a long time so if you could email me your current file containing the filters i'll use that to test a dynamic update mod, but in the first instance I'll update the selection SQL to order by result count and limit the number returned.

If you could also let me know whether your site currently includes jQuery as its AJAX functions are very easy to use (if not, it's simple to include anyway!)

Cheers,
David.
--
PriceTapestry.com