Home / Help Center / pos-app-garment / garment / Dealer Portal
🏪 garment

Dealer Portal

Dealer Portal creates a named, shareable catalog link per dealer or retailer — optionally restricted to a single product category — so they can browse your product catalog without logging in, using the same public catalog page your WhatsApp catalog sharing uses.

📍 Menu path: /garment/dealer-portal
👤 Who uses it: Owner,Manager

Overview

Each dealer entry stores a Dealer/Shop Name, Phone, Email, an optional Notes field, and an optional Category restriction (pulled live from your actual product categories); saving generates a unique catalog link containing a random token and, if set, the chosen category as a query parameter.

The generated link points at the app's existing public /#/catalog page — the same no-login product catalog page used elsewhere for WhatsApp catalog sharing — with the category filter applied via a category query parameter, plus a dealer query parameter carrying that dealer's token.

Every dealer record has a Copy (clipboard icon) button to copy its catalog link, an external-link icon to open it directly in a new tab, and a trash icon to remove the dealer entirely.

An info banner at the top of the page explains the intended usage in plain terms: give each dealer their own link, optionally scoped to one category, and share it via WhatsApp or email.

Before You Start

Step-by-Step Guide

1 Create a dealer catalog link

  1. Click Add Dealer.
  2. Enter Dealer / Shop Name * (required), Phone and Email.
  3. Optionally choose a category under Restrict to Category to scope the link to just that part of your catalog (e.g. "Kurtis" only), or leave it as "All categories".
  4. Add any Notes about this dealer/retailer relationship and click Create Portal Link — a unique catalog link is generated immediately.

2 Share a dealer's link

  1. Click Copy next to a dealer's link to copy the full URL to your clipboard, then paste it into a WhatsApp message or email to that dealer.
  2. Click the external-link icon to open the link yourself in a new tab and confirm it shows the right products before sending it out.

3 Remove a dealer

  1. Click the trash icon on a dealer entry and confirm to permanently remove that dealer and its link from your list.
💡 Removing a dealer here only deletes it from this browser's local list — see devNotes; it does not revoke or invalidate the link itself, since the public catalog page does not check the dealer token at all.

Every Field & Button, Explained

Field / ButtonWhat it does
Add DealerOpens the blank dealer creation form.
Dealer / Shop Name *Required label identifying the dealer or retailer.
PhoneOptional contact number, described as a WhatsApp number in the form.
EmailOptional contact email.
Restrict to CategoryOptional single-category filter applied to the generated catalog link; defaults to "All categories".
NotesFree-text notes about the dealer relationship.
Catalog link rowShows the full generated URL for that dealer in a monospace strip, with Copy, open-in-new-tab and Delete actions.
Copy buttonCopies that dealer's full catalog URL to the clipboard.
External-link iconOpens the catalog link in a new browser tab.
Delete (trash) iconRemoves the dealer entry from this browser's saved list after a confirmation prompt.

Tips & Best Practices

Troubleshooting & FAQ

All my dealer entries disappeared.
Dealer entries are stored only in this browser's local storage (key garment_dealer_portals), not on the server — clearing browser data, using a different browser, or switching computers will show an empty list even though previously-shared links may still work fine for the dealers who have them.
I deleted a dealer but the link I already sent them still works.
Deleting a dealer here only removes it from your local management list — the catalog page itself does not check or revoke the dealer token in the URL, so a previously shared link keeps working until you change your product catalog or category setup independently. There is currently no way to actually disable a specific dealer's access.
Does the dealer link show different products to different dealers beyond the category filter?
No — beyond the optional category restriction, every dealer link shows the same public product catalog; the dealer token in the URL is not read or enforced by the catalog page itself, so it currently has no effect on what is shown or on tracking which dealer opened the link.
The category dropdown is empty when adding a dealer.
It is populated live from your existing product categories — set up categories on your Products page first if none exist yet.

🧑‍💻 Developer Notes

Source component(s):

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

Backend endpoints used:

  • GET /products/categories

Related tables (db-core repositories):

  • None — dealer records are not persisted server-side at all

Redux slices:

  • None — persisted to browser localStorage under key garment_dealer_portals

Feature flag key: inventory

There is no garm-dealer-portal backend route, controller function, or DB table anywhere in the codebase — every dealer record (name, phone, email, category, notes, generated token) is created, listed and deleted entirely client-side via localStorage.getItem/setItem, and the only network call this page makes is GET /products/categories to populate the category dropdown. The generated catalog URL is `${origin}/#/catalog?category=&dealer=`, pointing at the existing public CatalogPage route (registered at "/catalog" in App.js). Crucially, CatalogSharePage/CatalogPage reads and applies the `category` query parameter but never reads or validates the `dealer` parameter at all — it is inert. This means the "dealer" concept here is purely a personal labelling and link-copying convenience local to the browser that created it: there is no server-side dealer identity, no way to see which dealer actually opened a link, no cross-device dealer list, and no real access control tied to the dealer token. A developer asked to make this "real" would need to add a backend table/endpoint for dealers and wire the catalog page to actually read and enforce the dealer token.