@shoppexio/storefront 1.0.91 → 1.0.92
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/CHANGELOG.md +6 -0
- package/dist/index.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.92
|
|
4
|
+
|
|
5
|
+
- `CartQuoteLine.product_title` and `CartQuoteLine.variant_title`: the catalog's names for the product and the option (`variant_title` is `null` for a product with no options), the names the invoice line carries. `product_title` is the base-language title; a storefront that shows translated titles keeps its own. Both are absent on servers older than these fields.
|
|
6
|
+
- `updateCartItem(lineId, { variant_title })` writes the option name a settled quote restates (the write used to be a silent no-op); `null` clears it. The line keeps its `line_id`.
|
|
7
|
+
- The server refuses a cart or invoice line that names no option of a product with options with `errors.checkout.variant_required`. Send the buyer to the product page to pick an option; never add the default option for them.
|
|
8
|
+
|
|
3
9
|
## 1.0.91
|
|
4
10
|
|
|
5
11
|
- A customer call the server completed but whose answer it withheld (`error_code: "RESPONSE_CONTRACT_VIOLATION"` on a 2xx) is returned as a failure with `code: "RESPONSE_CONTRACT_VIOLATION"`, not as an empty success or a contract mismatch. On a money call (`redeemLoyaltyPoints`, wallet and reseller top-ups) re-read the account and show that; do not report a failure and do not send the call again. The headless customer client (`@shoppexio/storefront/customer`) throws `HeadlessCustomerError` with the same `code`.
|
package/dist/index.cjs
CHANGED
|
@@ -2593,6 +2593,10 @@ function updateCartItem(lineId, updates) {
|
|
|
2593
2593
|
if (updates.pay_what_you_want_price !== void 0) {
|
|
2594
2594
|
cart[index].pay_what_you_want_price = updates.pay_what_you_want_price;
|
|
2595
2595
|
}
|
|
2596
|
+
if (updates.variant_title !== void 0) {
|
|
2597
|
+
if (updates.variant_title === null) delete cart[index].variant_title;
|
|
2598
|
+
else cart[index].variant_title = updates.variant_title;
|
|
2599
|
+
}
|
|
2596
2600
|
if (updates.max_quantity !== void 0) {
|
|
2597
2601
|
if (updates.max_quantity === null) delete cart[index].max_quantity;
|
|
2598
2602
|
else cart[index].max_quantity = updates.max_quantity;
|