Skip to content

Support catalog variants and clarify cart totals - #1485

Open
sbolinger-godaddy wants to merge 4 commits into
godaddy:mainfrom
sbolinger-godaddy:catalog-product-variants
Open

sbolinger-godaddy wants to merge 4 commits into
godaddy:mainfrom
sbolinger-godaddy:catalog-product-variants

Conversation

@sbolinger-godaddy

@sbolinger-godaddy sbolinger-godaddy commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Why

Storefront code should keep working when a merchant changes products or checkout capabilities. Builders should not need to rewrite application code because a product has variants or because shipping, taxes, or discounts are enabled.

Catalog data is enough to render single-SKU and variant products dynamically. The draft-order cart is intentionally simpler: it shows a subtotal and leaves shipping, taxes, and discounts to hosted checkout, where the enabled providers perform the real calculations.

Checkout API does not yet discover those enabled providers through App Registry. Until it does, the builder must synchronize the capability flags during each initial build or rebuild so Checkout does not silently disable merchant features.

What this does

  • Supports single-SKU and variant products, preserving merchant-defined attribute order and filtering inactive products and SKUs.
  • Shows only Subtotal in the draft-order cart, followed by “Shipping, taxes, and discounts are calculated at checkout.”
  • Gives that message the stable commerce-cart-checkout-adjustments-note class so applications can hide it without changing the component.
  • Keeps the cart as a draft order and creates a checkout session only when the shopper selects Checkout.
  • Restores server-only GODADDY_CHECKOUT_CONFIGURATION support and explicitly applies its shipping, tax, and promotion flags to the checkout session.
  • Keeps checkout capability flags out of the browser /api/commerce/config response.
  • Documents the temporary build-time flow: call commerce_checkout_configuration_get, write only its three boolean capability flags to deployment configuration, and refresh them on rebuild.
  • Defaults all optional capabilities off when that configuration is missing, malformed, or unexpected, so a discovery problem does not prevent checkout creation.

The build-time flow is eventually consistent: provider changes take effect after the next rebuild. The intended long-term fix is for Checkout API to discover App Registry capabilities when it creates a session.

Verification

  • Commerce server: typecheck, lint, 160 tests, and production build pass.
  • Commerce storefront: typecheck, lint, 26 tests, and production build pass.

@sbolinger-godaddy
sbolinger-godaddy requested a review from a team as a code owner September 25, 2026 18:06
@changeset-bot

changeset-bot Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d96761a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@godaddy/commerce-server Patch
@godaddy/commerce-storefront Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant