Home / Help Center / pos-app-garment / garment / Share Catalog
💬 garment

Share Catalog

Share Catalog is a one-screen helper that builds a link to your existing public product catalog — optionally filtered to one category — and opens WhatsApp with a ready-to-send message so customers can browse your stock from their phone.

📍 Menu path: /garment/catalog-share
👤 Who uses it: Owner,Manager,Staff

Overview

This page does not create or host anything new — it points at the same public catalog page every BazaarPOS store already has (the hash route #/catalog), and simply helps you construct the right URL and a friendly WhatsApp message around it.

On load it calls the public catalog endpoint once (GET /catalog/products?limit=1, the same endpoint the catalog page itself uses) purely to read back the list of categories available in your store, so you can offer a category filter chip row.

Picking a category does not filter anything server-side on this page — it only appends a ?category= query parameter to the generated catalog URL, which the public Catalog page itself reads and filters by when a customer opens the link.

The WhatsApp message textarea is pre-filled with a default message built from the category choice, but is fully editable; typing anything replaces the default, and a "Reset to default message" link appears whenever you have customised it.

Clicking "Share via WhatsApp" opens wa.me/?text=... with no destination number, so WhatsApp opens its contact/chat picker for you to choose who to send it to — it is not tied to any specific customer record.

Before You Start

Step-by-Step Guide

1 Share your whole catalog

  1. Open Share Catalog — "All Products" is selected by default.
  2. Review the Catalog Link box; it shows your store's current-page origin plus #/catalog with no filter.
  3. Click Share via WhatsApp to open WhatsApp with the default message and link pre-filled, then pick who to send it to.

2 Share one category only

  1. Click a category chip (e.g. "Sarees", "Kids Wear") under "Filter by Category" — chips are populated from whatever categories exist on your products.
  2. The Catalog Link box updates immediately to include ?category= for that category, and the default WhatsApp message updates to reference "our {category} collection".
  3. Click Share via WhatsApp or Copy Link as usual — the category filter carries through to whoever opens the link.

3 Copy the link instead of using WhatsApp

  1. Click Copy Link next to the Catalog Link box.
  2. The button confirms with a green "Copied!" state for two seconds; if the browser blocks clipboard access, a prompt dialog appears instead showing the link to copy manually.
  3. Paste the copied link into SMS, Instagram, email, or anywhere else you reach customers.

4 Customise the WhatsApp message

  1. Edit the WhatsApp Message textarea directly — your text replaces the auto-generated default entirely (the link itself is not automatically re-inserted into custom text, so keep the link if you still want it in the message).
  2. Click Reset to default message (shown only once you have typed something) to discard your edit and go back to the auto-generated message for the current category selection.

Every Field & Button, Explained

Field / ButtonWhat it does
Filter by Category chips"All Products" plus one chip per category returned by the store's catalog; selecting one narrows both the generated link and the default message text, but does not change anything on this page itself.
Catalog LinkRead-only preview of the link that will be shared: current page origin (up to any #) + #/catalog, with ?category= appended when a category is selected.
Copy LinkCopies the Catalog Link to the clipboard via the browser Clipboard API, falling back to a manual-copy prompt dialog if that API is unavailable or blocked.
WhatsApp MessageEditable textarea; shows the auto-generated default (varies by category selection) until you type your own text, which is then sent verbatim.
Reset to default messageOnly visible once you have edited the message; clears your custom text back to the auto-generated default.
Share via WhatsAppOpens https://wa.me/?text=<encoded message> in a new tab/window with no destination number set, so WhatsApp prompts you to choose a contact or group to send it to.

Tips & Best Practices

Troubleshooting & FAQ

No category chips are showing, only "All Products".
Category chips are populated from GET /catalog/products?limit=1, which only returns categories that currently exist on your products. Add categories to your products under Products, or use the link unfiltered.
Clicking Copy Link did nothing visible.
If the browser denies clipboard access (common on some in-app browsers), a prompt dialog opens instead showing the link for you to copy manually — check for that dialog rather than assuming the button failed silently.
The WhatsApp message doesn't include the link anymore.
Once you start typing in the message box your custom text fully replaces the auto-generated default, and the link is not re-inserted automatically — click "Reset to default message" or manually paste the Catalog Link back into your text.
Share via WhatsApp opened WhatsApp but nothing was pre-selected as the recipient.
This is expected — the button intentionally omits a destination phone number so you can choose any contact or group each time; it is not meant to message one saved customer automatically.
The category filter doesn't seem to filter anything when I open the link myself.
The filter only takes effect on the public Catalog page (#/catalog) that the link opens — it reads the category query parameter itself. If the category name in the link no longer matches an existing product category, the public page will simply show all products.

🧑‍💻 Developer Notes

Source component(s):

  • frontend-app/pos-app-garment/src/pages/garment/CatalogSharePage.jsx

Backend endpoints used:

  • GET /catalog/products?limit=1

Related tables (db-core repositories):

  • Product (read-only, via the public catalog endpoint)

Redux slices:

  • None — local component state only (useState)

Feature flag key: billing

There is no dedicated garment backend route for this page at all — it exists purely in the frontend and reuses the pre-existing public catalog infrastructure (CatalogPage.jsx in pos-react-lib, served at the #/catalog hash route, and its GET /catalog/products endpoint defined in backend/src/routes/catalog.routes.js). It is functionally a garment-branded, category-aware duplicate of the generic "Catalog Link + Copy + WhatsApp" block that already exists in Settings → Online Store (OnlineStoreTab.jsx) — that generic version links out via the store's configured WhatsApp Business number (wa.me/<number>) with no pre-filled text, whereas this garment page opens a numberless wa.me/?text= share sheet with a pre-filled, category-aware message. The category query param it appends is honoured by CatalogPage.jsx's getInitialParam('category') logic, so the two pieces are compatible even though they were built independently. The link is built from window.location.href up to any #, so it will silently reflect whatever domain/subdomain the shop happens to be logged into at the time — worth using the shop's canonical public domain rather than an internal/staging URL when sharing.