You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/content/docs/anatomy/pages/pdp.mdx
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,8 @@ The PDP runs under Next.js 16 Cache Components. Base product data is fetched thr
14
14
15
15
The dynamic input is the selected option values in `searchParams`. The route starts the cached base-product read and a compact `getProductSelection()` request in parallel. Selection responses use `cache: "no-store"` so variant combinations do not consume persistent runtime-cache entries. `ProductDetailSection` receives both as promises and keeps variant-dependent regions in Suspense boundaries without creating a request waterfall.
16
16
17
+
Suspense streaming is reserved for regions a selection can actually change. The base product carries exact signals that let everything else render in the prerendered shell: when `priceRange` and `compareAtPriceRange` bounds are equal (`hasUniformPricing`) the price renders eagerly, when `variantsCount` is `1` the option pickers and buy buttons render eagerly, and when `encodedVariantExistence` equals `encodedVariantAvailability` (`allVariantsInStock`) the buy-button fallback renders with real labels instead of placeholders. A simple product therefore ships its price and buy controls in the static HTML; only products with genuinely variant-dependent prices or stock stream those regions.
18
+
17
19
## Variant selection
18
20
19
21
Variants are selected via option-name query parameters:
Copy file name to clipboardExpand all lines: packages/plugin/template-rollout-log/2026-06-05-modern-shopify-product-model.md
+9-7Lines changed: 9 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,7 +71,8 @@ Shopify's bundle model adds relationships at both product-variant and cart-line
71
71
## Adoption notes
72
72
73
73
-`ProductDetails.variants` is now a representative selectable set, not an exhaustive export. Use `ProductDetails.variantsCount` for the exact count and `getProductSelection()` to resolve a choice.
74
-
- Do not infer uniform pricing, uniform stock, or single-variant status from `ProductDetails.variants`; the old `hasUniformPricing()` and `hasUniformStock()` helpers are removed.
74
+
- Do not infer uniform pricing, uniform stock, or single-variant status from `ProductDetails.variants`. Use the exact signals instead: `ProductDetails.hasUniformPricing` (equal `priceRange` and `compareAtPriceRange` bounds), `ProductDetails.allVariantsInStock` (`encodedVariantExistence` equals `encodedVariantAvailability`), and `ProductDetails.variantsCount === 1`.
75
+
- Keep the eager PDP paths these signals enable: uniform-price products render the price in the prerendered shell, single-variant products render options and buy buttons eagerly, and uniform-stock products render a labeled buy-button fallback. Selection-dependent Suspense streaming is only for regions selection can actually change.
75
76
-`ProductVariant` gains `productHandle`, `requiresComponents`, `components`, and `bundleParents`.
76
77
-`CartLine` gains nested `components`, `canRemove`, and `canUpdateQuantity`.
77
78
-`Cart.cost.totalTaxAmount` is removed because Shopify deprecated it in Storefront API 2025-01.
@@ -89,9 +90,10 @@ Shopify's bundle model adds relationships at both product-variant and cart-line
89
90
3. Change a Combined Listing option and confirm the URL can move to the selected child product handle.
90
91
4. Open a Liquid `/products/:handle?variant=:id` link and confirm it permanently redirects to the matching option-name URL.
91
92
5. Confirm a selected-option PDP starts the base-product and selection operations in parallel and that only the base product uses persistent caching.
92
-
6. Open a fixed bundle PDP and confirm its component products render and the bundle can be added.
93
-
7. Open a component product and confirm bundles returned by `groupedBy` render.
94
-
8. Confirm bundle components remain grouped in the cart and line controls honor Shopify's instructions.
95
-
9. Confirm a customized bundle parent without selected components cannot be added directly.
96
-
10. Ask the shopping agent to select options on a high-variant product and confirm it calls `resolveProductVariant` before `addToCart`.
0 commit comments