Datafeedr Support Forums  

Go Back   Datafeedr Support Forums > Current Version (V3) Forum > Questions
Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Important - The support forums are now in "read-only" mode as we transition to an alternative help desk solution. Feel free to contact us here with any of your questions or search the forums for an existing solution.
 
 
Thread Tools Search this Thread Display Modes
  #1  
Old June 17th, 2011, 04:02 AM
bravecreative bravecreative is offline
 
Join Date: May 2011
Location: UK
Posts: 27
Arrow List Merchant Logos

Hello,

I have setup my Datafeedr to use the merchant logo directory.

How can I list my Merchant's logos like this: (see attached)

Obviously clicking through to the correct category which lists products just by those merchants?
Attached Thumbnails
Click image for larger version

Name:	Screen shot 2011-06-17 at 10.00.47.png
Views:	119
Size:	29.7 KB
ID:	398  
  #2  
Old June 17th, 2011, 04:33 AM
bravecreative bravecreative is offline
 
Join Date: May 2011
Location: UK
Posts: 27
Default

I forgot to add - I tried Eric's code on previous posts and this DOES work BUT the URL needs to go to a category like page showing products just from that particular Merchant.
  #3  
Old June 17th, 2011, 09:03 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

THREAD MOVED TO CORRECT FORUM.
  #4  
Old June 17th, 2011, 09:05 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Quote:
Originally Posted by bravecreative View Post
I forgot to add - I tried Eric's code on previous posts and this DOES work BUT the URL needs to go to a category like page showing products just from that particular Merchant.
Can you please provide the link to that post that DOES work. It might be possible just to modify the code slightly but I don't know what code you are talking about.
  #5  
Old June 17th, 2011, 09:21 AM
bravecreative bravecreative is offline
 
Join Date: May 2011
Location: UK
Posts: 27
Default

Hi Eric,

The code is:
PHP Code:
function dfr_get_merchants() {
    global 
$wpdb;
    
$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;
    }
    return 
$list;

And parsed via:

PHP Code:
$merchants str_replace(array("",""), array("",""), datafeedr_tag("Merchant logos"));
echo 
$merchants
It displays text links as the merchant logos do not appear also for some reason, but the link throughs do nothing other than stay on the homepage - I need them to link to a page which lists products by the selected merchant.
__________________
Brave Creative
Web Design & Development

http://www.bravecreative.co.uk
  #6  
Old June 17th, 2011, 10:43 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

To display a list of merchant logos AND have a page to display a list of products from those merchants, here's how that is done.

First, you must make sure that the logo exists in your logo directory. If it's not there, you need to add it. We have not added a logo for every single merchant in the Factory.

Also, I am displaying the merchant logos in the sidebar using a Widget. You can choose to display them wherever you'd like.

1. Add this function to your theme's functions.php file:
PHP Code:
function dfr_get_merchants() {
    global 
$wpdb;
    
$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;
    }
    return 
$list;

2. Add a new Widget with the following settings:



3. Add a Text module to the widget and add the following code to the Text module (be sure to replace YOURDOMAIN with your actual domain name):
PHP Code:
<?php
$merchants 
dfr_get_merchants();
foreach (
$merchants as $mid => $name) {
?>
  <a href="[server.url query='view=merchants']?merchant=<?php echo $name?>">
    <img src="http://YOURDOMAIN/wp-content/uploads/store/merchants/<?php echo $mid?>.jpg" alt="<?php echo $name?>" />
  </a>
<?php
}
?>
4. Now add a new Custom view with the following settings:



5. Add a Product list module to this new custom view.

6. Add code to the Product list modue to display the products:



That's it. Now after I add the widget to my sidebar, I have a list of merchant logos that link to a page which displays only products from those merchants. (Note that I do have 1 merchant logo missing that needs to be added.)



Eric
  #7  
Old June 20th, 2011, 03:53 AM
bravecreative bravecreative is offline
 
Join Date: May 2011
Location: UK
Posts: 27
Default

Thanks Eric, I have given this a go - but the click through's seem to do nothing at all other than refresh the home page?

See: http://www.samsungtvhd.co.uk/
__________________
Brave Creative
Web Design & Development

http://www.bravecreative.co.uk
  #8  
Old June 20th, 2011, 08:31 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

That's because you have not done step #3 correctly.

Eric
  #9  
Old June 20th, 2011, 08:42 AM
bravecreative bravecreative is offline
 
Join Date: May 2011
Location: UK
Posts: 27
Default

This is my code to display the logos:
PHP Code:
        <div id="merchants">
        
            <h2>Samsung TV Merchants</h2>
            <?php 
            $merchants 
str_replace(array("",""), array("",""), datafeedr_tag("merchantlogos"));
            echo 
$merchants
            
?>         
            <div class="clear"></div>    
        </div> <!--! end of #merchants -->
This is now showing nothing at all.
__________________
Brave Creative
Web Design & Development

http://www.bravecreative.co.uk
  #10  
Old June 20th, 2011, 09:00 AM
bravecreative bravecreative is offline
 
Join Date: May 2011
Location: UK
Posts: 27
Default

Do you want FTP + Factory access? May make life a bit easier..
__________________
Brave Creative
Web Design & Development

http://www.bravecreative.co.uk
  #11  
