AnonymousInactive
It turns out I hooked the results to the wrong DOM Element. When I used #main as my jquery selector, it worked perfectly.
I also found an easy way to get all search terms in the header:
` <?
function return_search_terms($page_title) {
if(is_search()) {
$getText = $_GET;
$searchString = ”;
$searchString .= ‘Zoekresultaten: “‘;
foreach($getText as $key => $value) {
$searchString .= $value;
if(end($getText) !== $value) {
$searchString .= ‘, ‘;
}
}
$searchString .= ‘”‘;
return $searchString;
} else {
return $page_title;
}
}
add_filter(‘woocommerce_page_title’, ‘return_search_terms’);
?>
AnonymousInactive
Good day,
I’ve been using your plugin on a site we’re developing to sell photos: http://flex.gelderlander.nl/regiobeeld/
The plugin seems to work fine when it can find results (though the string saying how many products are displayed isn’t updated).
However, when it can’t find any results, say when you fill in a load of garble for a title, it doesn’t seem to display a notification that nothing was found. It just lists the entire content of our product database.
Is there a WooCommerce template I should be using instead of archive-product.php?
The jQuery selector I’ve used for the results container is ‘ul.products’.
AnonymousInactive
Hey, thanks again, and sorry to bother you, one question about this, in order to update the plug in we must update wordpress and woocomerce to the latest version as well?
The issue is that it does not show there is an available update, we´re thinking its because we have old versions of wordpress and woocommerce…
thanks, regards
AnonymousInactive
Hello, thanks for your response…
let me explain a little bit more, we have our product data base in woocommerce, and we want to be able to search by stock…
yes, we went into the post meta tab,and selected meta key “_stock” “in stock” (the one you mentioned before) does not appear as an option
thanks
Can you explain more what you have done
Did you goto the post meta tab? Or did you add a field?
What were the various values/configuration you entered?
I think with the _stock
variable – you have to set its value equal (=) to instock
if you are using woocommerce.
Thanks
AnonymousInactive
Extra info: Ultimate Taxonomy manager breaks the permalinks of Woocommerce. I found another one that did the trick and is better maintained: CPT UI (Custom Post Types UI).
Your plugin works like a charm!
Best regards and you may put this one on Resolved!
🙂 and thanks for the review
AnonymousInactive
Hi Ross, SOLVED! I used <?php echo do_shortcode(‘[searchandfilter id=”2726″]’); ?>
And now it displays the searchform all the time.
Best regards, Janno
Hey Janno
In this case you must put the search form on the product archive page… so place the shortcode in your theme file (archive-product.php) above the results!
To add a shortcode to a themefile you just wrap it in a functions and possibly php tags:
<?php do_shortcode('[searchandfilter id="99"]'); ?>
Thanks for the kind words.
AnonymousInactive
Hi Ross, I’m lost. For some reason Woocommerce is displaying the Products on the ‘Products’ page but it doesn’t show the searchwidget. I tried many things to get it solved. But I’m missing something.
My customer wants to have the search/filter on top of the page with the results below. Moving the searchform to an widget is no option.
What am I doing wrong?
BTW your support is outstanding, I’ll put a nice review for you!