@liquidcommerce/elements-sdk 2.6.0-beta.85 → 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.
@@ -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;
@@ -157,6 +157,28 @@ For products with multiple sizes:
157
157
  - Availability checking per size
158
158
  - Out-of-stock indication
159
159
 
160
+ #### Preselect a Size via URL
161
+
162
+ Use the `lce_size` query parameter to preselect a size when the product page loads:
163
+
164
+ ```
165
+ https://yoursite.com/products/buffalo-trace?lce_size=750ml
166
+ ```
167
+
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
+ - If the value matches no size, the default size selection is used.
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
+
180
+ `lce_size` is a fixed parameter name (not configured through a script attribute) and only applies to the product page.
181
+
160
182
  ### Fulfillment Types
161
183
 
162
184
  Two fulfillment options:
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "LiquidCommerce Elements SDK",
4
4
  "license": "UNLICENSED",
5
5
  "author": "LiquidCommerce Team",
6
- "version": "2.6.0-beta.85",
6
+ "version": "2.6.0-beta.87",
7
7
  "homepage": "https://docs.liquidcommerce.co/elements-sdk",
8
8
  "repository": {
9
9
  "type": "git",