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.

  1. Create an account at the Client Dashboard
  2. Install the WordPress plugin
  3. Connect your WooCommerce store
  4. Sync your products
  5. Add the search widget to your site

Installation

Method 1: WordPress Admin

  1. Download the plugin ZIP from the Client Dashboard
  2. Go to WordPress Admin → Plugins → Add New → Upload Plugin
  3. Upload the ZIP file and click "Install Now"
  4. Activate the plugin

Method 2: FTP Upload

  1. Extract the ZIP file
  2. Upload the cgb-visual-search folder to /wp-content/plugins/
  3. Activate from WordPress Admin → Plugins

Configuration

After activation, go to CGB Visual Search in your WordPress admin menu.

  1. Login — Use your CGB account credentials
  2. Connect WooCommerce — Click the connect button; this generates API keys automatically
  3. Sync Products — Click "Sync Products" to index your store catalog
Note: Product syncing may take a few minutes for large catalogs. Images are processed into AI embeddings for visual matching.

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

EndpointMethodDescription
POST /auth/registerPOSTRegister new client account
POST /auth/loginPOSTLogin with email & password
POST /auth/googlePOSTLogin with Google OAuth token

Search

EndpointMethodDescription
POST /searchPOSTSearch by image (multipart)
POST /search/base64POSTSearch by base64 image
GET /search/widget-configGETGet widget configuration

Products

EndpointMethodDescription
GET /productsGETList products (paginated)
GET /products/countGETGet 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.

EventEndpoint
Product CreatedPOST /webhook/{store_id}/product-created
Product UpdatedPOST /webhook/{store_id}/product-updated
Product DeletedPOST /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.