View Single Post
  #2  
Old March 29th, 2011, 02:21 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi Kev,

You could always add a couple of queries and add those to theme's functions.php file. But, there might be way more merchants and or brands than you might anticipate:

Here's one that could work for your merchants. You can do the same thing for brands.

PHP Code:
function dfr_get_merchants() {
    global 
$wpdb;
    
$merchants $wpdb->get_results("SELECT merchant FROM ".$wpdb->prefix."dfr_shop_products GROUP BY merchant");
    
$list = array();
    foreach (
$merchants as $merchants)
        
$list[] = $merchants->merchant;
    return 
$list;

Then you could add something like this in your views:

PHP Code:
<?php
$merchants 
dfr_get_merchants();
foreach (
$merchants as $merchant) {
    echo 
'<li><a href="[server.url type=\'fullpage\' query=\''.$merchant).'\']">'.$merchant).'</a></li>';
}
?>
You might need to tweak that to meet your needs but it should get you in the ballpark.

Eric