Datafeedr Support Forums

Datafeedr Support Forums (http://www.datafeedr.com/forums/index.php)
-   Tips, Tricks & Tutorials (http://www.datafeedr.com/forums/forumdisplay.php?f=66)
-   -   Creating filters that do the work of categories (http://www.datafeedr.com/forums/showthread.php?t=3853)

meinehandtasche October 29th, 2011 05:05 AM

Hi Eric,

I setup a brand and a color filter.

Snippet brand filter:
Quote:

<ul>
<?php if (@$_GET['brand']) { ?>
<li><a href="[server.url type='fullpage' query='-brand']">[X] delete brand filter</a></li>
<?php } else { ?>
<li><a href="[server.url type='fullpage' query='brand=ABACO']">ABACO</a></li>
<li><a href="[server.url type='fullpage' query='word=VERSACE']">VERSACE</a></li>
<?php } ?>
</ul>
Snippet color filter:
Quote:

<?php if (@$_GET['word']) { ?>
<a href="[server.url type='fullpage' query='-word']">[X] Remove color filter</a>
<?php } else { ?>
<div style="background-color:black; width:20px; height:20px; float:left; margin-right:5px; text-decoration: none;"><a href="[server.url type='fullpage' query='word=black']">&nbsp;&nbsp;&nbsp;&nbsp;</a></div>
<div style="background-color:white; width:20px; height:20px; float:left; margin-right:5px; text-decoration: none;"><a href="[server.url type='fullpage' query='word=white']">&nbsp;&nbsp;&nbsp;&nbsp;</a></div>
<?php } ?>
As you can see I tested brand=ABACO and word=VERSACE because I noticed that the best results I retrieve by using query='word.

If I change my brand filters using query='word it causes problems with the color filter which disappears as being selected.

Do you have a solution what I can do in order to use the color filter and the brand filter using query='word to get the best results of displayed products?

Best,
Oliver

Eric October 29th, 2011 10:03 AM

Hi

Currently, there's no way to use one key (ie. "word") for 2 different parameters (color and brand).

Eric

sunshine November 3rd, 2011 09:40 PM

having a challenge setting up the filters - hoping you can help.

<ul>
<?php if (@$_GET['word']) { ?>

<li><a href="[server.url type='fullpage' query='-word&-tags&saleprice']">[X] Remove filter</a></li>

<?php } else { ?>


<li><a href="[server.url type='fullpage' query='brand=Nike']">Nike</a></li>
<li><a href="[server.url type='fullpage' query='merchant=Cooking.com']">Cooking</a></li>
<li><a href="[server.url type='fullpage' query='name=shoe']">shoe</a></li>
<li><a href="[server.url type='fullpage' query='word=brown']">brown</a></li>
<li><a href="[server.url type='fullpage' query='tags=foo']">foo</a></li>
<li><a href="[server.url type='fullpage' query='tags=foo+bar']">foo bar</a></li>
<li><a href="[server.url type='fullpage' query='saleprice=5-10']">$5-$10</a></li>

<?php } ?>
</ul>

Here is what I am trying to do: if the url is http://www.sitename.com/?word=brown, and the visitor clicks on foo, I want the url to read http://www.sitename.com/?tags=foo

At least get it to remove everything except for tags=foo.

Whats the best way to accomplish this?

Madeline

Eric November 4th, 2011 08:52 AM

If you want the new URL to be /?tags=foo, then you will need to configure your links like this:
HTML Code:

<li><a href="[server.url type='fullpage' query='tags=foo&-saleprice&-word&-brand&-name']">foo</a></li>
Eric

cashnow1 November 12th, 2011 06:14 PM

Quote:

Originally Posted by ayorofrance (Post 17626)
Hi Eric,...

In case anyone is interested this is the code I use to create a drop down box instead of a list:
Code:

<form method="get">
  <select name="word" onchange='this.form.submit()'>

    <option value="Option 1"<?php if (@$_GET['word']=='Option 1') {echo ' selected="selected"';}?>>Option 1</option>
    <option value="Option 2"<?php if (@$_GET['word']=='Option 2') {echo ' selected="selected"';}?>>Option 2</option>

  </select>
  <input type="submit" value="Go" class="dfsbmt" />
</form>
 
<?php if (@$_GET['word']) { ?>
  <p><a href="[server.url type='fullpage' query='-word']">[X] Remove Filter</a></p>
<?php } ?>


Hi Eric,

If I wanted to use this code to create a drop-down list, where and how would I paste the code?

When I say how, I mean do I add it at the beginning, end, or do I add the filter in the middle of this code?

I know this was not your posted code but I thought you might have some insight to it.

Thanks

Eric November 12th, 2011 06:26 PM

Hi

I'm confused.... That is code for a drop down list...

Eric

cashnow1 November 12th, 2011 06:28 PM

o.k., what do I do with this code?

Eric November 12th, 2011 06:29 PM

Hi

You put the code in a Widget view (Text module) and then add it to your site's sidebar. You do with it the same as the other code posted in the first post of this thread.

Eric

cashnow1 November 12th, 2011 06:43 PM

I guess that's my question...is this code included with the code you showed us to create the different filters or is this something that stands alone.

Eric November 12th, 2011 10:19 PM

The code you referenced above is a variation on the code that I mentioned in the first post. It just displays the filters differently.

GadgetStylist November 29th, 2011 06:05 AM

Hi Eric

Is there a quick way to hide/remove category descriptions from brand filter pages? At the moment I've got huge duplicate issues as the every variant of the filters is indexed by Google so the lovely, helpful long description I've written for each category is present on hundreds of variants of the page.

Alternatively is there a way to insert a no index for all filters in the meta data? I suppose a rel canonical would do something similar?

Thanks

Chris

ayorofrance November 29th, 2011 06:33 AM

I use a canonical tag for this.

On the category -> View Head Elements add this:

Code:

<link rel="canonical" href="http://ENTER YOUR DOMAIN NAME HERE[category.link]" />

GadgetStylist November 29th, 2011 06:35 AM

http://www.urbanwatch.co.uk/
Store ID = 69779

Hi Eric

Is till can't get the filters appearing contextually either. The Target by URL feature in Widget Context doesn't seem to be working. All I can do is switch each filter on for Pages but that means the filters show on every page of the Store.

Could you please have a look to see if I have done something wrong or if there is a bug in the latest version of the plugin?

Thanks

Chris

GadgetStylist November 29th, 2011 06:40 AM

Quote:

Originally Posted by ayorofrance (Post 26527)
I use a canonical tag for this.

On the category -> View Head Elements add this:

Code:

<link rel="canonical" href="http://ENTER YOUR DOMAIN NAME HERE[category.link]" />

Thanks Ayorofrance! Looks perfect.

:)

Eric November 29th, 2011 09:48 AM

Quote:

Originally Posted by GadgetStylist (Post 26528)
Is till can't get the filters appearing contextually either. The Target by URL feature in Widget Context doesn't seem to be working. All I can do is switch each filter on for Pages but that means the filters show on every page of the Store.

Can you send a screenshot of your widget context settings?

GadgetStylist November 29th, 2011 10:05 AM

They are currently set to show the filters on all 'Pages' because I couldn't get any variant or URL to work. I tried the following to try variants to try and get the filters to only show on the white watches category page:

/deals/white-watches/
/deals/white-watches/*
/deals/white-watches*
http://www.urbanwatch.co.uk/deals/white-watches/

I also tried:
/deals/

None of the above seemed to work.

Chris

Eric November 29th, 2011 10:12 AM

I think it should be this:

deals/white-watches*

GadgetStylist November 29th, 2011 01:21 PM

Thanks Eric - that fixes it along with identifying one other big bug in the Widget Context plugin...

If you target by URL DON'T leave any blank rows in the text entry box as this breaks it!! e.g. don't press return after entering your final URL to leave an empty row in the box as it breaks everything. Bit annoying!

Cheers

Chris

cashnow1 December 1st, 2011 02:27 PM

Price Filter Not Working On Sale Items Page
 
I have set up price and brand filters as shown in the beginning of this post, but when I went to my Sale Items page and tried to filter by price, no filtering happened. Is that normal or is there something that I need to tweak to make it work?

www.bicyclebrandsdirect.com
www.bicyclebrandsdirect.com/sale-items
ID: 34417

P.S. I have used the context plugin to remove the price filter from that page since it wasn't working. If you need me to replace it let me know.

Thanks

Eric December 1st, 2011 02:55 PM

Hi

You need to check the "allow override" box here: The Factory > Your Store > VIEWS > SALE ITEMS > Product list module > Settings.

Eric


All times are GMT -5. The time now is 01:59 AM.

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