Old June 20th, 2011, 09:09 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

I have factory access

I see you have the "merchantlogos" view as a Widget. But did you configure that widget to appear in your sidebar (Appearance > Widgets)?

Also, you did not add the word "view" to the Custom CSS ID field for your "merchants" View Properties. That is causing the layout to be messed up. (Please see step #4)

Eric
  #12  
Old June 20th, 2011, 09:28 AM
bravecreative bravecreative is offline
 
Join Date: May 2011
Location: UK
Posts: 27
Default

My WordPress theme does not support widgets - So I am manually calling that snippet.

What has the CSS ID got to do with that? I am using my own custom styles in my themes css file so I haven't got to styling the products as of yet because the functionality does not work.

Do you want to go in and have a play?
__________________
Brave Creative
Web Design & Development

http://www.bravecreative.co.uk
  #13  
Old June 20th, 2011, 09:38 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

How are you calling the snippet?

The CSS ID will format your page so it doesn't look like this: http://www.samsungtvhd.co.uk/store/m...ant=John+Lewis

Eric
  #14  
Old June 20th, 2011, 09:42 AM
bravecreative bravecreative is offline
 
Join Date: May 2011
Location: UK
Posts: 27
Default

It is just calling the datafeedr tag.

index.php
PHP Code:

        <div id="merchants">
        
            <h2>Samsung TV Merchants</h2>
            <?php 
            $merchants 
str_replace(array("",""), array("",""), datafeedr_tag("merchantlogos"));
            echo 
$merchants
            
?>         
            <div class="clear"></div>    
        </div> <!--! end of #merchants -->
functions.php
PHP Code:
function dfr_get_merchants() {
    global 
$wpdb;
    
$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;
    }
    return 
$list;

All coming from the Widget code in Factory

Before I used a different code and it actually showed the logo's - I also notice in your URL there you have /store/ and that seems to work like a charm.

The code you have provided does not add this?
__________________
Brave Creative
Web Design & Development

http://www.bravecreative.co.uk
  #15  
Old June 20th, 2011, 09:53 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

The problem is that you need to call a widget via the datafeedr_tag() like this:
PHP Code:
datafeedr_tag("widget/merchantlogos"
You should just be able to do this:
HTML Code:
<div id="merchants">
	<h2>Samsung TV Merchants</h2>
	<?php echo datafeedr_tag("widget/merchantlogos"); ?>         
	<div class="clear"></div>    
</div> 
<!--! end of #merchants -->
Eric

Last edited by Eric : June 20th, 2011 at 09:54 AM. Reason: fixed datafeedr_tag
  #16  
Old June 21st, 2011, 03:39 AM
bravecreative bravecreative is offline
 
Join Date: May 2011
Location: UK
Posts: 27
Default

Thanks Eric - all working now.
__________________
Brave Creative
Web Design & Development

http://www.bravecreative.co.uk
  #17  
Old June 27th, 2011, 02:32 AM
TheFerryman TheFerryman is offline
 
Join Date: Jan 2009
Posts: 266
Default

Thanks, Eric, this works well, however, there are only merchant logos for about half the UK merchants. I think I read elsewhere that you are working on them when you have time, do you have any time scale on when they will all be available?

I know I could make them myself, but I am struggling for time as well.

Thanks.

Bruce
  #18  
Old June 27th, 2011, 03:09 AM
stefan stefan is offline
 
Join Date: Feb 2008
Posts: 5,901
Default

Quote:
Originally Posted by omnialgroup View Post
do you have any time scale on when they will all be available?
There is no time scale on when all logos will be available.

Just let us know the merchants you want logos for and I'll add those asap.

Please use the Networks & Merchants forum to request logos.

http://www.datafeedr.com/forums/forumdisplay.php?f=13
  #19  
Old June 28th, 2011, 01:35 AM
paula_bulakova paula_bulakova is offline
 
Join Date: Jun 2011
Posts: 3
Default Name of the Merchant

Hi Eric

Thanks for a great tutorial. I am a total newbie and therefore it is great for me that you provide the detailed steps and pictures as well.

I have a question about Merchant Logos. I have followed your tutorial described in the above posts and displayed merchant logos on my homepage so visitors can click on particular merchant. After click they will get on a page with the product list of the particular merchant.

Now my questions are:
1. how can I display the name of the selected merchant on the top of the page (so the visitor knows where he is)
2. where can I update layout of the product list (currently it's 2 column layout and i want to change it to Template 3 - 1 column layout)

If you need to have a look on my website go to http://www.bestfrenchcuffshirts.com


Thank you in advance for your answers.
  #20  
Old June 28th, 2011, 08:47 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

To display the merchant name, you could add something like this to a Text module on that page:
PHP Code:
<?php echo strip_tags($_GET['merchant']); ?>
To change the layout, go to VIEWS > CUSTOM VIEWS > merchants and edit the Product list module. You want to replace the Product list code that's already there with Template 3 code.

Eric
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Missing Merchant Logos sdasgin Problems 2 May 6th, 2011 04:57 AM
no merchant logos marcaustin Problems 13 March 7th, 2011 03:23 PM
Submitting Merchant Logos ayorofrance Questions 1 January 26th, 2011 05:07 AM


All times are GMT -5. The time now is 05:04 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.