From 0891bf1d3113f90f042f1da199a75902246dbab2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 25 Sep 2025 03:32:18 +0000 Subject: [PATCH 1/3] Initial plan From 8e3f69c9648899962d7c9b7fe147f2ba8fe67960 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 25 Sep 2025 03:34:24 +0000 Subject: [PATCH 2/3] Initial analysis complete - creating implementation plan Co-authored-by: bookernath <8922457+bookernath@users.noreply.github.com> --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 4e3f8f486..c59d4cfc5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -12,7 +12,7 @@ "eslint-plugin-mdx": "^2.0.5" }, "engines": { - "node": ">= 14.0.0" + "node": ">= 18.0.0" } }, "node_modules/@babel/code-frame": { From c2291e9eddfb8f50f29192c4914ac1acdf1a0652 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 25 Sep 2025 03:39:48 +0000 Subject: [PATCH 3/3] Add notices about Checkout URLs being superior for direct checkout and multiple products Co-authored-by: bookernath <8922457+bookernath@users.noreply.github.com> --- docs/storefront/cart-checkout/guide/add-to-cart-url.mdx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/storefront/cart-checkout/guide/add-to-cart-url.mdx b/docs/storefront/cart-checkout/guide/add-to-cart-url.mdx index d08c914b9..8cf68af67 100644 --- a/docs/storefront/cart-checkout/guide/add-to-cart-url.mdx +++ b/docs/storefront/cart-checkout/guide/add-to-cart-url.mdx @@ -12,6 +12,10 @@ URLs constructed with these parameters allow you to: * Add a specific product or SKU to the cart * Add a specific SKU to the cart and go directly to checkout. + + **Consider Checkout URLs for direct checkout workflows:** If your primary goal is to load the checkout directly with products, [Checkout URLs](/docs/storefront/cart-checkout/checkout-url) are typically a better solution. Unlike Add to Cart URLs, Checkout URLs support adding multiple products in a single URL and provide a more streamlined checkout experience. + + ## Parameters | **Type**| **Parameter** | **Description** | **Example** | @@ -49,6 +53,10 @@ Once constructed, a URL can be inserted directly as text or as an HTML link: The `sku` and `product_id` parameters accept a single value; you can only use the first value of a comma-separated list of values. In other words, only one product can be added for each request made to an add to cart URL. However, it's possible to combine several HTTP requests into a single button click using front-end JavaScript, as long as your code waits to receive the response of your first request before it makes a second. + + **For multiple products:** [Checkout URLs](/docs/storefront/cart-checkout/checkout-url) natively support adding multiple products in a single URL without requiring JavaScript workarounds. + + The following gives a very basic example using jQuery. You can also use async/await syntax to make a series of calls from within a `for` loop. ```html showLineNumbers copy