Dprime Ajax Search v1.5.0 WooCommerce

Live AJAX product search for WooCommerce. Results appear as customers type, no page reload. Keyboard navigable with thumbnail, price, and SKU.

Installation

  1. Install and activate WooCommerce first.
  2. Download Dprime Ajax Search from my.dprime.au and install via Plugins > Add New > Upload Plugin.
  3. Activate. Configure defaults in Dprime > Ajax Search > Settings.
  4. Drop [dprime_ajax_search] anywhere on your site.

Shortcode

With no attributes, uses your saved Settings values:

[dprime_ajax_search]

Override per instance:

[dprime_ajax_search placeholder="Search products..." limit="6" show_sku="yes" button_icon="yes"]
AttributeValuesDefault
placeholderany textSettings value
button_textany textSettings value
button_iconyes / noSettings value
limit1 to 12Settings value
show_imageyes / noSettings value
show_priceyes / noSettings value
show_skuyes / noSettings value

Settings

The Settings tab sets the default values used by every shortcode instance that does not provide its own attributes. Changes here do not affect instances that override an attribute explicitly.

CSS classes

ClassElement
.vh-ajax-searchOutermost wrapper
.vh-ajax-search-formThe form element
.vh-ajax-search-inputThe text input
.search-submitSubmit button
.search-submit--iconAdded when icon mode is on
.is-openAdded to wrapper when dropdown is visible
.vh-ajax-search-panelFloating results dropdown
.vh-ajax-search-itemSingle result row
.is-activeKeyboard-highlighted result
.vh-ajax-search-thumbProduct image in result
.vh-ajax-search-titleProduct name in result
.vh-ajax-search-skuSKU beneath product name
.vh-ajax-search-pricePrice in result
.vh-ajax-search-view-allView all results link
.vh-ajax-search-loadingLoading state
.vh-ajax-search-emptyNo results state

FAQ

Can I have multiple search bars on one page?

Yes. Each shortcode instance is independent. They can have different settings via shortcode attributes and they do not interfere with each other.

The search returns no results for a product I know exists.

The plugin searches published products only. Check the product is Published in WooCommerce, not in Draft or Private. Also check the product has a name or SKU that matches what was typed.

Does it work if WooCommerce is deactivated?

The shortcode silently returns nothing rather than breaking the page. Your page layout stays intact.

Override classes (admin UI)

.dp-as-page              { /* outer page wrapper */ }
/* Frontend shortcode */
.vh-ajax-search           { /* wrapper */ }
.vh-ajax-search-input     { }
.vh-ajax-search-panel     { }
.vh-ajax-search-item      { }
.vh-ajax-search-price     { }