@liquidcommerce/elements-sdk 2.6.0-beta.86 → 2.6.0-beta.87
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/dist/index.checkout.esm.js +7046 -7042
- package/dist/index.esm.js +11453 -11451
- package/dist/types/utils/product.d.ts +5 -0
- package/docs/v1/guides/product-component.md +10 -2
- package/package.json +1 -1
|
@@ -7,4 +7,9 @@ export interface IPrepareApiProductForStoreParams {
|
|
|
7
7
|
retailers: IProductAvailabilityResponse['retailers'];
|
|
8
8
|
enableShippingFulfillment: boolean;
|
|
9
9
|
}
|
|
10
|
+
export declare function buildSizeLabel(size: {
|
|
11
|
+
size: string;
|
|
12
|
+
pack: boolean;
|
|
13
|
+
packDesc: string;
|
|
14
|
+
}): string;
|
|
10
15
|
export declare function prepareApiProductForStore({ context, product, retailers, enableShippingFulfillment, }: IPrepareApiProductForStoreParams): IProductStore | IPLProductStore;
|
|
@@ -165,10 +165,18 @@ Use the `lce_size` query parameter to preselect a size when the product page loa
|
|
|
165
165
|
https://yoursite.com/products/buffalo-trace?lce_size=750ml
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
- The value is
|
|
169
|
-
- Matching is case-insensitive and ignores
|
|
168
|
+
- The value is compared against each size's full label as shown on the page.
|
|
169
|
+
- Matching is case-insensitive and ignores spacing and punctuation — only letters, digits, and decimal points are compared — so `750 ML`, `750ml`, and `750ML` all select a `750ml` size, while decimals are kept so `1.0L` and `1.75L` stay distinct.
|
|
170
170
|
- If the value matches no size, the default size selection is used.
|
|
171
171
|
|
|
172
|
+
**Pack sizes:** the label includes the pack description when present (e.g. `50 ML (12PK)`). To select that size, include the pack in the value:
|
|
173
|
+
|
|
174
|
+
```
|
|
175
|
+
https://yoursite.com/products/mini-bottles?lce_size=50ml(12pk)
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Both `50ml(12pk)` and `50ml12pk` match `50 ML (12PK)` (punctuation is ignored). A value of just `50ml` only matches a size whose label is `50 ML` with no pack.
|
|
179
|
+
|
|
172
180
|
`lce_size` is a fixed parameter name (not configured through a script attribute) and only applies to the product page.
|
|
173
181
|
|
|
174
182
|
### Fulfillment Types
|
package/package.json
CHANGED