View Single Post
Old February 20th, 2012, 07:50 AM
wildstyles wildstyles is offline
Join Date: Feb 2012
Posts: 21

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

Hi there,
This piece of code works really good. I've managed to pull all my brands from the database with this code.
I've used the code from ""Creating Filters" post to put the list in a dropdown..
See the code:

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

<h6><a href="[server.url type='fullpage' query='-brand']">[X] Remove your choice "[store.get param="brand"]"</a></h6>

<?php } else { ?>

<form method="get">
<select name="brand" onchange='this.form.submit()'>
$brands = dfr_get_brands();
foreach ($brands as $brand) {
$brand = urlencode($brand);

<option value="<?php echo urldecode($brand); ?>"<?php if (@$_GET['brand']) {echo ' selected="selected"';}?>><?php echo urldecode($brand); ?></option>

<?php } ?>

<?php } ?>

Now my issue is that when I have other filters on (merchant, etc) and I choose a different brand, it erases all the other filters and goes to the brand page.. While all other filters don't have that issue, you can add and remove as many as you want without overriding anything.
So Im sure I've made some errors in the code, I'm not an expert unfortunately. Could either of you help me out with this?

Thanks in advance.
Ivar Zuidhoek.