CGB Visual Search Documentation
Getting Started
CGB Visual Search lets your WooCommerce customers search products using images. Upload a photo and our AI finds matching products in your store.
- Create an account at the Client Dashboard
- Install the WordPress plugin
- Connect your WooCommerce store
- Sync your products
- Add the search widget to your site
Installation
Method 1: WordPress Admin
- Download the plugin ZIP from the Client Dashboard
- Go to
WordPress Admin → Plugins → Add New → Upload Plugin - Upload the ZIP file and click "Install Now"
- Activate the plugin
Method 2: FTP Upload
- Extract the ZIP file
- Upload the
cgb-visual-searchfolder to/wp-content/plugins/ - Activate from WordPress Admin → Plugins
Configuration
After activation, go to CGB Visual Search in your WordPress admin menu.
- Login — Use your CGB account credentials
- Connect WooCommerce — Click the connect button; this generates API keys automatically
- Sync Products — Click "Sync Products" to index your store catalog
Shortcode Widget
Add the visual search widget to any page or post using the shortcode:
[cgb_visual_search]
This creates a drag-and-drop upload area with search results displayed below.
Floating Search Bar
The floating search bar appears as a camera icon on every page of your store. Customers click it to open a search modal.
To disable the floating bar, go to CGB Visual Search settings in WordPress admin and uncheck "Enable Floating Search Bar".
API Reference
Base URL: https://your-server.com/api/v1
Authentication
| Endpoint | Method | Description |
|---|---|---|
POST /auth/register | POST | Register new client account |
POST /auth/login | POST | Login with email & password |
POST /auth/google | POST | Login with Google OAuth token |
Search
| Endpoint | Method | Description |
|---|---|---|
POST /search | POST | Search by image (multipart) |
POST /search/base64 | POST | Search by base64 image |
GET /search/widget-config | GET | Get widget configuration |
Products
| Endpoint | Method | Description |
|---|---|---|
GET /products | GET | List products (paginated) |
GET /products/count | GET | Get total & indexed count |
Webhooks
When you connect WooCommerce, webhooks are automatically registered for product create, update, and delete events. This keeps your search index in sync.
| Event | Endpoint |
|---|---|
| Product Created | POST /webhook/{store_id}/product-created |
| Product Updated | POST /webhook/{store_id}/product-updated |
| Product Deleted | POST /webhook/{store_id}/product-deleted |
FAQ
How accurate is the visual search?
We use OpenAI's CLIP model (ViT-B-32) which provides excellent visual understanding. Accuracy depends on product image quality and catalog size.
What image formats are supported?
JPEG, PNG, WebP, and GIF are supported. Images are automatically resized for processing.
Does it work with variable products?
Yes, each product variation with a unique image is indexed separately.
Can I use it on multiple stores?
Each subscription is tied to one WooCommerce store. Contact us for multi-store plans.