@acromedia/gesso-shopware
8.3.0
Minor Changes
-
2ccc25a: Implement Shopware authentication (
useAuth).@acromedia/gesso-shopwarereplaces theuseAuthstub with the full auth surface on Shopware's public Store API account routes:login(POST /account/login, thenPOST /account/customer),logout,password.passwordResetEmail(recovery-password), andpassword.passwordReset(recovery-password-confirm). Login returns the rotatedsw-context-tokenon the customer asoptions.accessToken— the same slot BigCommerce uses for its customer access token, and the fieldGessoAuthOptionscopies onto the next-auth JWT — so a login performed server-side insideauthorizecarries its Store API session forward. Logout drops thegesso-sw-contextcookie so the next visit opens a clean guest session. Adds the optionalshopwareRecoveryStorefrontUrlandcookieNameconfig keys.@acromedia/gesso-shopware-middlewareadds theexistsaction — an Admin-API account-exists probe (GET /api/middleware/shopware/exists?email=) that answers with the bare customer id or a 404, backinguseAuth.existsand next-auth'sGessoAdapter.getUserByEmail. It returns only the id, so an email-keyed probe cannot expose a customer's name, addresses, or order history.getContextTokennow also reads the token from the JWT'saccessTokenkey, whereGessoAuthOptionsstores it by default.
Patch Changes
-
6b9207e: Checkout now lists only shipping methods that are actually available — the
onlyAvailableflag was being sent in the request body, where Shopware ignores it; it belongs in the query string.Store API calls made through the exported
storeClient/StoreApiClientare now type-checked against the real operation contracts (they were silentlyanybefore). If your app invokes the client directly, previously-compiling calls with invalid bodies or operation names will surface type errors on upgrade — each one is a request Shopware was already rejecting or ignoring at runtime. -
Updated dependencies [53f7971]
- @acromedia/gesso-core@8.3.0
8.2.0
Minor Changes
- 43dcc1a: fix useProductSearch implementation. Return all products when no category or keyword is passed.
- 43dcc1a: Register the visitor as a guest customer when no authenticated session - Shopware
Patch Changes
- Updated dependencies [8afcce4]
- @acromedia/gesso-core@8.2.2
8.1.0
Minor Changes
-
0d108e1: feat: checkout hook with order placement and payment redirect
Implement the Shopware checkout against the Store API, satisfying the
@acromedia/gesso-commerceuseCheckoutcontract. Both checkout modes ship behind one hook, branching on the payment response at runtime:placeOrderrunsPOST /store-api/checkout/orderthenPOST /store-api/handle-payment(withorderId+finishUrl/errorUrl) and branches on the responseredirectUrl—nullis a sync/on-site method (invoice/COD) that goes straight to confirmation; a string is an async/off-site method (PayPal/card) that the hook redirects out to and that returns the shopper atfinishUrl/errorUrl.redirectedCheckoutis derived from the runtime response, never hard-assumed.getcomposes the pre-placement order context from the active cart, enriched with the sales-channel's available payment and shipping methods.- Billing/shipping/payment selection is applied to the sales-channel context via
PATCH /store-api/context; address creation and guest registration remain with the customer/auth hooks. - New config:
shopwareCheckoutFinishUrl,shopwareCheckoutErrorUrl, and anonCheckoutRedirectnavigator (defaults towindow.location.assign). - Vitest specs with MSW fixtures covering order placement and both branches of the payment-handling step.
-
0d108e1: shopware orders plugin
-
0d108e1: feat: cart lifecycle hook and server getter
Implement the full Shopware cart against the Store API (
/store-api/checkout/cartand/checkout/cart/line-item):useCartsatisfying the@acromedia/gesso-commercecontract —get(create-on-read),add,update, andremove— wired through both the client hook and the SSRgetCartgetter.- Promotions are applied as Shopware promotion line items
(
add(code, qty, { type: 'promotion' })) and removed by line-item id; applied promotions are surfaced undercart.data.promotions. - A Shopware→Gesso cart normalizer producing
itemsplus summaryadjustments(quantity/subtotal/discount/total). - The rotating
sw-context-tokenis preserved across mutations via the shared Store API client, so a guest cart survives subsequent reads and mutations. - Vitest specs with MSW fixtures covering the lifecycle (including promotions and context-token rotation), plus opt-in live-sandbox checks.
-
0d108e1: GESSO-2428-feat: add Shopware 6 commerce plugin
New
@acromedia/gesso-shopwarepackage implementing the@acromedia/gesso-commercehook surface (useCatalog,useProduct,useProductSearch,useFacet,useCart,useCustomer,useCheckout,useOrders,useAuth) on top of Shopware's REST Store API (/store-api).- The read paths —
useCatalog,useProduct,useProductSearch,useFacet— are implemented. The write paths (useCart,useCustomer,useCheckout,useOrders,useAuth) are present as typed stubs and land in follow-up tickets. - Talks to the Store API through the official
@shopware/api-clientSDK (pinned), wrapped in a thinStoreApiClient— mirroring howgesso-shopifywraps@shopify/graphql-client. Hooks call its fully-typedinvoke(...), and request/response types come from the SDK's bundledstore-api-types. - Reads connection settings from
gesso.config.json(generated from.envvia the plugin CLI): requiresshopwareStorefrontUrland the public sales-channelsw-access-key; optionalshopwareCurrencyCode,shopwareLanguageId,shopwareCurrencyId, andshopwareRootCategoryId. - Captures the rotated
sw-context-tokenvia the SDK'sonContextChangedhook and persists it through a pluggableContextTokenStore— a cookie in the browser, a no-op (anonymous) on the server, and injectable for request-scoped SSR. - Ships as an ESM-only package built with
tsc; unit-tested with Vitest (Store API mocked with MSW).
- The read paths —
-
0d108e1: feat: catalog, product, search and faceted navigation
Implement the storefront catalog surface for the Shopware plugin:
useProduct/useCatalog/useProductSearch/useFacethooks satisfying the@acromedia/gesso-commercecontracts, surfaced through the SSR getters (getProduct/getCatalog/getProductSearch).- A Criteria translator mapping Gesso keyword/sort/page/facet/price inputs onto Shopware listing criteria (
order/p/limit/manufacturer/properties/min-price/max-price), adding facet filtering and cursor-based pagination to search and category listings. - A Shopware→Gesso normalizer for products, categories and listing aggregations.
- Vitest specs with MSW fixtures, plus opt-in live-sandbox smoke tests.
Patch Changes
- Updated dependencies [cd5a6d5]
- @acromedia/gesso-core@8.2.1