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

Store ID: 36187
Website URL: http://www.thewildstyles.com
URL to page in question: http://www.thewildstyles.com/store/category/clothing/

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()'>
<?php
$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 } ?>
</select>
</form>

<?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.