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
  #1  
Old March 5th, 2011, 12:49 PM
feri feri is offline
 
Join Date: Oct 2010
Posts: 74
Default Remove ALL Filters

I was working with the Filter Tutorial, it's awesome. I want to implement a feature called Remove ALL Filters set.

I've found this in the Documentation to remove all filters set.
Code:
<ul>
	<li><a href="[server.url type='fullpage' query='-brand&-price&-merchant']">[X] Remove ALL Filters</a></li>
</ul>
The question is how to modify the Filtering Widgets to display BOTH
- remove ALL filters
- remove price filter (if it's a price filter)

Code:
<ul>
<?php if (@$_GET['price']) { ?>

  <li><a href="[server.url type='fullpage' query='-price']">[X] Remove price filter</a></li>
<?php } else { ?>
  <li><a href="[server.url type='fullpage' query='price=-150']">Less than 150</a></li>
  <li><a href="[server.url type='fullpage' query='price=150-300']">150 ~ 300</a></li>
  <li><a href="[server.url type='fullpage' query='price=300-550']">300 ~ 550</a></li>
  <li><a href="[server.url type='fullpage' query='price=550-']">More than 550</a></li>
<?php } ?>
</ul>
2. Question: could it be possible to make a separate Widget with Remove All functionality? I think yes, just the question remains how to hide this widget when there are no filters set.
  #2  
Old March 5th, 2011, 12:59 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

You can combine the links above to create 2 removal links like this:

<a href="[server.url type='fullpage' query='-brand&-price&-merchant']">[X] Remove ALL Filters</a>
<a href="[server.url type='fullpage' query='-price']">[X] Remove Price Filter</a>

Yes, you can make another widget to handle this functionality. You can create as many widgets as you want.

Eric
  #3  
Old March 5th, 2011, 06:09 PM
feri feri is offline
 
Join Date: Oct 2010
Posts: 74
Default

Thanks, I figured this out myself too Maybe I was not clear enough.

I would like to make a global remove all filter in a separate widget. (I would make this widget without a title, so it will only be 'seen' when the remove all link gets displayed)

I need a code for removing Price, Word, Brand filters together in one step with one click. I want this to be in a separate widget. Of course, this Remove all link should be displayed every time if any of those filters are set, or any combination of those filters are set, and it should NOT be displayed when they are no filters set.

Last edited by feri : March 5th, 2011 at 06:18 PM.
  #4  
Old March 5th, 2011, 07:48 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hmm.... I'm still not 100% sure I understand exactly what you need but here's an attempt:

The following code will display a "Remove all filters" link only when a price, word and/or brand filter is present:

HTML Code:
<?php if (@$_GET['price'] || @$_GET['word'] || @$_GET['brand']) { ?>
	<a href="[server.url type='fullpage' query='-price&-word&-brand']">[X] Remove ALL Filters</a>
<?php } ?>
  #5  
Old March 6th, 2011, 02:50 AM
feri feri is offline
 
Join Date: Oct 2010
Posts: 74
Default

Thank you very much! It's 100% what I needed!
 


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
Creating filters that do the work of categories Eric Tips, Tricks & Tutorials 60 December 1st, 2011 02:57 PM
Custom filters ccgmark Questions 1 February 25th, 2011 04:10 PM
Bulk edit subscriptions/filters for categories feri Feature Requests 1 February 19th, 2011 10:41 AM


All times are GMT -5. The time now is 03:50 PM.


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