@base44/app-plugin-commerce 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base44/app-plugin-commerce",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Base44 Commerce plugin — entities, backend functions, shared commerce engine, admin UI and the commerce skill, shipped as copyable source",
5
5
  "keywords": [
6
6
  "base44",
@@ -117,8 +117,8 @@ batch (above).
117
117
 
118
118
  | Topic | Open when | Size |
119
119
  |---|---|---|
120
- | [`install/01-install.md`](./install/01-install.md) | installing — routes you to 02 and 03 | 5K |
121
- | [`install/02-storefront.md`](./install/02-storefront.md) | building storefront pages | 34K |
120
+ | [`install/01-install.md`](./install/01-install.md) | installing — routes you to 02 and 03 | 6K |
121
+ | [`install/02-storefront.md`](./install/02-storefront.md) | building storefront pages | 35K |
122
122
  | [`install/03-data.md`](./install/03-data.md) | seeding catalog, shipping rates/zones, payments; re-callable per slice | 11K |
123
123
  | [`docs/entities.md`](./docs/entities.md) | any direct entity read/write ("which entity holds X") | 11K |
124
124
  | [`references/catalog-rendering.md`](./references/catalog-rendering.md) | field shapes each catalog call returns, variant edge cases | 16K |
@@ -7,7 +7,7 @@ carry_forward:
7
7
  - "Admin enforcement is three layers — AuthGuard (UI), admin-only entity RLS, requireAdmin() in every admin function. Never weaken any of them."
8
8
  - "/order-received must exist as a route: every payment link returns there, and confirming is what marks an order paid."
9
9
  - "The storefront header shows a visible \"Store manager\" link to /store-admin when the signed-in user's role is admin, and nothing for everyone else."
10
- - "Interleave: start image generation first → mount admin + build the storefront while images render → seed when the URLs are back → payments last."
10
+ - "Interleave: start image generation first → mount admin + build the storefront while images render → seed when the real image_url values are back (never the /__generating__/ placeholder) → payments last."
11
11
  - "Entities are dotted + bracket-syntax only (`base44.entities[\"commerce.X\"]`); the map is ../docs/entities.md — never scan base44/entities/."
12
12
  ---
13
13
 
@@ -24,6 +24,9 @@ carry_forward:
24
24
  Image generation is the slowest step and nothing depends on it until seed time; the storefront doesn't wait on live data either.
25
25
 
26
26
  1. **Start image generation first** — every product image, before anything else.
27
+ ⚑ The tool hands back a `/__generating__/…` placeholder immediately and the real
28
+ `image_url` only when it finishes. Never write the placeholder into a file or a
29
+ seed payload: it resolves to nothing and ships a broken image.
27
30
  2. **Mount the admin (below) and build the storefront** while images render. Every
28
31
  request and response shape the pages build against is written out in
29
32
  [`./02-storefront.md`](./02-storefront.md), so they are written from the docs,
@@ -116,7 +116,7 @@ import { useProductList, useCategories, useStoreInfo, useFormatMoney, productPri
116
116
 
117
117
  A card can render `name`, `productImages(row)[0]`, `productPrice(row, { formatMoney }).label` (already "From €19.99" when the product sells variants — there is no product `type` flag, and `product.price` alone is a rolled-up from-price), `on_sale`, `short_description`, `stock_status`, `average_rating`/`rating_count`, `productRibbons(row)`, `productSpecs(row)`. ⚑ **Images and ribbons are objects, either may be empty** — render your placeholder, never a broken `<img>` or a raw object. Field matrix: [`../references/catalog-rendering.md`](../references/catalog-rendering.md). That list is an inventory, not a card design and not an order to render in. An even grid of identical cards, each carrying the same name/price/stars trio, is where a generated store lands by default and almost never where this catalog belongs: give the grid a rhythm (a hero piece spanning two columns, an editorial break between rows, a denser tile for a large catalog), and lead each card with the one or two fields *these* products are judged on — carat weight, focal length, edition size, ABV — read off `productSpecs(row)`, not the fields every store shows.
118
118
 
119
- ⚑ **Ribbons belong in both views** — grid and product page. They are the merchant's own merchandising ("Limited", "Last pieces"), and each links to its filtered listing (`/collection?ribbon_id=<id>`). `productRibbons(row)` hands you `{id, name}` **objects** — render `r.name`, key the link on `r.id`; the entry itself in JSX is React's "Objects are not valid as a React child". Never render a bare "Ribbons:" label with nothing after it.
119
+ ⚑ **Ribbons belong in both views** — grid and product page. They are the merchant's own merchandising ("Limited", "Last pieces"), and each links to its filtered listing (`/collection?ribbon_id=<id>`). `productRibbons(row)` hands you `{id, name}` **objects** — render `r.name`, key the link on `r.id`; the entry itself in JSX is React's "Objects are not valid as a React child". Never render a bare "Ribbons:" label with nothing after it. ⚑ **A ribbon link inside a card that is itself a link nests `<a>` in `<a>`** — invalid HTML, and React warns. In the grid, either render the ribbons as plain labels, or link the card's image and title instead of wrapping the whole card; keep the links on the product page.
120
120
 
121
121
  **Rails** (featured row, "new in") are the same hook with a filter (`{ featured: true, per_page: 4 }`) — `featured` is the merchant's own flag, so the rail stays curated store data instead of hardcoded slugs. ⚑ Any filter may legitimately match nothing — render *nothing* then, never a heading over an empty row.
122
122