View Single Post
Old April 21st, 2011, 07:31 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
Join Date: Feb 2008
Posts: 16,902

Here's what worked for me:

In your theme's functions.php file, add this:

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

In a Text Module in a view where you want the logos to appear, add this:

PHP Code:
foreach (
$merchants as $mid => $name) {
  <a href="[server.url type='fullpage' query='merchant=$name']">
    <img src="http://YOURSITE/path/to/logos/<?php echo $mid?>.jpg" alt="<?php echo $name?>" />
Make sure you change the img src to the path where your logos can be found.

The only thing that is missing is that that loop above will not download your logos for you. You must add the logos manually to your logos directory.

Merchant logos are automatically downloaded and added to your store when a merchant logo is displayed within the [product.each]...[product.end] loop. If you display your merchant logos on your Category Pages or Product Details pages, then you won't have to manually add the logos to your logo directories.