=== FtlCommerce - Instant Product Search ===
Contributors: sakurapixel
Tags: product search, woocommerce, fuzzy search, ajax search, live search
Requires at least: 6.4
Tested up to: 6.9
Stable tag: 1.0.0
Requires PHP: 8.2
License: GPL-3.0-only
License URI: https://www.gnu.org/licenses/gpl-3.0.txt

Lightning-fast, client-side fuzzy search for WooCommerce products. Zero server delays, instant results, advanced filtering.

== Description ==

[Home](https://sakuraleaf.com/products/ftlcommerce-instant-product-search-for-woocommerce) | [Showcase](https://sakuraleaf.com/showcase/fusecommerce) | [Docs](https://sakuraleaf.com/showcase/fusecommerce/documentation/)

FtlCommerce transforms your WooCommerce store with instant, client-side product search powered by fuzzy matching algorithms. No server roundtrips, no waiting - just blazing-fast search results as you type.

= Key Features =

* **Instant Search** - Client-side fuzzy search with zero server delays
* **Smart Matching** - Find products even with typos or partial matches
* **Advanced Filters** - Filter by categories, tags, attributes, and price ranges
* **Customizable** - Control search sensitivity, weights, and display options
* **Simple Integration** - Add search functionality with a single shortcode
* **Optimized Performance** - Efficient indexing system for large product catalogs
* **Developer Friendly** - Configurable via shortcode attributes

= How It Works =

FtlCommerce creates an optimized index of your WooCommerce products and delivers it to the client browser. Search operations happen entirely client-side using fuzzy matching, providing instant results without server requests.

The plugin uses advanced indexing to minimize payload size while maintaining search accuracy across product names, descriptions, categories, tags, and custom attributes.

= Perfect For =

* Stores with large product catalogs
* Mobile-friendly shopping experiences
* Sites requiring fast, responsive search
* Stores with similar product names

= Pro Features =

Upgrade to FtlCommerce Pro to unlock powerful performance enhancements and premium shopping experiences:

* **All Free Features** – Everything included in the free version, plus advanced capabilities
* **Up to 80% Increase in Performance** – Client-side product caching reduces server load and bandwidth
* **Client-side Caching** – Store the product index in browser localStorage/IndexedDB for faster subsequent loads
* **Smart JSON Payload Optimisation** – Reduce index file size by up to 60% with relative image URLs, relative permalinks, and out-of-stock exclusion
* **Zero Server Requests** – After the initial index load, no additional server calls are needed for search or filtering
* **Auto-Index on Product Changes** – Automatically re-index when products are added, edited, or deleted
* **Product Quick View** – Preview full product details, select variations, and add to cart from a modal window
* **Smart Change Tracking** – Intelligent detection of product, category, tag, and settings changes with automatic batched re-indexing
* **Quick Add to Cart** – Add simple products directly to cart from product cards
* **Cart Icon & Counter** – Display a shopping cart icon with a real-time item counter using the `[ftlcommerce_cart_icon]` shortcode
* **Stock Availability & Exclusion** – Exclude out-of-stock products from the index and prevent unavailable purchases
* **Advanced AJAX Cart Integration** – Secure AJAX endpoints for cart operations, product details, and real-time cart updates
* **Enhanced UX** – Premium UI with quick view modals, interactive galleries, smooth animations, and professional transitions


== Installation ==

= Automatic Installation =

1. Log in to your site admin panel
2. Navigate to Plugins > Add New
3. Search for "FtlCommerce"
4. Click "Install Now" and then "Activate"
5. Go to FtlCommerce settings to configure and index your products

= Manual Installation =

1. Download the plugin ZIP file
2. Log in to your site admin panel
3. Navigate to Plugins > Add New > Upload Plugin
4. Choose the downloaded ZIP file and click "Install Now"
5. Click "Activate Plugin"
6. Go to FtlCommerce settings to configure and index your products

= After Activation =

1. Navigate to FtlCommerce in your admin menu
2. Click "Start Indexing" to create the product search index
3. Configure filters and search settings as needed
4. Add the shortcode `[ftlcommerce]` to any page or post
5. Optionally add `[ftlcommerce_cart_icon]` to display a cart icon that updates in real time
6. Your instant search is ready to use

== Frequently Asked Questions ==

= Does this work with WooCommerce? =

Yes, FtlCommerce requires WooCommerce to be installed and activated. It indexes WooCommerce products and provides search functionality for your store.

= How do I add the search to my site? =

Simply add the shortcode `[ftlcommerce]` to any page, post, or widget area where you want the search interface to appear. You can also use `[ftlcommerce_cart_icon]` to display a cart icon that listens to cart updates. This can be placed in a menu item as well (Appearance > Menu > Custom Link).

= Can I customize the search behavior? =

Yes, the shortcode accepts multiple parameters:
* `fuse_threshold` - Search sensitivity (0.0 to 1.0, lower = stricter)
* `fuse_name_weight` - Priority weight for product names
* `fuse_short_description_weight` - Priority weight for descriptions
* `initial_products_load_no` - Number of products to show initially
* `load_more_products_no` - Products to load when clicking "Load More"
* `free_search_debounce_delay` - Delay before search triggers (milliseconds)

Example: `[ftlcommerce fuse_threshold="0.3" initial_products_load_no="20"]`

= Will this slow down my site? =

No. The search operates entirely client-side after the initial index loads. Server performance is not impacted during search operations.

= How often should I re-index products? =

You should re-index when you add, update, or remove products. You can manually trigger indexing from the FtlCommerce settings page, or it can run via cron.

= Does it support product variations? =

Yes, FtlCommerce indexes all product types including simple products, variable products, and their variations.

= What languages are supported? =

FtlCommerce supports all languages and automatically handles diacritics (accented characters) for better international search results.

= Does this plugin include third-party libraries? =

Yes. This plugin includes the following open-source libraries:
* Fuse.js v7.1.0 - Licensed under Apache License 2.0
* Bootstrap v5.3.8 - Licensed under MIT License
* Toastr v2.1.4 - Licensed under MIT License

All libraries are used in compliance with their respective licenses.

== Screenshots ==

1. Frontend filter woocommerce products
2. Frontend - mobile view filter product list
3. Quick view product
4. Admin settings

== Changelog ==

= 1.0.0 =
* Initial release
* Client-side fuzzy search with Fuse.js
* Product indexing system
* Advanced filtering (categories, tags, attributes, price)
* Customizable shortcode
* Admin settings panel
* Automatic and manual indexing options

== Upgrade Notice ==

= 1.0.0 =
Initial release of FtlCommerce - Instant Product Search for WooCommerce.

== Credits ==

FtlCommerce uses the following third-party open-source libraries:

* **Fuse.js** (v7.1.0) - Lightweight fuzzy-search library
  License: Apache License 2.0
  Website: https://fusejs.io
  Copyright: Kiro Risk

* **Bootstrap** (v5.3.8) - Frontend component library
  License: MIT License
  Website: https://getbootstrap.com
  Copyright: The Bootstrap Authors

* **Toastr** (v2.1.4) - Notification library
  License: MIT License
  Website: https://github.com/CodeSeven/toastr
  Copyright: John Papa, Hans Fjällemark, and Tim Ferrell

All third-party libraries are included in compliance with their respective licenses and are used without modification to their license terms.