Foxy Forum Status

We're no longer responding to questions via our forum, but we will keep it up for historical reasons. If you can't find the answer you're looking for, please visit our knowledge base or contact us. If there's enough interest in the future, we may bring the forum back.

recommendations on site search for foxycart / foxyshop / wordpress?

patrickpitmanpatrickpitman Member
in Site Showcase edited July 2012
Hi, can anyone recommend their preferred solution to an onsite keyword search feature, on a wordpress platform?

Imagine using Foxy-shop.com's plugin and then wanting to offer custoemrs of a retail ecommerce website the option to search for products by keyword? What plugins or add-ons or 3rd party hosted site search options are people liking these days?

I say this with the presumption that WordPress isn't out-of-the-box a good enough site search solution for an ecommerce shopping environment with content in the Wordpress site that is a mix of many articles and many products to buy.
Comments
  • sparkwebsparkweb Member, Integration Developer, FoxyShop, Order Desk
    By default WordPress searches the Title and post content. If you look at the yoursite.com/product-search/ there's a template there for searching only products. If you want to search more than just the product, though (custom fields, etc) it gets much more complicated and crazy.
  • I recently noticed the same problem. Skipping the more complicated search aspects, a decent product catalog-only search can be added as a widget via a text widget with this shortcode:
    add_shortcode('foxyshop_searchbox',
      function ($atts, $content = null) {
        ob_start();
        ?>
          <form class="searchform" action="<?php bloginfo("url"); ?>/product-search/" method="get">
          <table><tr><td><input type="text" name="search" value="" /></td>
          <td><button type="submit" name="submitsearch" id="submitsearch">Search</button></td>
          </tr></table>
          </form>
        <?php
        $html = ob_get_contents();
        ob_end_clean();
    
        return $html;
      }
    );
    

    Then, in the product-search template, remove the same form code, add a headline at the top, and you have a great search page.
  • fc_adamfc_adam FoxyCart Team
    @scottdky,

    Thanks for posting your solution!
Sign In or Register to comment.