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 December 5th, 2013, 09:14 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Cool Merchant Filter

Hey again Eric,

I've incorporated categories and price filters for narrowing searches. Is there a way to narrow the search by Merchant? To maybe list merchants and the user can click which one they want to see products from or click any that they want removed from the results? Now that would be pretty darn cool.
  #2  
Old December 5th, 2013, 09:37 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Yes, that's possible: http://www.datafeedr.com/forums/showthread.php?t=6778

Eric
  #3  
Old December 6th, 2013, 09:17 AM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

Eric, here is what I figured out to use. Is this as good as what you described? It's easier for me but I have some questions...

merchant search forms:

as seen on page:

http://saveongolf.net/store/category/all-drivers/


This might be easier for me to implement given my lack of coding skill! But can you answer a few questions about this widget?

1. What is the tag search for? I don't think I need that since I doubt visitors will know what it is since I don't and it's my widget!

2. How do I (or anyone visiting the site) know exactly what to type in the merchant box? If I type in Golfsmith for example it works, but some of these other sites the names aren't so straight forward and obvious. Does Amazon work, or Amazon.com. Does In The Hole Golf work or intheholdgolf.com? Is there an easy way for me to find that out?

3. And lastly, the list on the bottom that now has the default websites like beauty.com. How do I change those to my merchants?


here's the code:

[search.form]
<div class="srchform">
<p class="keyword">
<label for="word">Keyword</label> [search.word]
</p>
<p class="merchant">
<label for="merchant">Merchant</label> [search.merchant]
</p>
<p class="tag">
<label for="tags">Tags</label> [search.tags]
</p>
<p class="price">
<label for="price">Price</label> [search.selectprice options='any, cheap(-5), $5 - $10, $10 - $20, more than 20 (20+)']
</p>
<p class="button">[search.submit title='Find it!']</p>
</div>
[/search.form]<ul>
<li><a href="[server.url type='fullpage' query='merchant=Beauty.com']">Beauty.com</a></li>
<li><a href="[server.url type='fullpage' query='merchant=GameStop']">GameStop</a></li>
<li><a href="[server.url type='fullpage' query='merchant=Sierra Trading Post']">Sierra Trading Post</a></li>
</ul>
  #4  
Old December 6th, 2013, 09:58 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

1. It's for searching tags however I agree with you. I don't typically use it.

2. That's why a drop down menu is better. That will give your users a choice.

3. That's easiest using the method in the link I posted above.

Eric
  #5  
Old December 6th, 2013, 10:02 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

You could try replacing all of your code:

Code:
[search.form]
<div class="srchform">
<p class="keyword">
<label for="word">Keyword</label> [search.word]
</p>
<p class="merchant">
<label for="merchant">Merchant</label> [search.merchant]
</p>
<p class="tag">
<label for="tags">Tags</label> [search.tags]
</p>
<p class="price">
<label for="price">Price</label> [search.selectprice options='any, cheap(-5), $5 - $10, $10 - $20, more than 20 (20+)']
</p>
<p class="button">[search.submit title='Find it!']</p>
</div>
[/search.form]<ul>
<li><a href="[server.url type='fullpage' query='merchant=Beauty.com']">Beauty.com</a></li>
<li><a href="[server.url type='fullpage' query='merchant=GameStop']">GameStop</a></li>
<li><a href="[server.url type='fullpage' query='merchant=Sierra Trading Post']">Sierra Trading Post</a></li>
</ul>
With the following code:

Code:
<?php
function dfr_get_merchants() {
    global $wpdb;
    $merchants = $wpdb->get_results("SELECT merchant, merchant_id FROM ".$wpdb->prefix."dfr_shop_products GROUP BY merchant");
    $html = '<option value="">Select a merchant</option>';
    foreach ($merchants as $k => $v) {
        if (trim($v->merchant) != "") {
            $selected = (strip_tags($_GET['merchant_id'])==$v->merchant_id) ? ' selected="selected"' : '';
            $html .= '<option value="'.$v->merchant_id.'"'.$selected.'>'.$v->merchant.'</option>';
        }
    }
    return $html;
}
?>

