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
Prev Previous Post   Next Post Next
Old January 18th, 2012, 06:05 AM
meinehandtasche meinehandtasche is offline
Join Date: Jul 2011
Posts: 43

Store ID: 32722
Website URL:
URL to page in question:

Thank you Eric,

that worked. To exclude brands from the list was too much work, therefore I did it the way around to make a list of brands that are allowed. To do so I have changed your code from
WHERE brand IN

It works just fine now :-) Thanks again!!

Here my full code pasted into the functions.php file of my theme template:
function dfr_get_brands() {
global $wpdb;
$brands = $wpdb->get_results("SELECT brand FROM ".$wpdb->prefix."dfr_shop_products
GROUP BY brand");
$html = '';
foreach ($brands as $brands) {
$html .= '<option value="'.$brands->brand.'">'.ucwords($brands->brand).'</option>';
return $html;
And now to wrap up this kind of little how-to:

I pasted the following code into / Factory > Widgets > add a new widget / and then used / category list / from the available widget view modules:

Brands:<br />
<form method="get">
<select name="brand">
<?php echo dfr_get_brands(); ?>
<input type="submit" value="GO" />

One thing I couldn't solve: if there are brands having some kind of special characters like "TOD'S" caused problems - the list couldn't be displayed. This character ' is used to separate one brand from the other therefore I had to kick out all brands containing this character.
Is there maybe a solution for that as well?

Now I am working on a price filter as drop down that works together with the drop down brand filter.
Currently I just use the following which works perfectly but it would be much nicer to have a drop down:

Paste this into / Factory > Widgets > add a new widget / OR into the same widget as the brand filter widget mentioned above. I have use / text / from the available widget view modules:
<br />
<?php if (@$_GET['price']) { ?>

<li><a href="[server.url type='fullpage' query='-price']">[X] delete price filter</a></li>

<?php } else { ?>

<li><a href="[server.url type='fullpage' query='price=-50']">< 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=100-150']"> 100 - 150</a></li>
<li><a href="[server.url type='fullpage' query='price=150-250']"> 150 - 250</a></li>
<li><a href="[server.url type='fullpage' query='price=250-500']"> 250 - 500</a></li>
<li><a href="[server.url type='fullpage' query='price=500-1000']"> 500 - 1.000</a></li>
<li><a href="[server.url type='fullpage' query='price=1000-']">> 1.000</a></li>

<?php } ?>

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
Merchant and Brand filter Widgets Nugerama Tips, Tricks & Tutorials 13 March 7th, 2012 05:01 PM
Brand Filter Drop-Down with All Brands option meperez Questions 8 March 26th, 2011 12:04 AM
Brand Filter = Brands Only show when in Category macfink Questions 3 March 25th, 2011 12:55 PM
Drop down Menu from filter by Brand macfink Questions 4 March 25th, 2011 09:32 AM
Brand filter? sylviathewitch Problems 3 March 8th, 2011 08:43 AM

All times are GMT -5. The time now is 12:55 PM.

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