Support » Plugin: FoxyShop » [Plugin: FoxyShop] Customizing the search template

  • Resolved coding4fun

    (@coding4fun)


    Hello,
    The search template has a place to enter a string, and the search results return products that contain that string. My first question is: How do you search by category? My second question is: say I have product variations on some items, such as “size” with S,M,L. How can I search for all smalls? These would be drop downs.

    Finally, this would need to work together – I’m searching in the category “skirts” for all “smalls” and I’m getting the correct and total results.

    Hope you can help!

    http://wordpress.org/extend/plugins/foxyshop/

Viewing 1 replies (of 1 total)
  • Plugin Author sparkweb

    (@sparkweb)

    This will take some customized coding. I’d recommend that you look at customposttype.php around lines 206-215 for some code to make a dropdown of all categories. In your actual product search you would do something like "product_categories" => YOURSEARCHVALUE. That may take some tweaking.

    The variation is a little trickier. It’s stored as a custom field and it’s all serialized inside of _variations so you could search for a custom field with the name _variations that contains a value “small” or something like that.

    WordPress search is not too customizable so if you can’t get it working you might have to roll a custom query using $wpdb.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: FoxyShop] Customizing the search template’ is closed to new replies.