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 August 31st, 2012, 01:56 PM
TheFerryman TheFerryman is offline
 
Join Date: Jan 2009
Posts: 266
Default Merchant logo widget

Is it possible to change the order of the logos from merchant id to alphabetical or random?
Regards
Bruce
  #2  
Old August 31st, 2012, 01:58 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

Where?

Eric
  #3  
Old August 31st, 2012, 02:01 PM
TheFerryman TheFerryman is offline
 
Join Date: Jan 2009
Posts: 266
Default

Eric
You have lost me, where what?
Bruce
  #4  
Old August 31st, 2012, 02:02 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

Where is your list of logos?

Eric
  #5  
Old August 31st, 2012, 02:08 PM
TheFerryman TheFerryman is offline
 
Join Date: Jan 2009
Posts: 266
Default

It is in the right sidebar, but just anywhere the widget is, really.
Confused!
Bruce
  #6  
Old August 31st, 2012, 02:09 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

Do you mean on your site? Can you provide the code you are using that generates the list of logos?

Eric
  #7  
Old August 31st, 2012, 02:09 PM
TheFerryman TheFerryman is offline
 
Join Date: Jan 2009
Posts: 266
Default

This is the code in the widget

<?php
$merchants = dfr_get_merchants();
foreach ($merchants as $mid => $name) {
?>
<div align="center"><a href="[server.url query='view=merchants']?merchant_id=<?php echo $mid; ?>">
<img src="[server.url]/wp-content/uploads/store/merchants/<?php echo $mid; ?>.jpg" alt="<?php echo $name; ?>" />
</a></div>
<?php
}
?>
  #8  
Old August 31st, 2012, 02:15 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

I'm guessing you are using the code found here: /show..._get_merchants

If that is the case, you can change this line:
PHP Code:
$merchants $wpdb->get_results("SELECT merchant, merchant_id FROM ".$wpdb->prefix."dfr_shop_products GROUP BY merchant"); 
To (order by ID ascending):
PHP Code:
$merchants $wpdb->get_results("SELECT merchant, merchant_id FROM ".$wpdb->prefix."dfr_shop_products GROUP BY merchant ORDER BY merchant_id ASC"); 
Or (order by name ascending):
PHP Code:
$merchants $wpdb->get_results("SELECT merchant, merchant_id FROM ".$wpdb->prefix."dfr_shop_products GROUP BY merchant ORDER BY merchant ASC"); 
  #9  
Old August 31st, 2012, 02:26 PM
TheFerryman TheFerryman is offline
 
Join Date: Jan 2009
Posts: 266
Default

Eric
Yes, I'd forgotten about the code in the functions file.
Support up to your usual standards of excellence, much appreciated.
Bruce
 


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
Merchant Logo/Brand Logo kaje Questions 1 April 21st, 2012 08:08 AM
Merchant Logo macfink Questions 3 July 7th, 2011 09:10 AM


All times are GMT -5. The time now is 12:53 PM.


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