Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
Thread Tools Search this Thread Display Modes
Old June 20th, 2013, 01:51 AM
stylifyfashion stylifyfashion is offline
Join Date: Jun 2013
Posts: 10
Exclamation Drop Down Filters Don't Work

Store ID: 289071

Hi Eric

I have created a fashion store. The store has a large number of brands,prices and merchants and colours. To save room I have created three dropdown form filters. One for PRICE ('price'), one for COLOUR ('word") and one for BRAND ('brand').

The filters work fine individually, however once you select for example the price filter, then select the colour filter, the colour filter cancels out the previous filter. Hence I can only ever have one filter. It is possible to have three filters operational (just like the html side widget text filters). Refer to screencast.

Thanks in advance.

<form method="get">

<select name="price" onchange='this.form.submit()'>

<option value=""<?php if (@$_GET['']=='') {echo ' selected="selected"';}?>>FILTER BY PRICE</option>
<option value="-10"<?php if (@$_GET['price']=='-10') {echo ' selected="selected"';}?>>Less than $10</option>
<option value="10-25"<?php if (@$_GET['price']=='10-25') {echo ' selected="selected"';}?>>$10 - $25</option>
<option value="25-50"<?php if (@$_GET['price']=='25-50') {echo ' selected="selected"';}?>>$25 - $50</option>
<option value="50-100"<?php if (@$_GET['price']=='50-100') {echo ' selected="selected"';}?>>$50 - $100</option>
<option value="100-150"<?php if (@$_GET['price']=='100-150') {echo ' selected="selected"';}?>>$100 - $150</option>
<option value="150-250"<?php if (@$_GET['price']=='150-250') {echo ' selected="selected"';}?>>$150 - $250</option>
<option value="250-500"<?php if (@$_GET['price']=='250-500') {echo ' selected="selected"';}?>>$250 - $500</option>
<option value="500-"<?php if (@$_GET['price']=='500-') {echo ' selected="selected"';}?>>More than $500</option>
<?php if (@$_GET['price']) { ?>
<p><a href="[server.url type='fullpage' query='-price']">[X] Remove Price Filter</a></p>
<?php } ?>



<form method="get">
<select name="word" onchange='this.form.submit()'>
<option value=""<?php if (@$_GET['word']=='') {echo ' selected="selected"';}?>>FILTER BY COLOUR</option>
<option value="aqua"<?php if (@$_GET['word']=='aqua') {echo ' selected="selected"';}?>>Aqua</option>
<option value="beige"<?php if (@$_GET['word']=='beige') {echo ' selected="selected"';}?>>Beige</option>
<option value="black"<?php if (@$_GET['word']=='black') {echo ' selected="selected"';}?>>Black</option>
<option value="blue"<?php if (@$_GET['word']=='blue') {echo ' selected="selected"';}?>>Blue</option>
<option value="bone"<?php if (@$_GET['word']=='bone') {echo ' selected="selected"';}?>>Bone</option>
<option value="brown"<?php if (@$_GET['word']=='brown') {echo ' selected="selected"';}?>>Brown</option>
<option value="electric"<?php if (@$_GET['word']=='electric') {echo ' selected="selected"';}?>>Electric</option>
<option value="gold"<?php if (@$_GET['word']=='gold') {echo ' selected="selected"';}?>>Gold</option>
<option value="green"<?php if (@$_GET['word']=='green') {echo ' selected="selected"';}?>>Green</option>
<option value="grey"<?php if (@$_GET['word']=='grey') {echo ' selected="selected"';}?>>Grey</option>
<option value="navy"<?php if (@$_GET['word']=='navy') {echo ' selected="selected"';}?>>Navy</option>
<option value="paprika"<?php if (@$_GET['word']=='paprika') {echo ' selected="selected"';}?>>Paprika</option>
<option value="pink"<?php if (@$_GET['word']=='pink') {echo ' selected="selected"';}?>>Pink</option>
<option value="purple"<?php if (@$_GET['word']=='purple') {echo ' selected="selected"';}?>>Purple</option>
<option value="red"<?php if (@$_GET['word']=='red') {echo ' selected="selected"';}?>>Red</option>
<option value="ripple"<?php if (@$_GET['word']=='ripple') {echo ' selected="selected"';}?>>Ripple</option>
<option value="silver"<?php if (@$_GET['word']=='silver') {echo ' selected="selected"';}?>>Silver</option>
<option value="scarlet"<?php if (@$_GET['word']=='scarlet') {echo ' selected="selected"';}?>>Scarlet</option>
<option value="vermillion"<?php if (@$_GET['word']=='vermillion') {echo ' selected="selected"';}?>>Vermillion</option>
<option value="white"<?php if (@$_GET['word']=='white') {echo ' selected="selected"';}?>>White</option>
<option value="yellow"<?php if (@$_GET['word']=='yellow') {echo ' selected="selected"';}?>>Yellow</option>
<?php if (@$_GET['word']) { ?>
<p><a href="[server.url type='fullpage' query='-word']">[X] Remove Filter</a></p>
<?php } ?>



Attached Thumbnails
Click image for larger version

Views:	138
Size:	14.4 KB
ID:	570  
Attached Files
File Type: zip DROPDOWN MENU (1.73 MB, 120 views)

Last edited by Eric : August 4th, 2013 at 02:09 PM. Reason: Removed website URL.
Old June 20th, 2013, 03:06 AM
stylifyfashion stylifyfashion is offline
Join Date: Jun 2013
Posts: 10

Store ID: 42001

I posted the wrong store ID previously.
Old June 20th, 2013, 08:01 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
Join Date: Feb 2008
Posts: 16,902


I posted an answer here: /show...2963#post42963

A full example of a brand, price, color and merchant drop down filter would look like this:

HTML Code:
<form method="get">
	<!-- Brand drop down select menu -->
	<select name="brand">
		<?php echo dfr_get_brands(); ?>
	<!-- Merchant drop down select menu -->
	<select name="merchant_id">
		<?php echo dfr_get_merchants(); ?>
	<!-- Price drop down select menu -->  
	<select name="price">
		<option value="0-100" <?php if (@$_GET['price']=='0-100') {echo ' selected="selected"';} ?>>$0 - $100</option>
		<option value="100-500" <?php if (@$_GET['price']=='100-500') {echo ' selected="selected"';} ?>>$100 - $500</option>
		<option value="500-10000" <?php if (@$_GET['price']=='500-10000') {echo ' selected="selected"';} ?>>$500 - $10,000</option>
	<!-- Color drop down select menu -->  
	<select name="word">
		<option value="blue" <?php if (@$_GET['word']=='blue') {echo ' selected="selected"';} ?>>Blue</option>
		<option value="black" <?php if (@$_GET['word']=='black') {echo ' selected="selected"';} ?>>Black</option>
		<option value="green" <?php if (@$_GET['word']=='green') {echo ' selected="selected"';} ?>>Green</option>
	<input type="submit" value="Go" />
Old June 20th, 2013, 11:02 PM
stylifyfashion stylifyfashion is offline
Join Date: Jun 2013
Posts: 10
Smile All Fixed

Store ID: 42001

Hi Eric,

I implemented all your code and your advice. The filters now work perfectly. Many thanks for your help and your rapid response.



Last edited by Eric : August 4th, 2013 at 02:09 PM. Reason: Removed website URL.
Old June 20th, 2013, 11:26 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
Join Date: Feb 2008
Posts: 16,902


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why wont Store filters work? youngy Questions 14 May 13th, 2013 09:28 AM
Filters shoespecialists Questions 5 October 15th, 2012 11:43 AM
Better filters wepisto Questions 1 July 27th, 2012 07:27 AM
Drop Down for price categories working together with category drop down meinehandtasche Questions 2 January 18th, 2012 12:13 PM
Creating filters that do the work of categories Eric Tips, Tricks & Tutorials 60 December 1st, 2011 02:57 PM

All times are GMT -5. The time now is 01:17 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.