Datafeedr Support Forums

Datafeedr Support Forums (/index.php)
-   Questions (/forumdisplay.php?f=67)
-   -   Price filter (/showthread.php?t=6532)

quitjob March 18th, 2012 04:07 AM

Price filter
 
133ezfhl26un3r8w
childinchic.com

Hello, I'm trying to add a price filter to a wp theme widget. I've used this code in factory:
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=-20']">Less than 20</a></li>
  <li><a href="[server.url type='fullpage' query='price=20-50']">20 ~ 50</a></li>
  <li><a href="[server.url type='fullpage' query='price=50-100']">50 ~ 100</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-700']">550 ~ 700</a></li>
  <li><a href="[server.url type='fullpage' query='price=700-950']">700 ~ 950</a></li>
  <li><a href="[server.url type='fullpage' query='price=950-1200']">950 ~ 1200</a></li>
  <li><a href="[server.url type='fullpage' query='price=1200-1500']">1200 ~ 1500</a></li>
  <li><a href="[server.url type='fullpage' query='price=1500-']">More than 1500</a></li>

<?php } ?>
</ul>

the widget is placed an all pages.

Inside the shop i.e /store... everything works well but outside the shop filter does not work.

How to make it work from index page also?

Thank you.

Eric March 18th, 2012 09:59 AM

Hi

The filter is different than a category.

A category is a link to a list of a group of products.

A filter is a way to filter/reduce that list of a group of products.

So, you must have a list of products to apply the filter to. Therefore, the filter will only "work" on a page with a group of products.

Your index page does not contain a list of products. It contains a list of blog posts. So there is nothing to filter.

I hope that makes sense.

Eric


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

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