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 January 25th, 2012, 03:23 PM
Giftoly Giftoly is offline
 
Join Date: Dec 2011
Posts: 52
Default Price, merchant, brand auto filter

Good Afternoon,

I have tried the following thread which I would be really interested in doing but it got too long and confusing http://www.datafeedr.com/forums/showthread.php?t=4411.

I tried copying the following code into the function.php file and the second part inside a 'text' box that I inserted onto a view.

Code:
Hi

I think your query is completely wrong. I did this and it worked:

Code for theme's functions.php file:
PHP Code:
function dfr_get_brands() {
    global $wpdb;
    $brands = $wpdb->get_results("SELECT brand FROM ".$wpdb->prefix."dfr_shop_products GROUP BY brand");
    $html = '';
    foreach ($brands as $brands) {
        $html .= '<option value="'.$brands->brand.'">'.$brands->brand.'</option>';
    }
    return $html;
}  
Code for your view:
HTML Code:
<form method="get">
	<select name="brand">
		<?php echo dfr_get_brands(); ?>
		<input type="submit" value="Go" />
	</select>
</form>
__________________
However category pages will now no longer open when selected from the menu on the side of this page http://giftoly.co.uk/store

Could I have deleted something by accident from the Category section ??

I currently have

1) Breadcrumb

2) Text
Code:
<!-- Category Name -->
<h2>[category.name]</h2>
<!-- /Category Name -->

<p>
  <?php if ($category->image) { ?>
  
  <!-- Category Image -->
  <img src="[category.image]" alt="[category.name]" style="float:left;margin:0 10px 10px 0;" />
  <!-- /Category Image -->
  
  <?php } elseif ($category->thumbnail) { ?>
  
  <!-- Category Thumbnail -->
  <img src="[category.thumbnail]" alt="[category.name]" style="float:left;margin:0 10px 10px 0;" />
  <!-- /Category Thumbnail -->
  
  <?php } ?>
  
  <!-- Category Description -->
  [category.description]
  <!-- /Category Description -->
</p>
3) Text
With just some category specific text

4) Category list

5) Product list
__________________
Many thanks

John
www.giftoly.co.uk
  #2  
Old January 25th, 2012, 03:29 PM
Giftoly Giftoly is offline
 
Join Date: Dec 2011
Posts: 52
Default

Just a quick update. As soon as I remove the text module with the html code in, the category page will load.
__________________
Many thanks

John
www.giftoly.co.uk
  #3  
Old January 25th, 2012, 03:41 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi

My guess is that the dfr_get_brands() function inside your functions.php file was added improperly or wasn't saved.

Eric
  #4  
Old January 25th, 2012, 03:50 PM
Giftoly Giftoly is offline
 
Join Date: Dec 2011
Posts: 52
Default

Hi Eric,

Sorry you beat me to it. I was just going to post that I reversed everything back and re did it and it appears to be working.

Whilst it needs 'prettying' there is a drop down menu available http://giftoly.co.uk/store/category/...bath-and-body/

I see that the filter is looking for any brand within the entire store, could it be adjusted to just show the brands within the current category / sub-category location ?

Also with the right design knowledge could this be changed to a list with tick boxes allowing multi boxes to be chosen and also preferably placed within a widget area on the side or does it have to be placed within the datafeedr store area?

Can this also be done for merchants and price range ?

Really think a lot of users will love this functionality as it's enabling 'live' filters which is great !
__________________
Many thanks

John
www.giftoly.co.uk
  #5  
Old January 25th, 2012, 03:57 PM
Eric's Avatar
Eric Eric is offline
Datafeedr Team
 
Join Date: Feb 2008
Posts: 16,902
Default

Hi
Quote:
Originally Posted by Giftoly View Post
I see that the filter is looking for any brand within the entire store, could it be adjusted to just show the brands within the current category / sub-category location ?
This is currently not possible.

Quote:
Originally Posted by Giftoly View Post
Also with the right design knowledge could this be changed to a list with tick boxes allowing multi boxes to be chosen and also preferably placed within a widget area on the side or does it have to be placed within the datafeedr store area?
It can be placed anywhere you want in your site. Multi selection is not possible.

Quote:
Originally Posted by Giftoly View Post
Can this also be done for merchants and price range ?
Sure.

Quote:
Originally Posted by Giftoly View Post
Really think a lot of users will love this functionality as it's enabling 'live' filters which is great !
Yes, it would be great... unfortunately there are some major barriers to Faceted Search (which is what you are trying to emulate). The main barrier to real Faceted Search is server resources. Most Faceted Searches that filter more than a thousand products require a search server such as Solr be used. Otherwise, Faceted Search will bring down your site.

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
Add filter for sale price in the Merchant Discovery Tool ayorofrance Feature Requests 1 March 31st, 2012 11:16 AM
Merchant and Brand filter Widgets Nugerama Tips, Tricks & Tutorials 13 March 7th, 2012 05:01 PM
'Remove Price filter' like brand filter Giftoly Questions 1 January 20th, 2012 10:48 AM
Allowing a visitor to undo the brand and price filter jdrom Questions 4 July 4th, 2011 09:08 AM
Brand filter? sylviathewitch Problems 3 March 8th, 2011 08:43 AM


All times are GMT -5. The time now is 01:54 AM.


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