View Single Post
  #1  
Old October 3rd, 2012, 09:46 AM
officialwatch officialwatch is offline
 
Join Date: Sep 2012
Posts: 51
Default regarding filter

Store ID:
Website URL: http://official-watch.com/
URL to page in question:

sir i paste the following code to call brand filter
<ul>
<?php
$brands = dfr_get_brands($category->id);
foreach ($brands as $brand) {
if ($brand != "") {
$brand = urlencode($brand);
?>
<li><a href="[server.url type='fullpage' query='brand=$brand']"><?php echo urldecode($brand); ?></a></li>
<?php } ?>
<?php } ?>
</ul>

and following function
<?php
function dfr_get_brands($cat=false) {
global $wpdb;
if ($cat) { $cat_query = "WHERE cat_id = ".$cat." "; }
$brands = $wpdb->get_results("SELECT brand FROM ".$wpdb->prefix."dfr_shop_products ".$cat_query."GROUP BY brand");
$list = array();
foreach ($brands as $brands) {
$list[] = $brands->brand;
}
return $list;
}
?>


but its not filtering the product why??