[search.form]
<div class="store_search_form">
  <p class="keyword">
    <label for="word">Keyword</label> [search.word]
  </p>
  <p class="merchant">
    <select name="merchant_id">
      <?php echo dfr_get_merchants(); ?>
    </select>
  </p>
  <p class="price">
   <label for="price">Price</label> [search.selectprice options='any, cheap(-5), $5 - $10, $10 - $20, more than 20 (20+)']
  </p>
  <p class="button">[search.submit title='Find it!']</p>
</div>
[/search.form]
That might give you what you are going for.

That will give you a search form like this:


Eric
  #6  
Old December 6th, 2013, 10:54 AM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

I have to learn to trust you. That worked out great! I didn't realize the code you were having me replace was the code I already had in place for the widget. Thanks!

Is there a way to be able to select more than one merchant at a time?

Is there a way to select "all"? I know if you just leave it at "select a merchant" that does the same thing as "all", but it might not be apparent to users.

If I could add a "select all merchants" then I could get rid of the other simple search box and just use this one.

Thanks again,
Ken
  #7  
Old December 6th, 2013, 11:02 AM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

You can't select more than 1 merchant at a time.

If you leave it blank, all merchants are selected.

You could change this:
PHP Code:
$html '<option value="">Select a merchant</option>'
To this:
PHP Code:
$html '<option value="">Select all merchants</option>'
Eric
  #8  
Old December 6th, 2013, 11:03 AM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

Working great! I of course have an issue...or it wouldn't be me:

Is there a way to change the way the name appears in the drop down menu? One of the vendors shows up as Golfsmith affiliate program. I'd like it to just say Golfsmith.
  #9  
Old December 6th, 2013, 11:26 AM
stefan stefan is offline
 
Join Date: Feb 2008
Posts: 5,901
Default

Quote:
Originally Posted by yankeestonk View Post
Is there a way to change the way the name appears in the drop down menu? One of the vendors shows up as Golfsmith affiliate program. I'd like it to just say Golfsmith.
I just changed the name to Golfsmith. Updating your store may be necessary.
  #10  
Old December 6th, 2013, 01:05 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

you guys are the best. Thanks!
  #11  
Old December 7th, 2013, 07:20 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default Merchant Filter code above only giving 18 results

Hi,

I noticed that the merchant filter code given above is only allowing 18 results to be returned...I'd like to have that around 100. How/where do I change that setting?
  #12  
Old December 7th, 2013, 07:38 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

That query is returning all of the brands that are listed in your store.

Eric
  #13  
Old December 7th, 2013, 07:40 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

Ok, since I wrote the above I've been fooling around with it and found out that a lot of the results per page were set to 18. I changed that to 100 and now I get up to 100 results. The problem is I'd like to have say 30 results on each page and then and 2, 3, 4, 5, etc pages to click on. But for some reason I only get 1 page, no matter if things are set to 18 results or 100 they always appear on one page. How do I fix this? I'd really like an unlimited amount of results and be able to control the number of results per page.

thanks much.

http://saveongolf.net/store
  #14  
Old December 7th, 2013, 07:44 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi,

Oh, you were talking about 18 products per page. I thought you were referring to the number of brands listed in your drop down menu.

To change the Products Per Page, go here The Factory > Your Store > VIEWS > CATEGORY PAGE > Default > Product list > Settings () and adjust the products per page field.

For the 1 page issue, I'm guessing this is the issue:
http://www.datafeedr.com/forums/show...5431#post45431

Eric
  #15  
Old December 7th, 2013, 08:03 PM
yankeestonk yankeestonk is offline
 
Join Date: Jun 2013
Posts: 605
Default

Thanks. That fixed the one page issue. I'll go in and change the results per page back to something reasonable now that I have more than one page. What would you think would give the best user experience? 50 results per page sound good?
  #16  
Old December 7th, 2013, 08:35 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

IMO, less than 30 is good.
 


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
filter by merchant tewfic Problems 26 January 22nd, 2013 02:44 PM
Merchant Filter nzcid Problems 1 March 26th, 2012 05:19 AM
Merchant Not Showing in Merchant Filter dk3 Problems 2 March 9th, 2012 01:42 PM
Merchant Filter Will Not Show Merchant Correctly laura90059 Questions 6 March 7th, 2011 10:46 PM
Filter by Merchant ayorofrance Questions 1 March 7th, 2011 07:13 PM


All times are GMT -5. The time now is 09:00 PM.


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