跳到主要内容
版本:1.x

Products Search and Filtering

Finding the right products quickly is essential for efficient point-of-sale operations. WCPOS provides powerful search and filtering capabilities to help you locate products instantly, even with large inventories.

Product search and filtering interface

Product search and filtering interface in WCPOS

Unified Search Field

WCPOS features a single search field that simultaneously searches across multiple product attributes:

  • Product Name - Searches the product title and description
  • SKU - Matches product postmeta _sku field
  • Barcode - Searches configured barcode field, which can be any postmeta field. The legacy setting is _sku, but this will be changed to _global_unique_id in the future.

Simply type your search term into the "Search Products" field, and the POS will instantly filter results across all these fields.

Tokenized Search Technology

The search functionality uses the FlexSearch library with advanced tokenization capabilities:

  • Forward Tokenization - Matches partial words from the beginning (e.g., searching "blue" will find "blueberry")
  • Performance Optimized - Uses a performance preset for fast search results
  • Language Aware - Adapts to your store's configured language
  • Lazy Initialization - Optimizes memory usage by loading search indexes only when needed

How Search Works

When you type in the search field, the POS:

  1. Tokenizes your input into searchable terms
  2. Searches locally stored product data first for instant results
  3. Queries the server if no local matches are found, then downloads and stores new products for future searches
  4. Updates results in real-time as you type

This approach ensures fast search performance while progressively building a complete local product database.

Product Filtering

Filter Bar

Below the search field, you'll find interactive filter toggles and dropdown menus that allow you to narrow down products by specific criteria.

Available Filters

Stock Status

Filter products based on their inventory status:

  • In Stock - Products with available inventory
  • Out of Stock - Products with zero inventory
  • Backorder - Products available for backorder

Toggle to show only products marked as "Featured" in your WooCommerce store.

On Sale Products

Filter to display only products currently on sale or with active discounts.

Category

Use the category dropdown to filter products by their assigned product categories. This helps you quickly find products within specific departments or product lines.

Tag

Filter by product tags to find items with specific attributes or characteristics you've defined in your WooCommerce store.

Using Filters

  • Toggle Filters - Click any filter button to activate it (active filters appear highlighted)
  • Multiple Filters - You can combine multiple filters to narrow your search further
  • Clear Filters - Click an active filter again to deactivate it
  • Search + Filter - Use filters together with the search field for precise product location

Barcode Configuration

Search Fields

The search functionality automatically includes your configured barcode field. The barcode field used for searching depends on your POS settings configuration.

F.A.Q.

What is the _global_unique_id field for barcodes?

The _global_unique_id field is a new barcode field that WooCommerce recently added to provide better barcode standardization across stores.

Key Points:

  • Modern Standard: This field was designed specifically for global barcode identification
  • POS Configuration: You can configure the POS to use _global_unique_id as the barcode field in the POS settings
  • Legacy vs. New: The legacy barcode setting uses the _sku field, but this will change to _global_unique_id in future versions
  • Flexibility: You can configure any product meta field as your barcode field if you're using third-party barcode plugins
  • Future Default: _global_unique_id will become the default barcode field in future POS updates

To configure which field the POS uses for barcodes, visit your POS settings in the WordPress admin area.

Why don't I see all my products when I search?

WCPOS uses progressive product downloading to maintain performance. If you don't see a product:

  1. Try searching for it - This will trigger the POS to look for it on your server
  2. Wait for download - The POS will download the product and others in small batches
  3. Search again - Once downloaded, the product will appear in future searches

This process ensures your POS remains fast and responsive even with thousands of products. Learn more about this in our Product Synchronisation guide.

Can I search for partial product names or SKUs?

Yes! The tokenized search uses forward matching, which means:

  • Searching "blue" will find products with "blueberry", "blue shirt", etc.
  • Searching "ABC" will find SKUs like "ABC123", "ABC-XYZ", etc.
  • You don't need to type complete words or codes

The search is designed to find products quickly with minimal typing.