@teleporthq/teleport-plugin-next-data-source 0.43.67 → 0.43.68

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.
Files changed (202) hide show
  1. package/__tests__/array-overlap-sql.test.ts +53 -0
  2. package/__tests__/blog-post-page-enrichment.test.ts +214 -0
  3. package/__tests__/browser-row-policy.test.ts +503 -0
  4. package/__tests__/data-source-cache-wrapping.test.ts +18 -2
  5. package/__tests__/ecommerce-product-options.test.ts +206 -0
  6. package/__tests__/ecommerce-product-pages.test.ts +82 -0
  7. package/__tests__/ecommerce-product-pre-options.golden.json +505 -0
  8. package/__tests__/ecommerce-product-storefront-contract.test.ts +293 -0
  9. package/__tests__/ecommerce-product-subscriptions.test.ts +121 -0
  10. package/__tests__/fetchers.test.ts +2 -2
  11. package/__tests__/items-path.test.ts +150 -0
  12. package/__tests__/product-options-storefront.fixture.json +2510 -0
  13. package/__tests__/product-page-url-fixtures.json +25 -0
  14. package/__tests__/product-price-sort.ts +4 -2
  15. package/__tests__/raw-rows-mode.test.ts +111 -0
  16. package/__tests__/rest-api-response-cache.test.ts +434 -0
  17. package/__tests__/table-read-route-protected-tables.test.ts +493 -0
  18. package/dist/cjs/array-overlap-sql.d.ts +21 -0
  19. package/dist/cjs/array-overlap-sql.d.ts.map +1 -0
  20. package/dist/cjs/array-overlap-sql.js +25 -0
  21. package/dist/cjs/array-overlap-sql.js.map +1 -0
  22. package/dist/cjs/data-source-fetchers.d.ts.map +1 -1
  23. package/dist/cjs/data-source-fetchers.js +10 -4
  24. package/dist/cjs/data-source-fetchers.js.map +1 -1
  25. package/dist/cjs/fetchers/javascript.d.ts.map +1 -1
  26. package/dist/cjs/fetchers/javascript.js +1 -1
  27. package/dist/cjs/fetchers/javascript.js.map +1 -1
  28. package/dist/cjs/fetchers/postgresql.d.ts +1 -1
  29. package/dist/cjs/fetchers/postgresql.d.ts.map +1 -1
  30. package/dist/cjs/fetchers/postgresql.js +8 -4
  31. package/dist/cjs/fetchers/postgresql.js.map +1 -1
  32. package/dist/cjs/fetchers/raw-query.d.ts +8 -1
  33. package/dist/cjs/fetchers/raw-query.d.ts.map +1 -1
  34. package/dist/cjs/fetchers/raw-query.js +42 -4
  35. package/dist/cjs/fetchers/raw-query.js.map +1 -1
  36. package/dist/cjs/fetchers/rest-api.d.ts.map +1 -1
  37. package/dist/cjs/fetchers/rest-api.js +7 -2
  38. package/dist/cjs/fetchers/rest-api.js.map +1 -1
  39. package/dist/cjs/fetchers/teleport.d.ts.map +1 -1
  40. package/dist/cjs/fetchers/teleport.js +8 -5
  41. package/dist/cjs/fetchers/teleport.js.map +1 -1
  42. package/dist/cjs/fetchers/utils/browser-row-policy.d.ts +43 -0
  43. package/dist/cjs/fetchers/utils/browser-row-policy.d.ts.map +1 -0
  44. package/dist/cjs/fetchers/utils/browser-row-policy.js +66 -0
  45. package/dist/cjs/fetchers/utils/browser-row-policy.js.map +1 -0
  46. package/dist/cjs/fetchers/utils/request-sql-guards.d.ts +8 -0
  47. package/dist/cjs/fetchers/utils/request-sql-guards.d.ts.map +1 -0
  48. package/dist/cjs/fetchers/utils/request-sql-guards.js +12 -0
  49. package/dist/cjs/fetchers/utils/request-sql-guards.js.map +1 -0
  50. package/dist/cjs/fetchers/utils/rest-api-response-cache.d.ts +40 -0
  51. package/dist/cjs/fetchers/utils/rest-api-response-cache.d.ts.map +1 -0
  52. package/dist/cjs/fetchers/utils/rest-api-response-cache.js +64 -0
  53. package/dist/cjs/fetchers/utils/rest-api-response-cache.js.map +1 -0
  54. package/dist/cjs/fetchers/utils/table-access-guard.d.ts +23 -0
  55. package/dist/cjs/fetchers/utils/table-access-guard.d.ts.map +1 -0
  56. package/dist/cjs/fetchers/utils/table-access-guard.js +34 -0
  57. package/dist/cjs/fetchers/utils/table-access-guard.js.map +1 -0
  58. package/dist/cjs/items-path.d.ts +10 -0
  59. package/dist/cjs/items-path.d.ts.map +1 -0
  60. package/dist/cjs/items-path.js +86 -0
  61. package/dist/cjs/items-path.js.map +1 -0
  62. package/dist/cjs/localized-columns.d.ts.map +1 -1
  63. package/dist/cjs/localized-columns.js +13 -0
  64. package/dist/cjs/localized-columns.js.map +1 -1
  65. package/dist/cjs/pagination-plugin.d.ts.map +1 -1
  66. package/dist/cjs/pagination-plugin.js +17 -5
  67. package/dist/cjs/pagination-plugin.js.map +1 -1
  68. package/dist/cjs/transformations/blog-adjacent-posts.d.ts +16 -0
  69. package/dist/cjs/transformations/blog-adjacent-posts.d.ts.map +1 -0
  70. package/dist/cjs/transformations/blog-adjacent-posts.js +25 -0
  71. package/dist/cjs/transformations/blog-adjacent-posts.js.map +1 -0
  72. package/dist/cjs/transformations/blog-comments.d.ts +30 -0
  73. package/dist/cjs/transformations/blog-comments.d.ts.map +1 -0
  74. package/dist/cjs/transformations/blog-comments.js +34 -0
  75. package/dist/cjs/transformations/blog-comments.js.map +1 -0
  76. package/dist/cjs/transformations/blog-post.d.ts +2 -0
  77. package/dist/cjs/transformations/blog-post.d.ts.map +1 -1
  78. package/dist/cjs/transformations/blog-post.js +4 -1
  79. package/dist/cjs/transformations/blog-post.js.map +1 -1
  80. package/dist/cjs/transformations/ecommerce-product.d.ts +9 -1
  81. package/dist/cjs/transformations/ecommerce-product.d.ts.map +1 -1
  82. package/dist/cjs/transformations/ecommerce-product.js +28 -1
  83. package/dist/cjs/transformations/ecommerce-product.js.map +1 -1
  84. package/dist/cjs/transformations/heading-anchors.d.ts +25 -0
  85. package/dist/cjs/transformations/heading-anchors.d.ts.map +1 -0
  86. package/dist/cjs/transformations/heading-anchors.js +29 -0
  87. package/dist/cjs/transformations/heading-anchors.js.map +1 -0
  88. package/dist/cjs/transformations/index.d.ts +47 -4
  89. package/dist/cjs/transformations/index.d.ts.map +1 -1
  90. package/dist/cjs/transformations/index.js +56 -18
  91. package/dist/cjs/transformations/index.js.map +1 -1
  92. package/dist/cjs/transformations/shared-utils.d.ts.map +1 -1
  93. package/dist/cjs/transformations/shared-utils.js +1 -1
  94. package/dist/cjs/transformations/shared-utils.js.map +1 -1
  95. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  96. package/dist/cjs/utils.d.ts.map +1 -1
  97. package/dist/cjs/utils.js +1 -1
  98. package/dist/cjs/utils.js.map +1 -1
  99. package/dist/esm/array-overlap-sql.d.ts +21 -0
  100. package/dist/esm/array-overlap-sql.d.ts.map +1 -0
  101. package/dist/esm/array-overlap-sql.js +21 -0
  102. package/dist/esm/array-overlap-sql.js.map +1 -0
  103. package/dist/esm/data-source-fetchers.d.ts.map +1 -1
  104. package/dist/esm/data-source-fetchers.js +11 -5
  105. package/dist/esm/data-source-fetchers.js.map +1 -1
  106. package/dist/esm/fetchers/javascript.d.ts.map +1 -1
  107. package/dist/esm/fetchers/javascript.js +1 -1
  108. package/dist/esm/fetchers/javascript.js.map +1 -1
  109. package/dist/esm/fetchers/postgresql.d.ts +1 -1
  110. package/dist/esm/fetchers/postgresql.d.ts.map +1 -1
  111. package/dist/esm/fetchers/postgresql.js +8 -4
  112. package/dist/esm/fetchers/postgresql.js.map +1 -1
  113. package/dist/esm/fetchers/raw-query.d.ts +8 -1
  114. package/dist/esm/fetchers/raw-query.d.ts.map +1 -1
  115. package/dist/esm/fetchers/raw-query.js +42 -4
  116. package/dist/esm/fetchers/raw-query.js.map +1 -1
  117. package/dist/esm/fetchers/rest-api.d.ts.map +1 -1
  118. package/dist/esm/fetchers/rest-api.js +7 -2
  119. package/dist/esm/fetchers/rest-api.js.map +1 -1
  120. package/dist/esm/fetchers/teleport.d.ts.map +1 -1
  121. package/dist/esm/fetchers/teleport.js +8 -5
  122. package/dist/esm/fetchers/teleport.js.map +1 -1
  123. package/dist/esm/fetchers/utils/browser-row-policy.d.ts +43 -0
  124. package/dist/esm/fetchers/utils/browser-row-policy.d.ts.map +1 -0
  125. package/dist/esm/fetchers/utils/browser-row-policy.js +60 -0
  126. package/dist/esm/fetchers/utils/browser-row-policy.js.map +1 -0
  127. package/dist/esm/fetchers/utils/request-sql-guards.d.ts +8 -0
  128. package/dist/esm/fetchers/utils/request-sql-guards.d.ts.map +1 -0
  129. package/dist/esm/fetchers/utils/request-sql-guards.js +8 -0
  130. package/dist/esm/fetchers/utils/request-sql-guards.js.map +1 -0
  131. package/dist/esm/fetchers/utils/rest-api-response-cache.d.ts +40 -0
  132. package/dist/esm/fetchers/utils/rest-api-response-cache.d.ts.map +1 -0
  133. package/dist/esm/fetchers/utils/rest-api-response-cache.js +59 -0
  134. package/dist/esm/fetchers/utils/rest-api-response-cache.js.map +1 -0
  135. package/dist/esm/fetchers/utils/table-access-guard.d.ts +23 -0
  136. package/dist/esm/fetchers/utils/table-access-guard.d.ts.map +1 -0
  137. package/dist/esm/fetchers/utils/table-access-guard.js +29 -0
  138. package/dist/esm/fetchers/utils/table-access-guard.js.map +1 -0
  139. package/dist/esm/items-path.d.ts +10 -0
  140. package/dist/esm/items-path.d.ts.map +1 -0
  141. package/dist/esm/items-path.js +58 -0
  142. package/dist/esm/items-path.js.map +1 -0
  143. package/dist/esm/localized-columns.d.ts.map +1 -1
  144. package/dist/esm/localized-columns.js +13 -0
  145. package/dist/esm/localized-columns.js.map +1 -1
  146. package/dist/esm/pagination-plugin.d.ts.map +1 -1
  147. package/dist/esm/pagination-plugin.js +17 -5
  148. package/dist/esm/pagination-plugin.js.map +1 -1
  149. package/dist/esm/transformations/blog-adjacent-posts.d.ts +16 -0
  150. package/dist/esm/transformations/blog-adjacent-posts.d.ts.map +1 -0
  151. package/dist/esm/transformations/blog-adjacent-posts.js +21 -0
  152. package/dist/esm/transformations/blog-adjacent-posts.js.map +1 -0
  153. package/dist/esm/transformations/blog-comments.d.ts +30 -0
  154. package/dist/esm/transformations/blog-comments.d.ts.map +1 -0
  155. package/dist/esm/transformations/blog-comments.js +30 -0
  156. package/dist/esm/transformations/blog-comments.js.map +1 -0
  157. package/dist/esm/transformations/blog-post.d.ts +2 -0
  158. package/dist/esm/transformations/blog-post.d.ts.map +1 -1
  159. package/dist/esm/transformations/blog-post.js +4 -1
  160. package/dist/esm/transformations/blog-post.js.map +1 -1
  161. package/dist/esm/transformations/ecommerce-product.d.ts +9 -1
  162. package/dist/esm/transformations/ecommerce-product.d.ts.map +1 -1
  163. package/dist/esm/transformations/ecommerce-product.js +29 -2
  164. package/dist/esm/transformations/ecommerce-product.js.map +1 -1
  165. package/dist/esm/transformations/heading-anchors.d.ts +25 -0
  166. package/dist/esm/transformations/heading-anchors.d.ts.map +1 -0
  167. package/dist/esm/transformations/heading-anchors.js +25 -0
  168. package/dist/esm/transformations/heading-anchors.js.map +1 -0
  169. package/dist/esm/transformations/index.d.ts +47 -4
  170. package/dist/esm/transformations/index.d.ts.map +1 -1
  171. package/dist/esm/transformations/index.js +56 -18
  172. package/dist/esm/transformations/index.js.map +1 -1
  173. package/dist/esm/transformations/shared-utils.d.ts.map +1 -1
  174. package/dist/esm/transformations/shared-utils.js +1 -1
  175. package/dist/esm/transformations/shared-utils.js.map +1 -1
  176. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  177. package/dist/esm/utils.d.ts.map +1 -1
  178. package/dist/esm/utils.js +1 -1
  179. package/dist/esm/utils.js.map +1 -1
  180. package/package.json +5 -5
  181. package/src/array-overlap-sql.ts +41 -0
  182. package/src/data-source-fetchers.ts +41 -5
  183. package/src/fetchers/javascript.ts +9 -1
  184. package/src/fetchers/postgresql.ts +37 -10
  185. package/src/fetchers/raw-query.ts +60 -5
  186. package/src/fetchers/rest-api.ts +27 -5
  187. package/src/fetchers/teleport.ts +37 -13
  188. package/src/fetchers/utils/browser-row-policy.ts +212 -0
  189. package/src/fetchers/utils/request-sql-guards.ts +25 -0
  190. package/src/fetchers/utils/rest-api-response-cache.ts +188 -0
  191. package/src/fetchers/utils/table-access-guard.ts +39 -0
  192. package/src/items-path.ts +74 -0
  193. package/src/localized-columns.ts +13 -0
  194. package/src/pagination-plugin.ts +29 -7
  195. package/src/transformations/blog-adjacent-posts.ts +74 -0
  196. package/src/transformations/blog-comments.ts +132 -0
  197. package/src/transformations/blog-post.ts +38 -5
  198. package/src/transformations/ecommerce-product.ts +568 -5
  199. package/src/transformations/heading-anchors.ts +85 -0
  200. package/src/transformations/index.ts +165 -22
  201. package/src/transformations/shared-utils.ts +6 -0
  202. package/src/utils.ts +26 -4
@@ -0,0 +1,2510 @@
1
+ {
2
+ "about": "Product-options storefront fields, shared byte for byte by teleport-gui (apps/gui/app/project-page/features/e-commerce/utils/product-options/__tests__/fixtures/product-options-storefront.fixture.json, run through packages/renderer/src/utils/ecommerce-products.ts) and teleport-code-generators (packages/teleport-plugin-next-data-source/__tests__/product-options-storefront.fixture.json, run through the generated product transform). Each case is a raw product row, its variant combinations (null = not looked up), the storefront tax rate, the request language and whether the product is the details page's single product; expected holds every product-options field both transforms must emit. Change both copies together.",
3
+ "cases": [
4
+ {
5
+ "name": "worked print example on its details page",
6
+ "includeDetail": true,
7
+ "taxRate": 0,
8
+ "currentLanguage": null,
9
+ "mainLanguage": null,
10
+ "variants": null,
11
+ "record": {
12
+ "id": "print",
13
+ "name": "print",
14
+ "slug": "print",
15
+ "price": 10,
16
+ "currency": "USD",
17
+ "created_at": "2026-01-01T00:00:00.000Z",
18
+ "updated_at": "2026-01-01T00:00:00.000Z",
19
+ "option_groups": "[{\"key\": \"size\", \"label\": \"Size\", \"type\": \"choice\", \"required\": true, \"values\": [{\"key\": \"a5\", \"label\": \"A5\", \"price\": {\"mode\": \"none\"}, \"default\": true}, {\"key\": \"a4\", \"label\": \"A4\", \"price\": {\"mode\": \"fixed\", \"amount\": 4}}, {\"key\": \"a3\", \"label\": \"A3\", \"price\": {\"mode\": \"fixed\", \"amount\": 9}}]}, {\"key\": \"paper\", \"label\": \"Paper\", \"type\": \"choice\", \"display\": \"cards\", \"required\": true, \"values\": [{\"key\": \"matte\", \"label\": \"Matte\", \"description\": \"Soft, no glare\", \"price\": {\"mode\": \"none\"}, \"default\": true, \"imageUrl\": \"https://cdn.example.com/matte.jpg\"}, {\"key\": \"glossy\", \"label\": \"Glossy\", \"price\": {\"mode\": \"fixed\", \"amount\": 3}, \"imageUrl\": \"TQ_unknown_asset\", \"priceWhen\": [{\"groupKey\": \"size\", \"valueKeys\": [\"a4\"], \"price\": {\"mode\": \"fixed\", \"amount\": 5}}, {\"groupKey\": \"size\", \"valueKeys\": [\"a3\"], \"price\": {\"mode\": \"fixed\", \"amount\": 8}}]}, {\"key\": \"fine-art\", \"label\": \"Fine-art\", \"price\": {\"mode\": \"percent\", \"percent\": 40}}]}, {\"key\": \"photo\", \"label\": \"Your photo\", \"type\": \"upload\", \"required\": true, \"accept\": \"image\", \"helpText\": \"At least 2000 px wide\"}, {\"key\": \"message\", \"label\": \"Message\", \"type\": \"text\", \"required\": false, \"maxLength\": 120, \"placeholder\": \"For Ana\"}]"
20
+ },
21
+ "expected": {
22
+ "hasProductOptions": "true",
23
+ "optionsRequireInput": "true",
24
+ "optionsQuickAdd": "false",
25
+ "optionGroups": [
26
+ {
27
+ "id": "print|size",
28
+ "key": "size",
29
+ "label": "Size",
30
+ "helpText": "",
31
+ "placeholder": "",
32
+ "unit": "",
33
+ "required": "true",
34
+ "isChoice": "true",
35
+ "isMulti": "false",
36
+ "isText": "false",
37
+ "isLongText": "false",
38
+ "isNumber": "false",
39
+ "isToggle": "false",
40
+ "isUpload": "false",
41
+ "isButtons": "true",
42
+ "isSwatches": "false",
43
+ "isCards": "false",
44
+ "isSelectable": "true",
45
+ "isInput": "false",
46
+ "initiallyVisible": "true",
47
+ "cellRole": "radio",
48
+ "rowRole": "radiogroup",
49
+ "rowRequired": "true",
50
+ "idleTabIndex": "-1",
51
+ "inputType": "",
52
+ "inputMode": "",
53
+ "maxLengthText": "",
54
+ "minText": "",
55
+ "maxText": "",
56
+ "stepText": "",
57
+ "defaultValueText": "",
58
+ "rangeHint": "",
59
+ "acceptKind": "",
60
+ "acceptMime": "",
61
+ "priceVariants": [],
62
+ "headerPriceVariants": [],
63
+ "hiddenKey": "hide:print|size",
64
+ "shownKey": "show:print|size",
65
+ "missingKey": "miss:print|size",
66
+ "invalidKey": "inv:print|size",
67
+ "rejectedKey": "rej:print|size",
68
+ "failedKey": "fail:print|size",
69
+ "uploadedKey": "up:print|size",
70
+ "uploadingKey": "load:print",
71
+ "freshKey": "fresh:print",
72
+ "values": [
73
+ {
74
+ "id": "print|size|a5",
75
+ "key": "a5",
76
+ "label": "A5",
77
+ "description": "",
78
+ "color": "",
79
+ "imageUrl": "",
80
+ "isDefault": "true",
81
+ "showSwatch": "false",
82
+ "showImage": "false",
83
+ "selectedKey": "sel:print|size|a5",
84
+ "freshKey": "fresh:print",
85
+ "priceVariants": [
86
+ {
87
+ "activeKey": "pv:print|size|a5|d",
88
+ "label": "",
89
+ "isInitial": "true",
90
+ "freshKey": "fresh:print"
91
+ }
92
+ ]
93
+ },
94
+ {
95
+ "id": "print|size|a4",
96
+ "key": "a4",
97
+ "label": "A4",
98
+ "description": "",
99
+ "color": "",
100
+ "imageUrl": "",
101
+ "isDefault": "false",
102
+ "showSwatch": "false",
103
+ "showImage": "false",
104
+ "selectedKey": "sel:print|size|a4",
105
+ "freshKey": "fresh:print",
106
+ "priceVariants": [
107
+ {
108
+ "activeKey": "pv:print|size|a4|d",
109
+ "label": "+$4.00",
110
+ "isInitial": "true",
111
+ "freshKey": "fresh:print"
112
+ }
113
+ ]
114
+ },
115
+ {
116
+ "id": "print|size|a3",
117
+ "key": "a3",
118
+ "label": "A3",
119
+ "description": "",
120
+ "color": "",
121
+ "imageUrl": "",
122
+ "isDefault": "false",
123
+ "showSwatch": "false",
124
+ "showImage": "false",
125
+ "selectedKey": "sel:print|size|a3",
126
+ "freshKey": "fresh:print",
127
+ "priceVariants": [
128
+ {
129
+ "activeKey": "pv:print|size|a3|d",
130
+ "label": "+$9.00",
131
+ "isInitial": "true",
132
+ "freshKey": "fresh:print"
133
+ }
134
+ ]
135
+ }
136
+ ]
137
+ },
138
+ {
139
+ "id": "print|paper",
140
+ "key": "paper",
141
+ "label": "Paper",
142
+ "helpText": "",
143
+ "placeholder": "",
144
+ "unit": "",
145
+ "required": "true",
146
+ "isChoice": "true",
147
+ "isMulti": "false",
148
+ "isText": "false",
149
+ "isLongText": "false",
150
+ "isNumber": "false",
151
+ "isToggle": "false",
152
+ "isUpload": "false",
153
+ "isButtons": "false",
154
+ "isSwatches": "false",
155
+ "isCards": "true",
156
+ "isSelectable": "true",
157
+ "isInput": "false",
158
+ "initiallyVisible": "true",
159
+ "cellRole": "radio",
160
+ "rowRole": "radiogroup",
161
+ "rowRequired": "true",
162
+ "idleTabIndex": "-1",
163
+ "inputType": "",
164
+ "inputMode": "",
165
+ "maxLengthText": "",
166
+ "minText": "",
167
+ "maxText": "",
168
+ "stepText": "",
169
+ "defaultValueText": "",
170
+ "rangeHint": "",
171
+ "acceptKind": "",
172
+ "acceptMime": "",
173
+ "priceVariants": [],
174
+ "headerPriceVariants": [],
175
+ "hiddenKey": "hide:print|paper",
176
+ "shownKey": "show:print|paper",
177
+ "missingKey": "miss:print|paper",
178
+ "invalidKey": "inv:print|paper",
179
+ "rejectedKey": "rej:print|paper",
180
+ "failedKey": "fail:print|paper",
181
+ "uploadedKey": "up:print|paper",
182
+ "uploadingKey": "load:print",
183
+ "freshKey": "fresh:print",
184
+ "values": [
185
+ {
186
+ "id": "print|paper|matte",
187
+ "key": "matte",
188
+ "label": "Matte",
189
+ "description": "Soft, no glare",
190
+ "color": "",
191
+ "imageUrl": "https://cdn.example.com/matte.jpg",
192
+ "isDefault": "true",
193
+ "showSwatch": "false",
194
+ "showImage": "true",
195
+ "selectedKey": "sel:print|paper|matte",
196
+ "freshKey": "fresh:print",
197
+ "priceVariants": [
198
+ {
199
+ "activeKey": "pv:print|paper|matte|d",
200
+ "label": "",
201
+ "isInitial": "true",
202
+ "freshKey": "fresh:print"
203
+ }
204
+ ]
205
+ },
206
+ {
207
+ "id": "print|paper|glossy",
208
+ "key": "glossy",
209
+ "label": "Glossy",
210
+ "description": "",
211
+ "color": "",
212
+ "imageUrl": "",
213
+ "isDefault": "false",
214
+ "showSwatch": "false",
215
+ "showImage": "false",
216
+ "selectedKey": "sel:print|paper|glossy",
217
+ "freshKey": "fresh:print",
218
+ "priceVariants": [
219
+ {
220
+ "activeKey": "pv:print|paper|glossy|0",
221
+ "label": "+$5.00",
222
+ "isInitial": "false",
223
+ "freshKey": "fresh:print"
224
+ },
225
+ {
226
+ "activeKey": "pv:print|paper|glossy|1",
227
+ "label": "+$8.00",
228
+ "isInitial": "false",
229
+ "freshKey": "fresh:print"
230
+ },
231
+ {
232
+ "activeKey": "pv:print|paper|glossy|d",
233
+ "label": "+$3.00",
234
+ "isInitial": "true",
235
+ "freshKey": "fresh:print"
236
+ }
237
+ ]
238
+ },
239
+ {
240
+ "id": "print|paper|fine-art",
241
+ "key": "fine-art",
242
+ "label": "Fine-art",
243
+ "description": "",
244
+ "color": "",
245
+ "imageUrl": "",
246
+ "isDefault": "false",
247
+ "showSwatch": "false",
248
+ "showImage": "false",
249
+ "selectedKey": "sel:print|paper|fine-art",
250
+ "freshKey": "fresh:print",
251
+ "priceVariants": [
252
+ {
253
+ "activeKey": "pv:print|paper|fine-art|d",
254
+ "label": "+40%",
255
+ "isInitial": "true",
256
+ "freshKey": "fresh:print"
257
+ }
258
+ ]
259
+ }
260
+ ]
261
+ },
262
+ {
263
+ "id": "print|photo",
264
+ "key": "photo",
265
+ "label": "Your photo",
266
+ "helpText": "At least 2000 px wide",
267
+ "placeholder": "",
268
+ "unit": "",
269
+ "required": "true",
270
+ "isChoice": "false",
271
+ "isMulti": "false",
272
+ "isText": "false",
273
+ "isLongText": "false",
274
+ "isNumber": "false",
275
+ "isToggle": "false",
276
+ "isUpload": "true",
277
+ "isButtons": "false",
278
+ "isSwatches": "false",
279
+ "isCards": "false",
280
+ "isSelectable": "false",
281
+ "isInput": "false",
282
+ "initiallyVisible": "true",
283
+ "cellRole": "",
284
+ "rowRole": "group",
285
+ "rowRequired": null,
286
+ "idleTabIndex": "0",
287
+ "inputType": "",
288
+ "inputMode": "",
289
+ "maxLengthText": "",
290
+ "minText": "",
291
+ "maxText": "",
292
+ "stepText": "",
293
+ "defaultValueText": "",
294
+ "rangeHint": "",
295
+ "acceptKind": "image",
296
+ "acceptMime": "image/jpeg,image/png,image/webp,image/gif",
297
+ "priceVariants": [
298
+ {
299
+ "activeKey": "pv:print|photo|d",
300
+ "label": "",
301
+ "isInitial": "true",
302
+ "freshKey": "fresh:print"
303
+ }
304
+ ],
305
+ "headerPriceVariants": [
306
+ {
307
+ "activeKey": "pv:print|photo|d",
308
+ "label": "",
309
+ "isInitial": "true",
310
+ "freshKey": "fresh:print"
311
+ }
312
+ ],
313
+ "hiddenKey": "hide:print|photo",
314
+ "shownKey": "show:print|photo",
315
+ "missingKey": "miss:print|photo",
316
+ "invalidKey": "inv:print|photo",
317
+ "rejectedKey": "rej:print|photo",
318
+ "failedKey": "fail:print|photo",
319
+ "uploadedKey": "up:print|photo",
320
+ "uploadingKey": "load:print",
321
+ "freshKey": "fresh:print",
322
+ "values": []
323
+ },
324
+ {
325
+ "id": "print|message",
326
+ "key": "message",
327
+ "label": "Message",
328
+ "helpText": "",
329
+ "placeholder": "For Ana",
330
+ "unit": "",
331
+ "required": "false",
332
+ "isChoice": "false",
333
+ "isMulti": "false",
334
+ "isText": "true",
335
+ "isLongText": "false",
336
+ "isNumber": "false",
337
+ "isToggle": "false",
338
+ "isUpload": "false",
339
+ "isButtons": "false",
340
+ "isSwatches": "false",
341
+ "isCards": "false",
342
+ "isSelectable": "false",
343
+ "isInput": "true",
344
+ "initiallyVisible": "true",
345
+ "cellRole": "",
346
+ "rowRole": "group",
347
+ "rowRequired": null,
348
+ "idleTabIndex": "0",
349
+ "inputType": "text",
350
+ "inputMode": "text",
351
+ "maxLengthText": "120",
352
+ "minText": "",
353
+ "maxText": "",
354
+ "stepText": "",
355
+ "defaultValueText": "",
356
+ "rangeHint": "",
357
+ "acceptKind": "",
358
+ "acceptMime": "",
359
+ "priceVariants": [
360
+ {
361
+ "activeKey": "pv:print|message|d",
362
+ "label": "",
363
+ "isInitial": "true",
364
+ "freshKey": "fresh:print"
365
+ }
366
+ ],
367
+ "headerPriceVariants": [
368
+ {
369
+ "activeKey": "pv:print|message|d",
370
+ "label": "",
371
+ "isInitial": "true",
372
+ "freshKey": "fresh:print"
373
+ }
374
+ ],
375
+ "hiddenKey": "hide:print|message",
376
+ "shownKey": "show:print|message",
377
+ "missingKey": "miss:print|message",
378
+ "invalidKey": "inv:print|message",
379
+ "rejectedKey": "rej:print|message",
380
+ "failedKey": "fail:print|message",
381
+ "uploadedKey": "up:print|message",
382
+ "uploadingKey": "load:print",
383
+ "freshKey": "fresh:print",
384
+ "values": []
385
+ }
386
+ ],
387
+ "optionGroupsJson": "[{\"key\":\"size\",\"label\":\"Size\",\"type\":\"choice\",\"required\":true,\"display\":\"buttons\",\"values\":[{\"key\":\"a5\",\"label\":\"A5\",\"price\":{\"mode\":\"none\"},\"default\":true},{\"key\":\"a4\",\"label\":\"A4\",\"price\":{\"mode\":\"fixed\",\"amount\":4}},{\"key\":\"a3\",\"label\":\"A3\",\"price\":{\"mode\":\"fixed\",\"amount\":9}}]},{\"key\":\"paper\",\"label\":\"Paper\",\"type\":\"choice\",\"required\":true,\"display\":\"cards\",\"values\":[{\"key\":\"matte\",\"label\":\"Matte\",\"description\":\"Soft, no glare\",\"imageUrl\":\"https://cdn.example.com/matte.jpg\",\"price\":{\"mode\":\"none\"},\"default\":true},{\"key\":\"glossy\",\"label\":\"Glossy\",\"price\":{\"mode\":\"fixed\",\"amount\":3},\"priceWhen\":[{\"groupKey\":\"size\",\"valueKeys\":[\"a4\"],\"price\":{\"mode\":\"fixed\",\"amount\":5}},{\"groupKey\":\"size\",\"valueKeys\":[\"a3\"],\"price\":{\"mode\":\"fixed\",\"amount\":8}}]},{\"key\":\"fine-art\",\"label\":\"Fine-art\",\"price\":{\"mode\":\"percent\",\"percent\":40}}]},{\"key\":\"photo\",\"label\":\"Your photo\",\"type\":\"upload\",\"required\":true,\"helpText\":\"At least 2000 px wide\",\"price\":{\"mode\":\"none\"},\"accept\":\"image\",\"maxFiles\":1},{\"key\":\"message\",\"label\":\"Message\",\"type\":\"text\",\"required\":false,\"placeholder\":\"For Ana\",\"maxLength\":120,\"price\":{\"mode\":\"none\"}}]",
388
+ "optionsPricingJson": "{\"productId\":\"print\",\"netBase\":10,\"originalNetBase\":null,\"taxRate\":0,\"symbol\":\"$\",\"position\":\"before\",\"pricesDisabled\":false,\"defaultCombinationId\":\"\",\"variants\":[]}",
389
+ "optionsDefaultDisplayPrice": "10.00",
390
+ "optionsDefaultOriginalDisplayPrice": "",
391
+ "optionsDefaultSummary": "Size: A5 · Paper: Matte",
392
+ "optionsFreshKey": "fresh:print",
393
+ "optionsValidKey": "valid:print",
394
+ "optionsOriginalKey": "orig:print",
395
+ "optionsSummaryKey": "sum:print",
396
+ "optionsFilesKey": "files:print"
397
+ }
398
+ },
399
+ {
400
+ "name": "the same product in a listing gets the flags only",
401
+ "includeDetail": false,
402
+ "taxRate": 0,
403
+ "currentLanguage": null,
404
+ "mainLanguage": null,
405
+ "variants": null,
406
+ "record": {
407
+ "id": "print",
408
+ "name": "print",
409
+ "slug": "print",
410
+ "price": 10,
411
+ "currency": "USD",
412
+ "created_at": "2026-01-01T00:00:00.000Z",
413
+ "updated_at": "2026-01-01T00:00:00.000Z",
414
+ "option_groups": "[{\"key\": \"size\", \"label\": \"Size\", \"type\": \"choice\", \"required\": true, \"values\": [{\"key\": \"a5\", \"label\": \"A5\", \"price\": {\"mode\": \"none\"}, \"default\": true}, {\"key\": \"a4\", \"label\": \"A4\", \"price\": {\"mode\": \"fixed\", \"amount\": 4}}, {\"key\": \"a3\", \"label\": \"A3\", \"price\": {\"mode\": \"fixed\", \"amount\": 9}}]}, {\"key\": \"paper\", \"label\": \"Paper\", \"type\": \"choice\", \"display\": \"cards\", \"required\": true, \"values\": [{\"key\": \"matte\", \"label\": \"Matte\", \"description\": \"Soft, no glare\", \"price\": {\"mode\": \"none\"}, \"default\": true, \"imageUrl\": \"https://cdn.example.com/matte.jpg\"}, {\"key\": \"glossy\", \"label\": \"Glossy\", \"price\": {\"mode\": \"fixed\", \"amount\": 3}, \"imageUrl\": \"TQ_unknown_asset\", \"priceWhen\": [{\"groupKey\": \"size\", \"valueKeys\": [\"a4\"], \"price\": {\"mode\": \"fixed\", \"amount\": 5}}, {\"groupKey\": \"size\", \"valueKeys\": [\"a3\"], \"price\": {\"mode\": \"fixed\", \"amount\": 8}}]}, {\"key\": \"fine-art\", \"label\": \"Fine-art\", \"price\": {\"mode\": \"percent\", \"percent\": 40}}]}, {\"key\": \"photo\", \"label\": \"Your photo\", \"type\": \"upload\", \"required\": true, \"accept\": \"image\", \"helpText\": \"At least 2000 px wide\"}, {\"key\": \"message\", \"label\": \"Message\", \"type\": \"text\", \"required\": false, \"maxLength\": 120, \"placeholder\": \"For Ana\"}]"
415
+ },
416
+ "expected": {
417
+ "hasProductOptions": "true",
418
+ "optionsRequireInput": "true",
419
+ "optionsQuickAdd": "false",
420
+ "optionGroups": [],
421
+ "optionGroupsJson": "[]",
422
+ "optionsPricingJson": "{}",
423
+ "optionsDefaultDisplayPrice": "",
424
+ "optionsDefaultOriginalDisplayPrice": "",
425
+ "optionsDefaultSummary": "",
426
+ "optionsFreshKey": "",
427
+ "optionsValidKey": "",
428
+ "optionsOriginalKey": "",
429
+ "optionsSummaryKey": "",
430
+ "optionsFilesKey": ""
431
+ }
432
+ },
433
+ {
434
+ "name": "taxed store with the symbol after the amount",
435
+ "includeDetail": true,
436
+ "taxRate": 19,
437
+ "currentLanguage": null,
438
+ "mainLanguage": null,
439
+ "variants": null,
440
+ "record": {
441
+ "id": "print-se",
442
+ "name": "print-se",
443
+ "slug": "print-se",
444
+ "price": "129.00",
445
+ "currency": "SEK",
446
+ "created_at": "2026-01-01T00:00:00.000Z",
447
+ "updated_at": "2026-01-01T00:00:00.000Z",
448
+ "option_groups": "[{\"key\": \"size\", \"label\": \"Size\", \"type\": \"choice\", \"required\": true, \"values\": [{\"key\": \"a5\", \"label\": \"A5\", \"price\": {\"mode\": \"none\"}, \"default\": true}, {\"key\": \"a4\", \"label\": \"A4\", \"price\": {\"mode\": \"fixed\", \"amount\": 4}}, {\"key\": \"a3\", \"label\": \"A3\", \"price\": {\"mode\": \"fixed\", \"amount\": 9}}]}, {\"key\": \"paper\", \"label\": \"Paper\", \"type\": \"choice\", \"display\": \"cards\", \"required\": true, \"values\": [{\"key\": \"matte\", \"label\": \"Matte\", \"description\": \"Soft, no glare\", \"price\": {\"mode\": \"none\"}, \"default\": true, \"imageUrl\": \"https://cdn.example.com/matte.jpg\"}, {\"key\": \"glossy\", \"label\": \"Glossy\", \"price\": {\"mode\": \"fixed\", \"amount\": 3}, \"imageUrl\": \"TQ_unknown_asset\", \"priceWhen\": [{\"groupKey\": \"size\", \"valueKeys\": [\"a4\"], \"price\": {\"mode\": \"fixed\", \"amount\": 5}}, {\"groupKey\": \"size\", \"valueKeys\": [\"a3\"], \"price\": {\"mode\": \"fixed\", \"amount\": 8}}]}, {\"key\": \"fine-art\", \"label\": \"Fine-art\", \"price\": {\"mode\": \"percent\", \"percent\": 40}}]}, {\"key\": \"photo\", \"label\": \"Your photo\", \"type\": \"upload\", \"required\": true, \"accept\": \"image\", \"helpText\": \"At least 2000 px wide\"}, {\"key\": \"message\", \"label\": \"Message\", \"type\": \"text\", \"required\": false, \"maxLength\": 120, \"placeholder\": \"For Ana\"}]"
449
+ },
450
+ "expected": {
451
+ "hasProductOptions": "true",
452
+ "optionsRequireInput": "true",
453
+ "optionsQuickAdd": "false",
454
+ "optionGroups": [
455
+ {
456
+ "id": "print-se|size",
457
+ "key": "size",
458
+ "label": "Size",
459
+ "helpText": "",
460
+ "placeholder": "",
461
+ "unit": "",
462
+ "required": "true",
463
+ "isChoice": "true",
464
+ "isMulti": "false",
465
+ "isText": "false",
466
+ "isLongText": "false",
467
+ "isNumber": "false",
468
+ "isToggle": "false",
469
+ "isUpload": "false",
470
+ "isButtons": "true",
471
+ "isSwatches": "false",
472
+ "isCards": "false",
473
+ "isSelectable": "true",
474
+ "isInput": "false",
475
+ "initiallyVisible": "true",
476
+ "cellRole": "radio",
477
+ "rowRole": "radiogroup",
478
+ "rowRequired": "true",
479
+ "idleTabIndex": "-1",
480
+ "inputType": "",
481
+ "inputMode": "",
482
+ "maxLengthText": "",
483
+ "minText": "",
484
+ "maxText": "",
485
+ "stepText": "",
486
+ "defaultValueText": "",
487
+ "rangeHint": "",
488
+ "acceptKind": "",
489
+ "acceptMime": "",
490
+ "priceVariants": [],
491
+ "headerPriceVariants": [],
492
+ "hiddenKey": "hide:print-se|size",
493
+ "shownKey": "show:print-se|size",
494
+ "missingKey": "miss:print-se|size",
495
+ "invalidKey": "inv:print-se|size",
496
+ "rejectedKey": "rej:print-se|size",
497
+ "failedKey": "fail:print-se|size",
498
+ "uploadedKey": "up:print-se|size",
499
+ "uploadingKey": "load:print-se",
500
+ "freshKey": "fresh:print-se",
501
+ "values": [
502
+ {
503
+ "id": "print-se|size|a5",
504
+ "key": "a5",
505
+ "label": "A5",
506
+ "description": "",
507
+ "color": "",
508
+ "imageUrl": "",
509
+ "isDefault": "true",
510
+ "showSwatch": "false",
511
+ "showImage": "false",
512
+ "selectedKey": "sel:print-se|size|a5",
513
+ "freshKey": "fresh:print-se",
514
+ "priceVariants": [
515
+ {
516
+ "activeKey": "pv:print-se|size|a5|d",
517
+ "label": "",
518
+ "isInitial": "true",
519
+ "freshKey": "fresh:print-se"
520
+ }
521
+ ]
522
+ },
523
+ {
524
+ "id": "print-se|size|a4",
525
+ "key": "a4",
526
+ "label": "A4",
527
+ "description": "",
528
+ "color": "",
529
+ "imageUrl": "",
530
+ "isDefault": "false",
531
+ "showSwatch": "false",
532
+ "showImage": "false",
533
+ "selectedKey": "sel:print-se|size|a4",
534
+ "freshKey": "fresh:print-se",
535
+ "priceVariants": [
536
+ {
537
+ "activeKey": "pv:print-se|size|a4|d",
538
+ "label": "+4.76 kr",
539
+ "isInitial": "true",
540
+ "freshKey": "fresh:print-se"
541
+ }
542
+ ]
543
+ },
544
+ {
545
+ "id": "print-se|size|a3",
546
+ "key": "a3",
547
+ "label": "A3",
548
+ "description": "",
549
+ "color": "",
550
+ "imageUrl": "",
551
+ "isDefault": "false",
552
+ "showSwatch": "false",
553
+ "showImage": "false",
554
+ "selectedKey": "sel:print-se|size|a3",
555
+ "freshKey": "fresh:print-se",
556
+ "priceVariants": [
557
+ {
558
+ "activeKey": "pv:print-se|size|a3|d",
559
+ "label": "+10.71 kr",
560
+ "isInitial": "true",
561
+ "freshKey": "fresh:print-se"
562
+ }
563
+ ]
564
+ }
565
+ ]
566
+ },
567
+ {
568
+ "id": "print-se|paper",
569
+ "key": "paper",
570
+ "label": "Paper",
571
+ "helpText": "",
572
+ "placeholder": "",
573
+ "unit": "",
574
+ "required": "true",
575
+ "isChoice": "true",
576
+ "isMulti": "false",
577
+ "isText": "false",
578
+ "isLongText": "false",
579
+ "isNumber": "false",
580
+ "isToggle": "false",
581
+ "isUpload": "false",
582
+ "isButtons": "false",
583
+ "isSwatches": "false",
584
+ "isCards": "true",
585
+ "isSelectable": "true",
586
+ "isInput": "false",
587
+ "initiallyVisible": "true",
588
+ "cellRole": "radio",
589
+ "rowRole": "radiogroup",
590
+ "rowRequired": "true",
591
+ "idleTabIndex": "-1",
592
+ "inputType": "",
593
+ "inputMode": "",
594
+ "maxLengthText": "",
595
+ "minText": "",
596
+ "maxText": "",
597
+ "stepText": "",
598
+ "defaultValueText": "",
599
+ "rangeHint": "",
600
+ "acceptKind": "",
601
+ "acceptMime": "",
602
+ "priceVariants": [],
603
+ "headerPriceVariants": [],
604
+ "hiddenKey": "hide:print-se|paper",
605
+ "shownKey": "show:print-se|paper",
606
+ "missingKey": "miss:print-se|paper",
607
+ "invalidKey": "inv:print-se|paper",
608
+ "rejectedKey": "rej:print-se|paper",
609
+ "failedKey": "fail:print-se|paper",
610
+ "uploadedKey": "up:print-se|paper",
611
+ "uploadingKey": "load:print-se",
612
+ "freshKey": "fresh:print-se",
613
+ "values": [
614
+ {
615
+ "id": "print-se|paper|matte",
616
+ "key": "matte",
617
+ "label": "Matte",
618
+ "description": "Soft, no glare",
619
+ "color": "",
620
+ "imageUrl": "https://cdn.example.com/matte.jpg",
621
+ "isDefault": "true",
622
+ "showSwatch": "false",
623
+ "showImage": "true",
624
+ "selectedKey": "sel:print-se|paper|matte",
625
+ "freshKey": "fresh:print-se",
626
+ "priceVariants": [
627
+ {
628
+ "activeKey": "pv:print-se|paper|matte|d",
629
+ "label": "",
630
+ "isInitial": "true",
631
+ "freshKey": "fresh:print-se"
632
+ }
633
+ ]
634
+ },
635
+ {
636
+ "id": "print-se|paper|glossy",
637
+ "key": "glossy",
638
+ "label": "Glossy",
639
+ "description": "",
640
+ "color": "",
641
+ "imageUrl": "",
642
+ "isDefault": "false",
643
+ "showSwatch": "false",
644
+ "showImage": "false",
645
+ "selectedKey": "sel:print-se|paper|glossy",
646
+ "freshKey": "fresh:print-se",
647
+ "priceVariants": [
648
+ {
649
+ "activeKey": "pv:print-se|paper|glossy|0",
650
+ "label": "+5.95 kr",
651
+ "isInitial": "false",
652
+ "freshKey": "fresh:print-se"
653
+ },
654
+ {
655
+ "activeKey": "pv:print-se|paper|glossy|1",
656
+ "label": "+9.52 kr",
657
+ "isInitial": "false",
658
+ "freshKey": "fresh:print-se"
659
+ },
660
+ {
661
+ "activeKey": "pv:print-se|paper|glossy|d",
662
+ "label": "+3.57 kr",
663
+ "isInitial": "true",
664
+ "freshKey": "fresh:print-se"
665
+ }
666
+ ]
667
+ },
668
+ {
669
+ "id": "print-se|paper|fine-art",
670
+ "key": "fine-art",
671
+ "label": "Fine-art",
672
+ "description": "",
673
+ "color": "",
674
+ "imageUrl": "",
675
+ "isDefault": "false",
676
+ "showSwatch": "false",
677
+ "showImage": "false",
678
+ "selectedKey": "sel:print-se|paper|fine-art",
679
+ "freshKey": "fresh:print-se",
680
+ "priceVariants": [
681
+ {
682
+ "activeKey": "pv:print-se|paper|fine-art|d",
683
+ "label": "+40%",
684
+ "isInitial": "true",
685
+ "freshKey": "fresh:print-se"
686
+ }
687
+ ]
688
+ }
689
+ ]
690
+ },
691
+ {
692
+ "id": "print-se|photo",
693
+ "key": "photo",
694
+ "label": "Your photo",
695
+ "helpText": "At least 2000 px wide",
696
+ "placeholder": "",
697
+ "unit": "",
698
+ "required": "true",
699
+ "isChoice": "false",
700
+ "isMulti": "false",
701
+ "isText": "false",
702
+ "isLongText": "false",
703
+ "isNumber": "false",
704
+ "isToggle": "false",
705
+ "isUpload": "true",
706
+ "isButtons": "false",
707
+ "isSwatches": "false",
708
+ "isCards": "false",
709
+ "isSelectable": "false",
710
+ "isInput": "false",
711
+ "initiallyVisible": "true",
712
+ "cellRole": "",
713
+ "rowRole": "group",
714
+ "rowRequired": null,
715
+ "idleTabIndex": "0",
716
+ "inputType": "",
717
+ "inputMode": "",
718
+ "maxLengthText": "",
719
+ "minText": "",
720
+ "maxText": "",
721
+ "stepText": "",
722
+ "defaultValueText": "",
723
+ "rangeHint": "",
724
+ "acceptKind": "image",
725
+ "acceptMime": "image/jpeg,image/png,image/webp,image/gif",
726
+ "priceVariants": [
727
+ {
728
+ "activeKey": "pv:print-se|photo|d",
729
+ "label": "",
730
+ "isInitial": "true",
731
+ "freshKey": "fresh:print-se"
732
+ }
733
+ ],
734
+ "headerPriceVariants": [
735
+ {
736
+ "activeKey": "pv:print-se|photo|d",
737
+ "label": "",
738
+ "isInitial": "true",
739
+ "freshKey": "fresh:print-se"
740
+ }
741
+ ],
742
+ "hiddenKey": "hide:print-se|photo",
743
+ "shownKey": "show:print-se|photo",
744
+ "missingKey": "miss:print-se|photo",
745
+ "invalidKey": "inv:print-se|photo",
746
+ "rejectedKey": "rej:print-se|photo",
747
+ "failedKey": "fail:print-se|photo",
748
+ "uploadedKey": "up:print-se|photo",
749
+ "uploadingKey": "load:print-se",
750
+ "freshKey": "fresh:print-se",
751
+ "values": []
752
+ },
753
+ {
754
+ "id": "print-se|message",
755
+ "key": "message",
756
+ "label": "Message",
757
+ "helpText": "",
758
+ "placeholder": "For Ana",
759
+ "unit": "",
760
+ "required": "false",
761
+ "isChoice": "false",
762
+ "isMulti": "false",
763
+ "isText": "true",
764
+ "isLongText": "false",
765
+ "isNumber": "false",
766
+ "isToggle": "false",
767
+ "isUpload": "false",
768
+ "isButtons": "false",
769
+ "isSwatches": "false",
770
+ "isCards": "false",
771
+ "isSelectable": "false",
772
+ "isInput": "true",
773
+ "initiallyVisible": "true",
774
+ "cellRole": "",
775
+ "rowRole": "group",
776
+ "rowRequired": null,
777
+ "idleTabIndex": "0",
778
+ "inputType": "text",
779
+ "inputMode": "text",
780
+ "maxLengthText": "120",
781
+ "minText": "",
782
+ "maxText": "",
783
+ "stepText": "",
784
+ "defaultValueText": "",
785
+ "rangeHint": "",
786
+ "acceptKind": "",
787
+ "acceptMime": "",
788
+ "priceVariants": [
789
+ {
790
+ "activeKey": "pv:print-se|message|d",
791
+ "label": "",
792
+ "isInitial": "true",
793
+ "freshKey": "fresh:print-se"
794
+ }
795
+ ],
796
+ "headerPriceVariants": [
797
+ {
798
+ "activeKey": "pv:print-se|message|d",
799
+ "label": "",
800
+ "isInitial": "true",
801
+ "freshKey": "fresh:print-se"
802
+ }
803
+ ],
804
+ "hiddenKey": "hide:print-se|message",
805
+ "shownKey": "show:print-se|message",
806
+ "missingKey": "miss:print-se|message",
807
+ "invalidKey": "inv:print-se|message",
808
+ "rejectedKey": "rej:print-se|message",
809
+ "failedKey": "fail:print-se|message",
810
+ "uploadedKey": "up:print-se|message",
811
+ "uploadingKey": "load:print-se",
812
+ "freshKey": "fresh:print-se",
813
+ "values": []
814
+ }
815
+ ],
816
+ "optionGroupsJson": "[{\"key\":\"size\",\"label\":\"Size\",\"type\":\"choice\",\"required\":true,\"display\":\"buttons\",\"values\":[{\"key\":\"a5\",\"label\":\"A5\",\"price\":{\"mode\":\"none\"},\"default\":true},{\"key\":\"a4\",\"label\":\"A4\",\"price\":{\"mode\":\"fixed\",\"amount\":4}},{\"key\":\"a3\",\"label\":\"A3\",\"price\":{\"mode\":\"fixed\",\"amount\":9}}]},{\"key\":\"paper\",\"label\":\"Paper\",\"type\":\"choice\",\"required\":true,\"display\":\"cards\",\"values\":[{\"key\":\"matte\",\"label\":\"Matte\",\"description\":\"Soft, no glare\",\"imageUrl\":\"https://cdn.example.com/matte.jpg\",\"price\":{\"mode\":\"none\"},\"default\":true},{\"key\":\"glossy\",\"label\":\"Glossy\",\"price\":{\"mode\":\"fixed\",\"amount\":3},\"priceWhen\":[{\"groupKey\":\"size\",\"valueKeys\":[\"a4\"],\"price\":{\"mode\":\"fixed\",\"amount\":5}},{\"groupKey\":\"size\",\"valueKeys\":[\"a3\"],\"price\":{\"mode\":\"fixed\",\"amount\":8}}]},{\"key\":\"fine-art\",\"label\":\"Fine-art\",\"price\":{\"mode\":\"percent\",\"percent\":40}}]},{\"key\":\"photo\",\"label\":\"Your photo\",\"type\":\"upload\",\"required\":true,\"helpText\":\"At least 2000 px wide\",\"price\":{\"mode\":\"none\"},\"accept\":\"image\",\"maxFiles\":1},{\"key\":\"message\",\"label\":\"Message\",\"type\":\"text\",\"required\":false,\"placeholder\":\"For Ana\",\"maxLength\":120,\"price\":{\"mode\":\"none\"}}]",
817
+ "optionsPricingJson": "{\"productId\":\"print-se\",\"netBase\":129,\"originalNetBase\":null,\"taxRate\":19,\"symbol\":\"kr\",\"position\":\"after\",\"pricesDisabled\":false,\"defaultCombinationId\":\"\",\"variants\":[]}",
818
+ "optionsDefaultDisplayPrice": "153.51",
819
+ "optionsDefaultOriginalDisplayPrice": "",
820
+ "optionsDefaultSummary": "Size: A5 · Paper: Matte",
821
+ "optionsFreshKey": "fresh:print-se",
822
+ "optionsValidKey": "valid:print-se",
823
+ "optionsOriginalKey": "orig:print-se",
824
+ "optionsSummaryKey": "sum:print-se",
825
+ "optionsFilesKey": "files:print-se"
826
+ }
827
+ },
828
+ {
829
+ "name": "variants, a discount, per-unit length priced by material, toggle and dependent group",
830
+ "includeDetail": true,
831
+ "taxRate": 0,
832
+ "currentLanguage": null,
833
+ "mainLanguage": null,
834
+ "variants": [
835
+ {
836
+ "id": "v-small",
837
+ "options": {
838
+ "size": "s"
839
+ },
840
+ "price": 30,
841
+ "quantity": 0
842
+ },
843
+ {
844
+ "id": "v-large",
845
+ "options": {
846
+ "size": "l"
847
+ },
848
+ "price": null,
849
+ "quantity": 5
850
+ }
851
+ ],
852
+ "record": {
853
+ "id": "machine",
854
+ "name": "machine",
855
+ "slug": "machine",
856
+ "price": "20.00",
857
+ "currency": "USD",
858
+ "created_at": "2026-01-01T00:00:00.000Z",
859
+ "updated_at": "2026-01-01T00:00:00.000Z",
860
+ "discounts": "[{\"id\": \"d1\", \"type\": \"percentage\", \"value\": 10, \"startsAt\": null, \"endsAt\": \"2099-01-01T00:00:00.000Z\"}]",
861
+ "option_groups": [
862
+ {
863
+ "key": "material",
864
+ "label": "Material",
865
+ "type": "choice",
866
+ "display": "swatches",
867
+ "required": true,
868
+ "values": [
869
+ {
870
+ "key": "steel",
871
+ "label": "Steel",
872
+ "color": "#888888",
873
+ "price": {
874
+ "mode": "none"
875
+ },
876
+ "default": true
877
+ },
878
+ {
879
+ "key": "alu",
880
+ "label": "Aluminium",
881
+ "price": {
882
+ "mode": "percent",
883
+ "percent": 10
884
+ }
885
+ }
886
+ ]
887
+ },
888
+ {
889
+ "key": "length",
890
+ "label": "Length",
891
+ "type": "number",
892
+ "required": true,
893
+ "min": 1,
894
+ "max": 20,
895
+ "step": 0.5,
896
+ "unit": "m",
897
+ "defaultValue": 2,
898
+ "price": {
899
+ "mode": "per-unit",
900
+ "amount": 5
901
+ },
902
+ "priceWhen": [
903
+ {
904
+ "groupKey": "material",
905
+ "valueKeys": [
906
+ "alu"
907
+ ],
908
+ "price": {
909
+ "mode": "per-unit",
910
+ "amount": 3
911
+ }
912
+ }
913
+ ]
914
+ },
915
+ {
916
+ "key": "accessories",
917
+ "label": "Accessories",
918
+ "type": "multi-choice",
919
+ "maxSelected": 2,
920
+ "values": [
921
+ {
922
+ "key": "clamp",
923
+ "label": "Clamp",
924
+ "price": {
925
+ "mode": "fixed",
926
+ "amount": 12.5
927
+ },
928
+ "default": true
929
+ },
930
+ {
931
+ "key": "stand",
932
+ "label": "Stand",
933
+ "price": {
934
+ "mode": "fixed",
935
+ "amount": 40
936
+ }
937
+ },
938
+ {
939
+ "key": "cover",
940
+ "label": "Cover",
941
+ "price": {
942
+ "mode": "fixed",
943
+ "amount": 9.99
944
+ }
945
+ }
946
+ ]
947
+ },
948
+ {
949
+ "key": "coat",
950
+ "label": "Protective coat",
951
+ "type": "toggle",
952
+ "price": {
953
+ "mode": "fixed",
954
+ "amount": 6
955
+ },
956
+ "priceWhen": [
957
+ {
958
+ "groupKey": "material",
959
+ "valueKeys": [
960
+ "alu"
961
+ ],
962
+ "price": {
963
+ "mode": "none"
964
+ }
965
+ }
966
+ ]
967
+ },
968
+ {
969
+ "key": "coat-colour",
970
+ "label": "Coat colour",
971
+ "type": "choice",
972
+ "required": true,
973
+ "visibleWhen": [
974
+ {
975
+ "groupKey": "coat",
976
+ "operator": "is-set"
977
+ }
978
+ ],
979
+ "values": [
980
+ {
981
+ "key": "black",
982
+ "label": "Black",
983
+ "price": {
984
+ "mode": "none"
985
+ }
986
+ },
987
+ {
988
+ "key": "red",
989
+ "label": "Red",
990
+ "price": {
991
+ "mode": "fixed",
992
+ "amount": 2
993
+ },
994
+ "priceWhen": [
995
+ {
996
+ "groupKey": "coat",
997
+ "valueKeys": [
998
+ "on"
999
+ ],
1000
+ "price": {
1001
+ "mode": "fixed",
1002
+ "amount": 1
1003
+ }
1004
+ }
1005
+ ]
1006
+ }
1007
+ ]
1008
+ },
1009
+ {
1010
+ "key": "drawing",
1011
+ "label": "Drawing",
1012
+ "type": "upload",
1013
+ "accept": "pdf",
1014
+ "price": {
1015
+ "mode": "fixed",
1016
+ "amount": 15
1017
+ }
1018
+ },
1019
+ {
1020
+ "key": "notes",
1021
+ "label": "Notes",
1022
+ "type": "long-text",
1023
+ "helpText": "Anything we should know"
1024
+ }
1025
+ ],
1026
+ "variant_options": "[{\"key\": \"size\", \"name\": \"Size\", \"type\": \"text\", \"values\": [{\"value\": \"s\", \"label\": \"S\"}, {\"value\": \"l\", \"label\": \"L\"}]}]"
1027
+ },
1028
+ "expected": {
1029
+ "hasProductOptions": "true",
1030
+ "optionsRequireInput": "false",
1031
+ "optionsQuickAdd": "false",
1032
+ "optionGroups": [
1033
+ {
1034
+ "id": "machine|material",
1035
+ "key": "material",
1036
+ "label": "Material",
1037
+ "helpText": "",
1038
+ "placeholder": "",
1039
+ "unit": "",
1040
+ "required": "true",
1041
+ "isChoice": "true",
1042
+ "isMulti": "false",
1043
+ "isText": "false",
1044
+ "isLongText": "false",
1045
+ "isNumber": "false",
1046
+ "isToggle": "false",
1047
+ "isUpload": "false",
1048
+ "isButtons": "false",
1049
+ "isSwatches": "true",
1050
+ "isCards": "false",
1051
+ "isSelectable": "true",
1052
+ "isInput": "false",
1053
+ "initiallyVisible": "true",
1054
+ "cellRole": "radio",
1055
+ "rowRole": "radiogroup",
1056
+ "rowRequired": "true",
1057
+ "idleTabIndex": "-1",
1058
+ "inputType": "",
1059
+ "inputMode": "",
1060
+ "maxLengthText": "",
1061
+ "minText": "",
1062
+ "maxText": "",
1063
+ "stepText": "",
1064
+ "defaultValueText": "",
1065
+ "rangeHint": "",
1066
+ "acceptKind": "",
1067
+ "acceptMime": "",
1068
+ "priceVariants": [],
1069
+ "headerPriceVariants": [],
1070
+ "hiddenKey": "hide:machine|material",
1071
+ "shownKey": "show:machine|material",
1072
+ "missingKey": "miss:machine|material",
1073
+ "invalidKey": "inv:machine|material",
1074
+ "rejectedKey": "rej:machine|material",
1075
+ "failedKey": "fail:machine|material",
1076
+ "uploadedKey": "up:machine|material",
1077
+ "uploadingKey": "load:machine",
1078
+ "freshKey": "fresh:machine",
1079
+ "values": [
1080
+ {
1081
+ "id": "machine|material|steel",
1082
+ "key": "steel",
1083
+ "label": "Steel",
1084
+ "description": "",
1085
+ "color": "#888888",
1086
+ "imageUrl": "",
1087
+ "isDefault": "true",
1088
+ "showSwatch": "true",
1089
+ "showImage": "false",
1090
+ "selectedKey": "sel:machine|material|steel",
1091
+ "freshKey": "fresh:machine",
1092
+ "priceVariants": [
1093
+ {
1094
+ "activeKey": "pv:machine|material|steel|d",
1095
+ "label": "",
1096
+ "isInitial": "true",
1097
+ "freshKey": "fresh:machine"
1098
+ }
1099
+ ]
1100
+ },
1101
+ {
1102
+ "id": "machine|material|alu",
1103
+ "key": "alu",
1104
+ "label": "Aluminium",
1105
+ "description": "",
1106
+ "color": "",
1107
+ "imageUrl": "",
1108
+ "isDefault": "false",
1109
+ "showSwatch": "false",
1110
+ "showImage": "false",
1111
+ "selectedKey": "sel:machine|material|alu",
1112
+ "freshKey": "fresh:machine",
1113
+ "priceVariants": [
1114
+ {
1115
+ "activeKey": "pv:machine|material|alu|d",
1116
+ "label": "+10%",
1117
+ "isInitial": "true",
1118
+ "freshKey": "fresh:machine"
1119
+ }
1120
+ ]
1121
+ }
1122
+ ]
1123
+ },
1124
+ {
1125
+ "id": "machine|length",
1126
+ "key": "length",
1127
+ "label": "Length",
1128
+ "helpText": "",
1129
+ "placeholder": "",
1130
+ "unit": "m",
1131
+ "required": "true",
1132
+ "isChoice": "false",
1133
+ "isMulti": "false",
1134
+ "isText": "false",
1135
+ "isLongText": "false",
1136
+ "isNumber": "true",
1137
+ "isToggle": "false",
1138
+ "isUpload": "false",
1139
+ "isButtons": "false",
1140
+ "isSwatches": "false",
1141
+ "isCards": "false",
1142
+ "isSelectable": "false",
1143
+ "isInput": "true",
1144
+ "initiallyVisible": "true",
1145
+ "cellRole": "",
1146
+ "rowRole": "group",
1147
+ "rowRequired": null,
1148
+ "idleTabIndex": "0",
1149
+ "inputType": "number",
1150
+ "inputMode": "decimal",
1151
+ "maxLengthText": "",
1152
+ "minText": "1",
1153
+ "maxText": "20",
1154
+ "stepText": "0.5",
1155
+ "defaultValueText": "2",
1156
+ "rangeHint": "1 – 20 m",
1157
+ "acceptKind": "",
1158
+ "acceptMime": "",
1159
+ "priceVariants": [
1160
+ {
1161
+ "activeKey": "pv:machine|length|0",
1162
+ "label": "+$3.00 / m",
1163
+ "isInitial": "false",
1164
+ "freshKey": "fresh:machine"
1165
+ },
1166
+ {
1167
+ "activeKey": "pv:machine|length|d",
1168
+ "label": "+$5.00 / m",
1169
+ "isInitial": "true",
1170
+ "freshKey": "fresh:machine"
1171
+ }
1172
+ ],
1173
+ "headerPriceVariants": [
1174
+ {
1175
+ "activeKey": "pv:machine|length|0",
1176
+ "label": "+$3.00 / m",
1177
+ "isInitial": "false",
1178
+ "freshKey": "fresh:machine"
1179
+ },
1180
+ {
1181
+ "activeKey": "pv:machine|length|d",
1182
+ "label": "+$5.00 / m",
1183
+ "isInitial": "true",
1184
+ "freshKey": "fresh:machine"
1185
+ }
1186
+ ],
1187
+ "hiddenKey": "hide:machine|length",
1188
+ "shownKey": "show:machine|length",
1189
+ "missingKey": "miss:machine|length",
1190
+ "invalidKey": "inv:machine|length",
1191
+ "rejectedKey": "rej:machine|length",
1192
+ "failedKey": "fail:machine|length",
1193
+ "uploadedKey": "up:machine|length",
1194
+ "uploadingKey": "load:machine",
1195
+ "freshKey": "fresh:machine",
1196
+ "values": []
1197
+ },
1198
+ {
1199
+ "id": "machine|accessories",
1200
+ "key": "accessories",
1201
+ "label": "Accessories",
1202
+ "helpText": "",
1203
+ "placeholder": "",
1204
+ "unit": "",
1205
+ "required": "false",
1206
+ "isChoice": "false",
1207
+ "isMulti": "true",
1208
+ "isText": "false",
1209
+ "isLongText": "false",
1210
+ "isNumber": "false",
1211
+ "isToggle": "false",
1212
+ "isUpload": "false",
1213
+ "isButtons": "true",
1214
+ "isSwatches": "false",
1215
+ "isCards": "false",
1216
+ "isSelectable": "true",
1217
+ "isInput": "false",
1218
+ "initiallyVisible": "true",
1219
+ "cellRole": "checkbox",
1220
+ "rowRole": "group",
1221
+ "rowRequired": null,
1222
+ "idleTabIndex": "0",
1223
+ "inputType": "",
1224
+ "inputMode": "",
1225
+ "maxLengthText": "",
1226
+ "minText": "",
1227
+ "maxText": "",
1228
+ "stepText": "",
1229
+ "defaultValueText": "",
1230
+ "rangeHint": "",
1231
+ "acceptKind": "",
1232
+ "acceptMime": "",
1233
+ "priceVariants": [],
1234
+ "headerPriceVariants": [],
1235
+ "hiddenKey": "hide:machine|accessories",
1236
+ "shownKey": "show:machine|accessories",
1237
+ "missingKey": "miss:machine|accessories",
1238
+ "invalidKey": "inv:machine|accessories",
1239
+ "rejectedKey": "rej:machine|accessories",
1240
+ "failedKey": "fail:machine|accessories",
1241
+ "uploadedKey": "up:machine|accessories",
1242
+ "uploadingKey": "load:machine",
1243
+ "freshKey": "fresh:machine",
1244
+ "values": [
1245
+ {
1246
+ "id": "machine|accessories|clamp",
1247
+ "key": "clamp",
1248
+ "label": "Clamp",
1249
+ "description": "",
1250
+ "color": "",
1251
+ "imageUrl": "",
1252
+ "isDefault": "true",
1253
+ "showSwatch": "false",
1254
+ "showImage": "false",
1255
+ "selectedKey": "sel:machine|accessories|clamp",
1256
+ "freshKey": "fresh:machine",
1257
+ "priceVariants": [
1258
+ {
1259
+ "activeKey": "pv:machine|accessories|clamp|d",
1260
+ "label": "+$12.50",
1261
+ "isInitial": "true",
1262
+ "freshKey": "fresh:machine"
1263
+ }
1264
+ ]
1265
+ },
1266
+ {
1267
+ "id": "machine|accessories|stand",
1268
+ "key": "stand",
1269
+ "label": "Stand",
1270
+ "description": "",
1271
+ "color": "",
1272
+ "imageUrl": "",
1273
+ "isDefault": "false",
1274
+ "showSwatch": "false",
1275
+ "showImage": "false",
1276
+ "selectedKey": "sel:machine|accessories|stand",
1277
+ "freshKey": "fresh:machine",
1278
+ "priceVariants": [
1279
+ {
1280
+ "activeKey": "pv:machine|accessories|stand|d",
1281
+ "label": "+$40.00",
1282
+ "isInitial": "true",
1283
+ "freshKey": "fresh:machine"
1284
+ }
1285
+ ]
1286
+ },
1287
+ {
1288
+ "id": "machine|accessories|cover",
1289
+ "key": "cover",
1290
+ "label": "Cover",
1291
+ "description": "",
1292
+ "color": "",
1293
+ "imageUrl": "",
1294
+ "isDefault": "false",
1295
+ "showSwatch": "false",
1296
+ "showImage": "false",
1297
+ "selectedKey": "sel:machine|accessories|cover",
1298
+ "freshKey": "fresh:machine",
1299
+ "priceVariants": [
1300
+ {
1301
+ "activeKey": "pv:machine|accessories|cover|d",
1302
+ "label": "+$9.99",
1303
+ "isInitial": "true",
1304
+ "freshKey": "fresh:machine"
1305
+ }
1306
+ ]
1307
+ }
1308
+ ]
1309
+ },
1310
+ {
1311
+ "id": "machine|coat",
1312
+ "key": "coat",
1313
+ "label": "Protective coat",
1314
+ "helpText": "",
1315
+ "placeholder": "",
1316
+ "unit": "",
1317
+ "required": "false",
1318
+ "isChoice": "false",
1319
+ "isMulti": "false",
1320
+ "isText": "false",
1321
+ "isLongText": "false",
1322
+ "isNumber": "false",
1323
+ "isToggle": "true",
1324
+ "isUpload": "false",
1325
+ "isButtons": "true",
1326
+ "isSwatches": "false",
1327
+ "isCards": "false",
1328
+ "isSelectable": "true",
1329
+ "isInput": "false",
1330
+ "initiallyVisible": "true",
1331
+ "cellRole": "switch",
1332
+ "rowRole": "group",
1333
+ "rowRequired": null,
1334
+ "idleTabIndex": "0",
1335
+ "inputType": "",
1336
+ "inputMode": "",
1337
+ "maxLengthText": "",
1338
+ "minText": "",
1339
+ "maxText": "",
1340
+ "stepText": "",
1341
+ "defaultValueText": "",
1342
+ "rangeHint": "",
1343
+ "acceptKind": "",
1344
+ "acceptMime": "",
1345
+ "priceVariants": [
1346
+ {
1347
+ "activeKey": "pv:machine|coat|0",
1348
+ "label": "",
1349
+ "isInitial": "false",
1350
+ "freshKey": "fresh:machine"
1351
+ },
1352
+ {
1353
+ "activeKey": "pv:machine|coat|d",
1354
+ "label": "+$6.00",
1355
+ "isInitial": "true",
1356
+ "freshKey": "fresh:machine"
1357
+ }
1358
+ ],
1359
+ "headerPriceVariants": [],
1360
+ "hiddenKey": "hide:machine|coat",
1361
+ "shownKey": "show:machine|coat",
1362
+ "missingKey": "miss:machine|coat",
1363
+ "invalidKey": "inv:machine|coat",
1364
+ "rejectedKey": "rej:machine|coat",
1365
+ "failedKey": "fail:machine|coat",
1366
+ "uploadedKey": "up:machine|coat",
1367
+ "uploadingKey": "load:machine",
1368
+ "freshKey": "fresh:machine",
1369
+ "values": [
1370
+ {
1371
+ "id": "machine|coat|on",
1372
+ "key": "on",
1373
+ "label": "Protective coat",
1374
+ "description": "",
1375
+ "color": "",
1376
+ "imageUrl": "",
1377
+ "isDefault": "false",
1378
+ "showSwatch": "false",
1379
+ "showImage": "false",
1380
+ "selectedKey": "sel:machine|coat|on",
1381
+ "freshKey": "fresh:machine",
1382
+ "priceVariants": [
1383
+ {
1384
+ "activeKey": "pv:machine|coat|0",
1385
+ "label": "",
1386
+ "isInitial": "false",
1387
+ "freshKey": "fresh:machine"
1388
+ },
1389
+ {
1390
+ "activeKey": "pv:machine|coat|d",
1391
+ "label": "+$6.00",
1392
+ "isInitial": "true",
1393
+ "freshKey": "fresh:machine"
1394
+ }
1395
+ ]
1396
+ }
1397
+ ]
1398
+ },
1399
+ {
1400
+ "id": "machine|coat-colour",
1401
+ "key": "coat-colour",
1402
+ "label": "Coat colour",
1403
+ "helpText": "",
1404
+ "placeholder": "",
1405
+ "unit": "",
1406
+ "required": "true",
1407
+ "isChoice": "true",
1408
+ "isMulti": "false",
1409
+ "isText": "false",
1410
+ "isLongText": "false",
1411
+ "isNumber": "false",
1412
+ "isToggle": "false",
1413
+ "isUpload": "false",
1414
+ "isButtons": "true",
1415
+ "isSwatches": "false",
1416
+ "isCards": "false",
1417
+ "isSelectable": "true",
1418
+ "isInput": "false",
1419
+ "initiallyVisible": "false",
1420
+ "cellRole": "radio",
1421
+ "rowRole": "radiogroup",
1422
+ "rowRequired": "true",
1423
+ "idleTabIndex": "-1",
1424
+ "inputType": "",
1425
+ "inputMode": "",
1426
+ "maxLengthText": "",
1427
+ "minText": "",
1428
+ "maxText": "",
1429
+ "stepText": "",
1430
+ "defaultValueText": "",
1431
+ "rangeHint": "",
1432
+ "acceptKind": "",
1433
+ "acceptMime": "",
1434
+ "priceVariants": [],
1435
+ "headerPriceVariants": [],
1436
+ "hiddenKey": "hide:machine|coat-colour",
1437
+ "shownKey": "show:machine|coat-colour",
1438
+ "missingKey": "miss:machine|coat-colour",
1439
+ "invalidKey": "inv:machine|coat-colour",
1440
+ "rejectedKey": "rej:machine|coat-colour",
1441
+ "failedKey": "fail:machine|coat-colour",
1442
+ "uploadedKey": "up:machine|coat-colour",
1443
+ "uploadingKey": "load:machine",
1444
+ "freshKey": "fresh:machine",
1445
+ "values": [
1446
+ {
1447
+ "id": "machine|coat-colour|black",
1448
+ "key": "black",
1449
+ "label": "Black",
1450
+ "description": "",
1451
+ "color": "",
1452
+ "imageUrl": "",
1453
+ "isDefault": "false",
1454
+ "showSwatch": "false",
1455
+ "showImage": "false",
1456
+ "selectedKey": "sel:machine|coat-colour|black",
1457
+ "freshKey": "fresh:machine",
1458
+ "priceVariants": [
1459
+ {
1460
+ "activeKey": "pv:machine|coat-colour|black|d",
1461
+ "label": "",
1462
+ "isInitial": "true",
1463
+ "freshKey": "fresh:machine"
1464
+ }
1465
+ ]
1466
+ },
1467
+ {
1468
+ "id": "machine|coat-colour|red",
1469
+ "key": "red",
1470
+ "label": "Red",
1471
+ "description": "",
1472
+ "color": "",
1473
+ "imageUrl": "",
1474
+ "isDefault": "false",
1475
+ "showSwatch": "false",
1476
+ "showImage": "false",
1477
+ "selectedKey": "sel:machine|coat-colour|red",
1478
+ "freshKey": "fresh:machine",
1479
+ "priceVariants": [
1480
+ {
1481
+ "activeKey": "pv:machine|coat-colour|red|0",
1482
+ "label": "+$1.00",
1483
+ "isInitial": "false",
1484
+ "freshKey": "fresh:machine"
1485
+ },
1486
+ {
1487
+ "activeKey": "pv:machine|coat-colour|red|d",
1488
+ "label": "+$2.00",
1489
+ "isInitial": "true",
1490
+ "freshKey": "fresh:machine"
1491
+ }
1492
+ ]
1493
+ }
1494
+ ]
1495
+ },
1496
+ {
1497
+ "id": "machine|drawing",
1498
+ "key": "drawing",
1499
+ "label": "Drawing",
1500
+ "helpText": "",
1501
+ "placeholder": "",
1502
+ "unit": "",
1503
+ "required": "false",
1504
+ "isChoice": "false",
1505
+ "isMulti": "false",
1506
+ "isText": "false",
1507
+ "isLongText": "false",
1508
+ "isNumber": "false",
1509
+ "isToggle": "false",
1510
+ "isUpload": "true",
1511
+ "isButtons": "false",
1512
+ "isSwatches": "false",
1513
+ "isCards": "false",
1514
+ "isSelectable": "false",
1515
+ "isInput": "false",
1516
+ "initiallyVisible": "true",
1517
+ "cellRole": "",
1518
+ "rowRole": "group",
1519
+ "rowRequired": null,
1520
+ "idleTabIndex": "0",
1521
+ "inputType": "",
1522
+ "inputMode": "",
1523
+ "maxLengthText": "",
1524
+ "minText": "",
1525
+ "maxText": "",
1526
+ "stepText": "",
1527
+ "defaultValueText": "",
1528
+ "rangeHint": "",
1529
+ "acceptKind": "pdf",
1530
+ "acceptMime": "application/pdf",
1531
+ "priceVariants": [
1532
+ {
1533
+ "activeKey": "pv:machine|drawing|d",
1534
+ "label": "+$15.00",
1535
+ "isInitial": "true",
1536
+ "freshKey": "fresh:machine"
1537
+ }
1538
+ ],
1539
+ "headerPriceVariants": [
1540
+ {
1541
+ "activeKey": "pv:machine|drawing|d",
1542
+ "label": "+$15.00",
1543
+ "isInitial": "true",
1544
+ "freshKey": "fresh:machine"
1545
+ }
1546
+ ],
1547
+ "hiddenKey": "hide:machine|drawing",
1548
+ "shownKey": "show:machine|drawing",
1549
+ "missingKey": "miss:machine|drawing",
1550
+ "invalidKey": "inv:machine|drawing",
1551
+ "rejectedKey": "rej:machine|drawing",
1552
+ "failedKey": "fail:machine|drawing",
1553
+ "uploadedKey": "up:machine|drawing",
1554
+ "uploadingKey": "load:machine",
1555
+ "freshKey": "fresh:machine",
1556
+ "values": []
1557
+ },
1558
+ {
1559
+ "id": "machine|notes",
1560
+ "key": "notes",
1561
+ "label": "Notes",
1562
+ "helpText": "Anything we should know",
1563
+ "placeholder": "",
1564
+ "unit": "",
1565
+ "required": "false",
1566
+ "isChoice": "false",
1567
+ "isMulti": "false",
1568
+ "isText": "false",
1569
+ "isLongText": "true",
1570
+ "isNumber": "false",
1571
+ "isToggle": "false",
1572
+ "isUpload": "false",
1573
+ "isButtons": "false",
1574
+ "isSwatches": "false",
1575
+ "isCards": "false",
1576
+ "isSelectable": "false",
1577
+ "isInput": "false",
1578
+ "initiallyVisible": "true",
1579
+ "cellRole": "",
1580
+ "rowRole": "group",
1581
+ "rowRequired": null,
1582
+ "idleTabIndex": "0",
1583
+ "inputType": "text",
1584
+ "inputMode": "text",
1585
+ "maxLengthText": "2000",
1586
+ "minText": "",
1587
+ "maxText": "",
1588
+ "stepText": "",
1589
+ "defaultValueText": "",
1590
+ "rangeHint": "",
1591
+ "acceptKind": "",
1592
+ "acceptMime": "",
1593
+ "priceVariants": [
1594
+ {
1595
+ "activeKey": "pv:machine|notes|d",
1596
+ "label": "",
1597
+ "isInitial": "true",
1598
+ "freshKey": "fresh:machine"
1599
+ }
1600
+ ],
1601
+ "headerPriceVariants": [
1602
+ {
1603
+ "activeKey": "pv:machine|notes|d",
1604
+ "label": "",
1605
+ "isInitial": "true",
1606
+ "freshKey": "fresh:machine"
1607
+ }
1608
+ ],
1609
+ "hiddenKey": "hide:machine|notes",
1610
+ "shownKey": "show:machine|notes",
1611
+ "missingKey": "miss:machine|notes",
1612
+ "invalidKey": "inv:machine|notes",
1613
+ "rejectedKey": "rej:machine|notes",
1614
+ "failedKey": "fail:machine|notes",
1615
+ "uploadedKey": "up:machine|notes",
1616
+ "uploadingKey": "load:machine",
1617
+ "freshKey": "fresh:machine",
1618
+ "values": []
1619
+ }
1620
+ ],
1621
+ "optionGroupsJson": "[{\"key\":\"material\",\"label\":\"Material\",\"type\":\"choice\",\"required\":true,\"display\":\"swatches\",\"values\":[{\"key\":\"steel\",\"label\":\"Steel\",\"color\":\"#888888\",\"price\":{\"mode\":\"none\"},\"default\":true},{\"key\":\"alu\",\"label\":\"Aluminium\",\"price\":{\"mode\":\"percent\",\"percent\":10}}]},{\"key\":\"length\",\"label\":\"Length\",\"type\":\"number\",\"required\":true,\"min\":1,\"max\":20,\"step\":0.5,\"unit\":\"m\",\"defaultValue\":2,\"price\":{\"mode\":\"per-unit\",\"amount\":5},\"priceWhen\":[{\"groupKey\":\"material\",\"valueKeys\":[\"alu\"],\"price\":{\"mode\":\"per-unit\",\"amount\":3}}]},{\"key\":\"accessories\",\"label\":\"Accessories\",\"type\":\"multi-choice\",\"required\":false,\"display\":\"buttons\",\"values\":[{\"key\":\"clamp\",\"label\":\"Clamp\",\"price\":{\"mode\":\"fixed\",\"amount\":12.5},\"default\":true},{\"key\":\"stand\",\"label\":\"Stand\",\"price\":{\"mode\":\"fixed\",\"amount\":40}},{\"key\":\"cover\",\"label\":\"Cover\",\"price\":{\"mode\":\"fixed\",\"amount\":9.99}}],\"maxSelected\":2},{\"key\":\"coat\",\"label\":\"Protective coat\",\"type\":\"toggle\",\"required\":false,\"price\":{\"mode\":\"fixed\",\"amount\":6},\"priceWhen\":[{\"groupKey\":\"material\",\"valueKeys\":[\"alu\"],\"price\":{\"mode\":\"none\"}}]},{\"key\":\"coat-colour\",\"label\":\"Coat colour\",\"type\":\"choice\",\"required\":true,\"display\":\"buttons\",\"values\":[{\"key\":\"black\",\"label\":\"Black\",\"price\":{\"mode\":\"none\"}},{\"key\":\"red\",\"label\":\"Red\",\"price\":{\"mode\":\"fixed\",\"amount\":2},\"priceWhen\":[{\"groupKey\":\"coat\",\"valueKeys\":[\"on\"],\"price\":{\"mode\":\"fixed\",\"amount\":1}}]}],\"visibleWhen\":[{\"groupKey\":\"coat\",\"operator\":\"is-set\"}]},{\"key\":\"drawing\",\"label\":\"Drawing\",\"type\":\"upload\",\"required\":false,\"price\":{\"mode\":\"fixed\",\"amount\":15},\"accept\":\"pdf\",\"maxFiles\":1},{\"key\":\"notes\",\"label\":\"Notes\",\"type\":\"long-text\",\"required\":false,\"helpText\":\"Anything we should know\",\"price\":{\"mode\":\"none\"}}]",
1622
+ "optionsPricingJson": "{\"productId\":\"machine\",\"netBase\":18,\"originalNetBase\":20,\"taxRate\":0,\"symbol\":\"$\",\"position\":\"before\",\"pricesDisabled\":false,\"defaultCombinationId\":\"v-large\",\"variants\":[{\"id\":\"v-small\",\"options\":{\"size\":\"s\"},\"net\":27,\"originalNet\":30},{\"id\":\"v-large\",\"options\":{\"size\":\"l\"},\"net\":18,\"originalNet\":20}]}",
1623
+ "optionsDefaultDisplayPrice": "40.50",
1624
+ "optionsDefaultOriginalDisplayPrice": "42.50",
1625
+ "optionsDefaultSummary": "Material: Steel · Length: 2 m · Accessories: Clamp",
1626
+ "optionsFreshKey": "fresh:machine",
1627
+ "optionsValidKey": "valid:machine",
1628
+ "optionsOriginalKey": "orig:machine",
1629
+ "optionsSummaryKey": "sum:machine",
1630
+ "optionsFilesKey": "files:machine"
1631
+ }
1632
+ },
1633
+ {
1634
+ "name": "default choice with a surcharge cannot be quick-added",
1635
+ "includeDetail": false,
1636
+ "taxRate": 0,
1637
+ "currentLanguage": null,
1638
+ "mainLanguage": null,
1639
+ "variants": null,
1640
+ "record": {
1641
+ "id": "wrapped",
1642
+ "name": "wrapped",
1643
+ "slug": "wrapped",
1644
+ "price": 10,
1645
+ "currency": "USD",
1646
+ "created_at": "2026-01-01T00:00:00.000Z",
1647
+ "updated_at": "2026-01-01T00:00:00.000Z",
1648
+ "option_groups": "[{\"key\": \"wrap\", \"label\": \"Wrapping\", \"type\": \"choice\", \"required\": true, \"values\": [{\"key\": \"kraft\", \"label\": \"Kraft\", \"price\": {\"mode\": \"fixed\", \"amount\": 2}, \"default\": true}, {\"key\": \"silk\", \"label\": \"Silk\", \"price\": {\"mode\": \"percent\", \"percent\": 25}}]}, {\"key\": \"card\", \"label\": \"Card text\", \"type\": \"text\", \"price\": {\"mode\": \"fixed\", \"amount\": 1}}]"
1649
+ },
1650
+ "expected": {
1651
+ "hasProductOptions": "true",
1652
+ "optionsRequireInput": "false",
1653
+ "optionsQuickAdd": "false",
1654
+ "optionGroups": [],
1655
+ "optionGroupsJson": "[]",
1656
+ "optionsPricingJson": "{}",
1657
+ "optionsDefaultDisplayPrice": "",
1658
+ "optionsDefaultOriginalDisplayPrice": "",
1659
+ "optionsDefaultSummary": "",
1660
+ "optionsFreshKey": "",
1661
+ "optionsValidKey": "",
1662
+ "optionsOriginalKey": "",
1663
+ "optionsSummaryKey": "",
1664
+ "optionsFilesKey": ""
1665
+ }
1666
+ },
1667
+ {
1668
+ "name": "gift card options never carry a price",
1669
+ "includeDetail": true,
1670
+ "taxRate": 0,
1671
+ "currentLanguage": null,
1672
+ "mainLanguage": null,
1673
+ "variants": null,
1674
+ "record": {
1675
+ "id": "gift",
1676
+ "name": "gift",
1677
+ "slug": "gift",
1678
+ "price": 50,
1679
+ "currency": "USD",
1680
+ "created_at": "2026-01-01T00:00:00.000Z",
1681
+ "updated_at": "2026-01-01T00:00:00.000Z",
1682
+ "is_gift_card": true,
1683
+ "option_groups": "[{\"key\": \"wrap\", \"label\": \"Wrapping\", \"type\": \"choice\", \"required\": true, \"values\": [{\"key\": \"kraft\", \"label\": \"Kraft\", \"price\": {\"mode\": \"fixed\", \"amount\": 2}, \"default\": true}, {\"key\": \"silk\", \"label\": \"Silk\", \"price\": {\"mode\": \"percent\", \"percent\": 25}}]}, {\"key\": \"card\", \"label\": \"Card text\", \"type\": \"text\", \"price\": {\"mode\": \"fixed\", \"amount\": 1}}]"
1684
+ },
1685
+ "expected": {
1686
+ "hasProductOptions": "true",
1687
+ "optionsRequireInput": "false",
1688
+ "optionsQuickAdd": "true",
1689
+ "optionGroups": [
1690
+ {
1691
+ "id": "gift|wrap",
1692
+ "key": "wrap",
1693
+ "label": "Wrapping",
1694
+ "helpText": "",
1695
+ "placeholder": "",
1696
+ "unit": "",
1697
+ "required": "true",
1698
+ "isChoice": "true",
1699
+ "isMulti": "false",
1700
+ "isText": "false",
1701
+ "isLongText": "false",
1702
+ "isNumber": "false",
1703
+ "isToggle": "false",
1704
+ "isUpload": "false",
1705
+ "isButtons": "true",
1706
+ "isSwatches": "false",
1707
+ "isCards": "false",
1708
+ "isSelectable": "true",
1709
+ "isInput": "false",
1710
+ "initiallyVisible": "true",
1711
+ "cellRole": "radio",
1712
+ "rowRole": "radiogroup",
1713
+ "rowRequired": "true",
1714
+ "idleTabIndex": "-1",
1715
+ "inputType": "",
1716
+ "inputMode": "",
1717
+ "maxLengthText": "",
1718
+ "minText": "",
1719
+ "maxText": "",
1720
+ "stepText": "",
1721
+ "defaultValueText": "",
1722
+ "rangeHint": "",
1723
+ "acceptKind": "",
1724
+ "acceptMime": "",
1725
+ "priceVariants": [],
1726
+ "headerPriceVariants": [],
1727
+ "hiddenKey": "hide:gift|wrap",
1728
+ "shownKey": "show:gift|wrap",
1729
+ "missingKey": "miss:gift|wrap",
1730
+ "invalidKey": "inv:gift|wrap",
1731
+ "rejectedKey": "rej:gift|wrap",
1732
+ "failedKey": "fail:gift|wrap",
1733
+ "uploadedKey": "up:gift|wrap",
1734
+ "uploadingKey": "load:gift",
1735
+ "freshKey": "fresh:gift",
1736
+ "values": [
1737
+ {
1738
+ "id": "gift|wrap|kraft",
1739
+ "key": "kraft",
1740
+ "label": "Kraft",
1741
+ "description": "",
1742
+ "color": "",
1743
+ "imageUrl": "",
1744
+ "isDefault": "true",
1745
+ "showSwatch": "false",
1746
+ "showImage": "false",
1747
+ "selectedKey": "sel:gift|wrap|kraft",
1748
+ "freshKey": "fresh:gift",
1749
+ "priceVariants": [
1750
+ {
1751
+ "activeKey": "pv:gift|wrap|kraft|d",
1752
+ "label": "",
1753
+ "isInitial": "true",
1754
+ "freshKey": "fresh:gift"
1755
+ }
1756
+ ]
1757
+ },
1758
+ {
1759
+ "id": "gift|wrap|silk",
1760
+ "key": "silk",
1761
+ "label": "Silk",
1762
+ "description": "",
1763
+ "color": "",
1764
+ "imageUrl": "",
1765
+ "isDefault": "false",
1766
+ "showSwatch": "false",
1767
+ "showImage": "false",
1768
+ "selectedKey": "sel:gift|wrap|silk",
1769
+ "freshKey": "fresh:gift",
1770
+ "priceVariants": [
1771
+ {
1772
+ "activeKey": "pv:gift|wrap|silk|d",
1773
+ "label": "",
1774
+ "isInitial": "true",
1775
+ "freshKey": "fresh:gift"
1776
+ }
1777
+ ]
1778
+ }
1779
+ ]
1780
+ },
1781
+ {
1782
+ "id": "gift|card",
1783
+ "key": "card",
1784
+ "label": "Card text",
1785
+ "helpText": "",
1786
+ "placeholder": "",
1787
+ "unit": "",
1788
+ "required": "false",
1789
+ "isChoice": "false",
1790
+ "isMulti": "false",
1791
+ "isText": "true",
1792
+ "isLongText": "false",
1793
+ "isNumber": "false",
1794
+ "isToggle": "false",
1795
+ "isUpload": "false",
1796
+ "isButtons": "false",
1797
+ "isSwatches": "false",
1798
+ "isCards": "false",
1799
+ "isSelectable": "false",
1800
+ "isInput": "true",
1801
+ "initiallyVisible": "true",
1802
+ "cellRole": "",
1803
+ "rowRole": "group",
1804
+ "rowRequired": null,
1805
+ "idleTabIndex": "0",
1806
+ "inputType": "text",
1807
+ "inputMode": "text",
1808
+ "maxLengthText": "500",
1809
+ "minText": "",
1810
+ "maxText": "",
1811
+ "stepText": "",
1812
+ "defaultValueText": "",
1813
+ "rangeHint": "",
1814
+ "acceptKind": "",
1815
+ "acceptMime": "",
1816
+ "priceVariants": [
1817
+ {
1818
+ "activeKey": "pv:gift|card|d",
1819
+ "label": "",
1820
+ "isInitial": "true",
1821
+ "freshKey": "fresh:gift"
1822
+ }
1823
+ ],
1824
+ "headerPriceVariants": [
1825
+ {
1826
+ "activeKey": "pv:gift|card|d",
1827
+ "label": "",
1828
+ "isInitial": "true",
1829
+ "freshKey": "fresh:gift"
1830
+ }
1831
+ ],
1832
+ "hiddenKey": "hide:gift|card",
1833
+ "shownKey": "show:gift|card",
1834
+ "missingKey": "miss:gift|card",
1835
+ "invalidKey": "inv:gift|card",
1836
+ "rejectedKey": "rej:gift|card",
1837
+ "failedKey": "fail:gift|card",
1838
+ "uploadedKey": "up:gift|card",
1839
+ "uploadingKey": "load:gift",
1840
+ "freshKey": "fresh:gift",
1841
+ "values": []
1842
+ }
1843
+ ],
1844
+ "optionGroupsJson": "[{\"key\":\"wrap\",\"label\":\"Wrapping\",\"type\":\"choice\",\"required\":true,\"display\":\"buttons\",\"values\":[{\"key\":\"kraft\",\"label\":\"Kraft\",\"price\":{\"mode\":\"fixed\",\"amount\":2},\"default\":true},{\"key\":\"silk\",\"label\":\"Silk\",\"price\":{\"mode\":\"percent\",\"percent\":25}}]},{\"key\":\"card\",\"label\":\"Card text\",\"type\":\"text\",\"required\":false,\"price\":{\"mode\":\"fixed\",\"amount\":1}}]",
1845
+ "optionsPricingJson": "{\"productId\":\"gift\",\"netBase\":50,\"originalNetBase\":null,\"taxRate\":0,\"symbol\":\"$\",\"position\":\"before\",\"pricesDisabled\":true,\"defaultCombinationId\":\"\",\"variants\":[]}",
1846
+ "optionsDefaultDisplayPrice": "50.00",
1847
+ "optionsDefaultOriginalDisplayPrice": "",
1848
+ "optionsDefaultSummary": "Wrapping: Kraft",
1849
+ "optionsFreshKey": "fresh:gift",
1850
+ "optionsValidKey": "valid:gift",
1851
+ "optionsOriginalKey": "orig:gift",
1852
+ "optionsSummaryKey": "sum:gift",
1853
+ "optionsFilesKey": "files:gift"
1854
+ }
1855
+ },
1856
+ {
1857
+ "name": "subscription options never carry a price",
1858
+ "includeDetail": true,
1859
+ "taxRate": 0,
1860
+ "currentLanguage": null,
1861
+ "mainLanguage": null,
1862
+ "variants": null,
1863
+ "record": {
1864
+ "id": "plan",
1865
+ "name": "plan",
1866
+ "slug": "plan",
1867
+ "price": 10,
1868
+ "currency": "USD",
1869
+ "created_at": "2026-01-01T00:00:00.000Z",
1870
+ "updated_at": "2026-01-01T00:00:00.000Z",
1871
+ "payment_type": "recurring",
1872
+ "recurring_interval": "month",
1873
+ "option_groups": "[{\"key\": \"wrap\", \"label\": \"Wrapping\", \"type\": \"choice\", \"required\": true, \"values\": [{\"key\": \"kraft\", \"label\": \"Kraft\", \"price\": {\"mode\": \"fixed\", \"amount\": 2}, \"default\": true}, {\"key\": \"silk\", \"label\": \"Silk\", \"price\": {\"mode\": \"percent\", \"percent\": 25}}]}, {\"key\": \"card\", \"label\": \"Card text\", \"type\": \"text\", \"price\": {\"mode\": \"fixed\", \"amount\": 1}}]"
1874
+ },
1875
+ "expected": {
1876
+ "hasProductOptions": "true",
1877
+ "optionsRequireInput": "false",
1878
+ "optionsQuickAdd": "true",
1879
+ "optionGroups": [
1880
+ {
1881
+ "id": "plan|wrap",
1882
+ "key": "wrap",
1883
+ "label": "Wrapping",
1884
+ "helpText": "",
1885
+ "placeholder": "",
1886
+ "unit": "",
1887
+ "required": "true",
1888
+ "isChoice": "true",
1889
+ "isMulti": "false",
1890
+ "isText": "false",
1891
+ "isLongText": "false",
1892
+ "isNumber": "false",
1893
+ "isToggle": "false",
1894
+ "isUpload": "false",
1895
+ "isButtons": "true",
1896
+ "isSwatches": "false",
1897
+ "isCards": "false",
1898
+ "isSelectable": "true",
1899
+ "isInput": "false",
1900
+ "initiallyVisible": "true",
1901
+ "cellRole": "radio",
1902
+ "rowRole": "radiogroup",
1903
+ "rowRequired": "true",
1904
+ "idleTabIndex": "-1",
1905
+ "inputType": "",
1906
+ "inputMode": "",
1907
+ "maxLengthText": "",
1908
+ "minText": "",
1909
+ "maxText": "",
1910
+ "stepText": "",
1911
+ "defaultValueText": "",
1912
+ "rangeHint": "",
1913
+ "acceptKind": "",
1914
+ "acceptMime": "",
1915
+ "priceVariants": [],
1916
+ "headerPriceVariants": [],
1917
+ "hiddenKey": "hide:plan|wrap",
1918
+ "shownKey": "show:plan|wrap",
1919
+ "missingKey": "miss:plan|wrap",
1920
+ "invalidKey": "inv:plan|wrap",
1921
+ "rejectedKey": "rej:plan|wrap",
1922
+ "failedKey": "fail:plan|wrap",
1923
+ "uploadedKey": "up:plan|wrap",
1924
+ "uploadingKey": "load:plan",
1925
+ "freshKey": "fresh:plan",
1926
+ "values": [
1927
+ {
1928
+ "id": "plan|wrap|kraft",
1929
+ "key": "kraft",
1930
+ "label": "Kraft",
1931
+ "description": "",
1932
+ "color": "",
1933
+ "imageUrl": "",
1934
+ "isDefault": "true",
1935
+ "showSwatch": "false",
1936
+ "showImage": "false",
1937
+ "selectedKey": "sel:plan|wrap|kraft",
1938
+ "freshKey": "fresh:plan",
1939
+ "priceVariants": [
1940
+ {
1941
+ "activeKey": "pv:plan|wrap|kraft|d",
1942
+ "label": "",
1943
+ "isInitial": "true",
1944
+ "freshKey": "fresh:plan"
1945
+ }
1946
+ ]
1947
+ },
1948
+ {
1949
+ "id": "plan|wrap|silk",
1950
+ "key": "silk",
1951
+ "label": "Silk",
1952
+ "description": "",
1953
+ "color": "",
1954
+ "imageUrl": "",
1955
+ "isDefault": "false",
1956
+ "showSwatch": "false",
1957
+ "showImage": "false",
1958
+ "selectedKey": "sel:plan|wrap|silk",
1959
+ "freshKey": "fresh:plan",
1960
+ "priceVariants": [
1961
+ {
1962
+ "activeKey": "pv:plan|wrap|silk|d",
1963
+ "label": "",
1964
+ "isInitial": "true",
1965
+ "freshKey": "fresh:plan"
1966
+ }
1967
+ ]
1968
+ }
1969
+ ]
1970
+ },
1971
+ {
1972
+ "id": "plan|card",
1973
+ "key": "card",
1974
+ "label": "Card text",
1975
+ "helpText": "",
1976
+ "placeholder": "",
1977
+ "unit": "",
1978
+ "required": "false",
1979
+ "isChoice": "false",
1980
+ "isMulti": "false",
1981
+ "isText": "true",
1982
+ "isLongText": "false",
1983
+ "isNumber": "false",
1984
+ "isToggle": "false",
1985
+ "isUpload": "false",
1986
+ "isButtons": "false",
1987
+ "isSwatches": "false",
1988
+ "isCards": "false",
1989
+ "isSelectable": "false",
1990
+ "isInput": "true",
1991
+ "initiallyVisible": "true",
1992
+ "cellRole": "",
1993
+ "rowRole": "group",
1994
+ "rowRequired": null,
1995
+ "idleTabIndex": "0",
1996
+ "inputType": "text",
1997
+ "inputMode": "text",
1998
+ "maxLengthText": "500",
1999
+ "minText": "",
2000
+ "maxText": "",
2001
+ "stepText": "",
2002
+ "defaultValueText": "",
2003
+ "rangeHint": "",
2004
+ "acceptKind": "",
2005
+ "acceptMime": "",
2006
+ "priceVariants": [
2007
+ {
2008
+ "activeKey": "pv:plan|card|d",
2009
+ "label": "",
2010
+ "isInitial": "true",
2011
+ "freshKey": "fresh:plan"
2012
+ }
2013
+ ],
2014
+ "headerPriceVariants": [
2015
+ {
2016
+ "activeKey": "pv:plan|card|d",
2017
+ "label": "",
2018
+ "isInitial": "true",
2019
+ "freshKey": "fresh:plan"
2020
+ }
2021
+ ],
2022
+ "hiddenKey": "hide:plan|card",
2023
+ "shownKey": "show:plan|card",
2024
+ "missingKey": "miss:plan|card",
2025
+ "invalidKey": "inv:plan|card",
2026
+ "rejectedKey": "rej:plan|card",
2027
+ "failedKey": "fail:plan|card",
2028
+ "uploadedKey": "up:plan|card",
2029
+ "uploadingKey": "load:plan",
2030
+ "freshKey": "fresh:plan",
2031
+ "values": []
2032
+ }
2033
+ ],
2034
+ "optionGroupsJson": "[{\"key\":\"wrap\",\"label\":\"Wrapping\",\"type\":\"choice\",\"required\":true,\"display\":\"buttons\",\"values\":[{\"key\":\"kraft\",\"label\":\"Kraft\",\"price\":{\"mode\":\"fixed\",\"amount\":2},\"default\":true},{\"key\":\"silk\",\"label\":\"Silk\",\"price\":{\"mode\":\"percent\",\"percent\":25}}]},{\"key\":\"card\",\"label\":\"Card text\",\"type\":\"text\",\"required\":false,\"price\":{\"mode\":\"fixed\",\"amount\":1}}]",
2035
+ "optionsPricingJson": "{\"productId\":\"plan\",\"netBase\":10,\"originalNetBase\":null,\"taxRate\":0,\"symbol\":\"$\",\"position\":\"before\",\"pricesDisabled\":true,\"defaultCombinationId\":\"\",\"variants\":[]}",
2036
+ "optionsDefaultDisplayPrice": "10.00",
2037
+ "optionsDefaultOriginalDisplayPrice": "",
2038
+ "optionsDefaultSummary": "Wrapping: Kraft",
2039
+ "optionsFreshKey": "fresh:plan",
2040
+ "optionsValidKey": "valid:plan",
2041
+ "optionsOriginalKey": "orig:plan",
2042
+ "optionsSummaryKey": "sum:plan",
2043
+ "optionsFilesKey": "files:plan"
2044
+ }
2045
+ },
2046
+ {
2047
+ "name": "a translated clone overlays strings and never prices",
2048
+ "includeDetail": true,
2049
+ "taxRate": 0,
2050
+ "currentLanguage": "fr",
2051
+ "mainLanguage": "en",
2052
+ "variants": null,
2053
+ "record": {
2054
+ "id": "print-fr",
2055
+ "name": "print-fr",
2056
+ "slug": "print-fr",
2057
+ "price": 10,
2058
+ "currency": "USD",
2059
+ "created_at": "2026-01-01T00:00:00.000Z",
2060
+ "updated_at": "2026-01-01T00:00:00.000Z",
2061
+ "option_groups": "[{\"key\": \"size\", \"label\": \"Size\", \"type\": \"choice\", \"required\": true, \"values\": [{\"key\": \"a5\", \"label\": \"A5\", \"price\": {\"mode\": \"none\"}, \"default\": true}, {\"key\": \"a4\", \"label\": \"A4\", \"price\": {\"mode\": \"fixed\", \"amount\": 4}}, {\"key\": \"a3\", \"label\": \"A3\", \"price\": {\"mode\": \"fixed\", \"amount\": 9}}]}, {\"key\": \"paper\", \"label\": \"Paper\", \"type\": \"choice\", \"display\": \"cards\", \"required\": true, \"values\": [{\"key\": \"matte\", \"label\": \"Matte\", \"description\": \"Soft, no glare\", \"price\": {\"mode\": \"none\"}, \"default\": true, \"imageUrl\": \"https://cdn.example.com/matte.jpg\"}, {\"key\": \"glossy\", \"label\": \"Glossy\", \"price\": {\"mode\": \"fixed\", \"amount\": 3}, \"imageUrl\": \"TQ_unknown_asset\", \"priceWhen\": [{\"groupKey\": \"size\", \"valueKeys\": [\"a4\"], \"price\": {\"mode\": \"fixed\", \"amount\": 5}}, {\"groupKey\": \"size\", \"valueKeys\": [\"a3\"], \"price\": {\"mode\": \"fixed\", \"amount\": 8}}]}, {\"key\": \"fine-art\", \"label\": \"Fine-art\", \"price\": {\"mode\": \"percent\", \"percent\": 40}}]}, {\"key\": \"photo\", \"label\": \"Your photo\", \"type\": \"upload\", \"required\": true, \"accept\": \"image\", \"helpText\": \"At least 2000 px wide\"}, {\"key\": \"message\", \"label\": \"Message\", \"type\": \"text\", \"required\": false, \"maxLength\": 120, \"placeholder\": \"For Ana\"}]",
2062
+ "fr_option_groups": "[{\"key\": \"size\", \"label\": \"Taille\", \"type\": \"choice\", \"required\": true, \"values\": [{\"key\": \"a5\", \"label\": \"A5 (fr)\", \"price\": {\"mode\": \"fixed\", \"amount\": 99}, \"default\": true}, {\"key\": \"a4\", \"label\": \"A4 (fr)\", \"price\": {\"mode\": \"fixed\", \"amount\": 99}}, {\"key\": \"a3\", \"label\": \"A3 (fr)\", \"price\": {\"mode\": \"fixed\", \"amount\": 99}}]}, {\"key\": \"paper\", \"label\": \"Paper\", \"type\": \"choice\", \"display\": \"cards\", \"required\": true, \"values\": [{\"key\": \"matte\", \"label\": \"Mat\", \"description\": \"Doux, sans reflet\", \"price\": {\"mode\": \"none\"}, \"default\": true, \"imageUrl\": \"https://cdn.example.com/matte.jpg\"}, {\"key\": \"glossy\", \"label\": \"Glossy\", \"price\": {\"mode\": \"fixed\", \"amount\": 3}, \"imageUrl\": \"TQ_unknown_asset\", \"priceWhen\": [{\"groupKey\": \"size\", \"valueKeys\": [\"a4\"], \"price\": {\"mode\": \"fixed\", \"amount\": 5}}, {\"groupKey\": \"size\", \"valueKeys\": [\"a3\"], \"price\": {\"mode\": \"fixed\", \"amount\": 8}}]}, {\"key\": \"fine-art\", \"label\": \"Fine-art\", \"price\": {\"mode\": \"percent\", \"percent\": 40}}]}, {\"key\": \"photo\", \"label\": \"Your photo\", \"type\": \"upload\", \"required\": true, \"accept\": \"image\", \"helpText\": \"Au moins 2000 px\"}, {\"key\": \"message\", \"label\": \"Message\", \"type\": \"text\", \"required\": false, \"maxLength\": 120, \"placeholder\": \"Pour Ana\"}]"
2063
+ },
2064
+ "expected": {
2065
+ "hasProductOptions": "true",
2066
+ "optionsRequireInput": "true",
2067
+ "optionsQuickAdd": "false",
2068
+ "optionGroups": [
2069
+ {
2070
+ "id": "print-fr|size",
2071
+ "key": "size",
2072
+ "label": "Taille",
2073
+ "helpText": "",
2074
+ "placeholder": "",
2075
+ "unit": "",
2076
+ "required": "true",
2077
+ "isChoice": "true",
2078
+ "isMulti": "false",
2079
+ "isText": "false",
2080
+ "isLongText": "false",
2081
+ "isNumber": "false",
2082
+ "isToggle": "false",
2083
+ "isUpload": "false",
2084
+ "isButtons": "true",
2085
+ "isSwatches": "false",
2086
+ "isCards": "false",
2087
+ "isSelectable": "true",
2088
+ "isInput": "false",
2089
+ "initiallyVisible": "true",
2090
+ "cellRole": "radio",
2091
+ "rowRole": "radiogroup",
2092
+ "rowRequired": "true",
2093
+ "idleTabIndex": "-1",
2094
+ "inputType": "",
2095
+ "inputMode": "",
2096
+ "maxLengthText": "",
2097
+ "minText": "",
2098
+ "maxText": "",
2099
+ "stepText": "",
2100
+ "defaultValueText": "",
2101
+ "rangeHint": "",
2102
+ "acceptKind": "",
2103
+ "acceptMime": "",
2104
+ "priceVariants": [],
2105
+ "headerPriceVariants": [],
2106
+ "hiddenKey": "hide:print-fr|size",
2107
+ "shownKey": "show:print-fr|size",
2108
+ "missingKey": "miss:print-fr|size",
2109
+ "invalidKey": "inv:print-fr|size",
2110
+ "rejectedKey": "rej:print-fr|size",
2111
+ "failedKey": "fail:print-fr|size",
2112
+ "uploadedKey": "up:print-fr|size",
2113
+ "uploadingKey": "load:print-fr",
2114
+ "freshKey": "fresh:print-fr",
2115
+ "values": [
2116
+ {
2117
+ "id": "print-fr|size|a5",
2118
+ "key": "a5",
2119
+ "label": "A5 (fr)",
2120
+ "description": "",
2121
+ "color": "",
2122
+ "imageUrl": "",
2123
+ "isDefault": "true",
2124
+ "showSwatch": "false",
2125
+ "showImage": "false",
2126
+ "selectedKey": "sel:print-fr|size|a5",
2127
+ "freshKey": "fresh:print-fr",
2128
+ "priceVariants": [
2129
+ {
2130
+ "activeKey": "pv:print-fr|size|a5|d",
2131
+ "label": "",
2132
+ "isInitial": "true",
2133
+ "freshKey": "fresh:print-fr"
2134
+ }
2135
+ ]
2136
+ },
2137
+ {
2138
+ "id": "print-fr|size|a4",
2139
+ "key": "a4",
2140
+ "label": "A4 (fr)",
2141
+ "description": "",
2142
+ "color": "",
2143
+ "imageUrl": "",
2144
+ "isDefault": "false",
2145
+ "showSwatch": "false",
2146
+ "showImage": "false",
2147
+ "selectedKey": "sel:print-fr|size|a4",
2148
+ "freshKey": "fresh:print-fr",
2149
+ "priceVariants": [
2150
+ {
2151
+ "activeKey": "pv:print-fr|size|a4|d",
2152
+ "label": "+$4.00",
2153
+ "isInitial": "true",
2154
+ "freshKey": "fresh:print-fr"
2155
+ }
2156
+ ]
2157
+ },
2158
+ {
2159
+ "id": "print-fr|size|a3",
2160
+ "key": "a3",
2161
+ "label": "A3 (fr)",
2162
+ "description": "",
2163
+ "color": "",
2164
+ "imageUrl": "",
2165
+ "isDefault": "false",
2166
+ "showSwatch": "false",
2167
+ "showImage": "false",
2168
+ "selectedKey": "sel:print-fr|size|a3",
2169
+ "freshKey": "fresh:print-fr",
2170
+ "priceVariants": [
2171
+ {
2172
+ "activeKey": "pv:print-fr|size|a3|d",
2173
+ "label": "+$9.00",
2174
+ "isInitial": "true",
2175
+ "freshKey": "fresh:print-fr"
2176
+ }
2177
+ ]
2178
+ }
2179
+ ]
2180
+ },
2181
+ {
2182
+ "id": "print-fr|paper",
2183
+ "key": "paper",
2184
+ "label": "Paper",
2185
+ "helpText": "",
2186
+ "placeholder": "",
2187
+ "unit": "",
2188
+ "required": "true",
2189
+ "isChoice": "true",
2190
+ "isMulti": "false",
2191
+ "isText": "false",
2192
+ "isLongText": "false",
2193
+ "isNumber": "false",
2194
+ "isToggle": "false",
2195
+ "isUpload": "false",
2196
+ "isButtons": "false",
2197
+ "isSwatches": "false",
2198
+ "isCards": "true",
2199
+ "isSelectable": "true",
2200
+ "isInput": "false",
2201
+ "initiallyVisible": "true",
2202
+ "cellRole": "radio",
2203
+ "rowRole": "radiogroup",
2204
+ "rowRequired": "true",
2205
+ "idleTabIndex": "-1",
2206
+ "inputType": "",
2207
+ "inputMode": "",
2208
+ "maxLengthText": "",
2209
+ "minText": "",
2210
+ "maxText": "",
2211
+ "stepText": "",
2212
+ "defaultValueText": "",
2213
+ "rangeHint": "",
2214
+ "acceptKind": "",
2215
+ "acceptMime": "",
2216
+ "priceVariants": [],
2217
+ "headerPriceVariants": [],
2218
+ "hiddenKey": "hide:print-fr|paper",
2219
+ "shownKey": "show:print-fr|paper",
2220
+ "missingKey": "miss:print-fr|paper",
2221
+ "invalidKey": "inv:print-fr|paper",
2222
+ "rejectedKey": "rej:print-fr|paper",
2223
+ "failedKey": "fail:print-fr|paper",
2224
+ "uploadedKey": "up:print-fr|paper",
2225
+ "uploadingKey": "load:print-fr",
2226
+ "freshKey": "fresh:print-fr",
2227
+ "values": [
2228
+ {
2229
+ "id": "print-fr|paper|matte",
2230
+ "key": "matte",
2231
+ "label": "Mat",
2232
+ "description": "Doux, sans reflet",
2233
+ "color": "",
2234
+ "imageUrl": "https://cdn.example.com/matte.jpg",
2235
+ "isDefault": "true",
2236
+ "showSwatch": "false",
2237
+ "showImage": "true",
2238
+ "selectedKey": "sel:print-fr|paper|matte",
2239
+ "freshKey": "fresh:print-fr",
2240
+ "priceVariants": [
2241
+ {
2242
+ "activeKey": "pv:print-fr|paper|matte|d",
2243
+ "label": "",
2244
+ "isInitial": "true",
2245
+ "freshKey": "fresh:print-fr"
2246
+ }
2247
+ ]
2248
+ },
2249
+ {
2250
+ "id": "print-fr|paper|glossy",
2251
+ "key": "glossy",
2252
+ "label": "Glossy",
2253
+ "description": "",
2254
+ "color": "",
2255
+ "imageUrl": "",
2256
+ "isDefault": "false",
2257
+ "showSwatch": "false",
2258
+ "showImage": "false",
2259
+ "selectedKey": "sel:print-fr|paper|glossy",
2260
+ "freshKey": "fresh:print-fr",
2261
+ "priceVariants": [
2262
+ {
2263
+ "activeKey": "pv:print-fr|paper|glossy|0",
2264
+ "label": "+$5.00",
2265
+ "isInitial": "false",
2266
+ "freshKey": "fresh:print-fr"
2267
+ },
2268
+ {
2269
+ "activeKey": "pv:print-fr|paper|glossy|1",
2270
+ "label": "+$8.00",
2271
+ "isInitial": "false",
2272
+ "freshKey": "fresh:print-fr"
2273
+ },
2274
+ {
2275
+ "activeKey": "pv:print-fr|paper|glossy|d",
2276
+ "label": "+$3.00",
2277
+ "isInitial": "true",
2278
+ "freshKey": "fresh:print-fr"
2279
+ }
2280
+ ]
2281
+ },
2282
+ {
2283
+ "id": "print-fr|paper|fine-art",
2284
+ "key": "fine-art",
2285
+ "label": "Fine-art",
2286
+ "description": "",
2287
+ "color": "",
2288
+ "imageUrl": "",
2289
+ "isDefault": "false",
2290
+ "showSwatch": "false",
2291
+ "showImage": "false",
2292
+ "selectedKey": "sel:print-fr|paper|fine-art",
2293
+ "freshKey": "fresh:print-fr",
2294
+ "priceVariants": [
2295
+ {
2296
+ "activeKey": "pv:print-fr|paper|fine-art|d",
2297
+ "label": "+40%",
2298
+ "isInitial": "true",
2299
+ "freshKey": "fresh:print-fr"
2300
+ }
2301
+ ]
2302
+ }
2303
+ ]
2304
+ },
2305
+ {
2306
+ "id": "print-fr|photo",
2307
+ "key": "photo",
2308
+ "label": "Your photo",
2309
+ "helpText": "Au moins 2000 px",
2310
+ "placeholder": "",
2311
+ "unit": "",
2312
+ "required": "true",
2313
+ "isChoice": "false",
2314
+ "isMulti": "false",
2315
+ "isText": "false",
2316
+ "isLongText": "false",
2317
+ "isNumber": "false",
2318
+ "isToggle": "false",
2319
+ "isUpload": "true",
2320
+ "isButtons": "false",
2321
+ "isSwatches": "false",
2322
+ "isCards": "false",
2323
+ "isSelectable": "false",
2324
+ "isInput": "false",
2325
+ "initiallyVisible": "true",
2326
+ "cellRole": "",
2327
+ "rowRole": "group",
2328
+ "rowRequired": null,
2329
+ "idleTabIndex": "0",
2330
+ "inputType": "",
2331
+ "inputMode": "",
2332
+ "maxLengthText": "",
2333
+ "minText": "",
2334
+ "maxText": "",
2335
+ "stepText": "",
2336
+ "defaultValueText": "",
2337
+ "rangeHint": "",
2338
+ "acceptKind": "image",
2339
+ "acceptMime": "image/jpeg,image/png,image/webp,image/gif",
2340
+ "priceVariants": [
2341
+ {
2342
+ "activeKey": "pv:print-fr|photo|d",
2343
+ "label": "",
2344
+ "isInitial": "true",
2345
+ "freshKey": "fresh:print-fr"
2346
+ }
2347
+ ],
2348
+ "headerPriceVariants": [
2349
+ {
2350
+ "activeKey": "pv:print-fr|photo|d",
2351
+ "label": "",
2352
+ "isInitial": "true",
2353
+ "freshKey": "fresh:print-fr"
2354
+ }
2355
+ ],
2356
+ "hiddenKey": "hide:print-fr|photo",
2357
+ "shownKey": "show:print-fr|photo",
2358
+ "missingKey": "miss:print-fr|photo",
2359
+ "invalidKey": "inv:print-fr|photo",
2360
+ "rejectedKey": "rej:print-fr|photo",
2361
+ "failedKey": "fail:print-fr|photo",
2362
+ "uploadedKey": "up:print-fr|photo",
2363
+ "uploadingKey": "load:print-fr",
2364
+ "freshKey": "fresh:print-fr",
2365
+ "values": []
2366
+ },
2367
+ {
2368
+ "id": "print-fr|message",
2369
+ "key": "message",
2370
+ "label": "Message",
2371
+ "helpText": "",
2372
+ "placeholder": "Pour Ana",
2373
+ "unit": "",
2374
+ "required": "false",
2375
+ "isChoice": "false",
2376
+ "isMulti": "false",
2377
+ "isText": "true",
2378
+ "isLongText": "false",
2379
+ "isNumber": "false",
2380
+ "isToggle": "false",
2381
+ "isUpload": "false",
2382
+ "isButtons": "false",
2383
+ "isSwatches": "false",
2384
+ "isCards": "false",
2385
+ "isSelectable": "false",
2386
+ "isInput": "true",
2387
+ "initiallyVisible": "true",
2388
+ "cellRole": "",
2389
+ "rowRole": "group",
2390
+ "rowRequired": null,
2391
+ "idleTabIndex": "0",
2392
+ "inputType": "text",
2393
+ "inputMode": "text",
2394
+ "maxLengthText": "120",
2395
+ "minText": "",
2396
+ "maxText": "",
2397
+ "stepText": "",
2398
+ "defaultValueText": "",
2399
+ "rangeHint": "",
2400
+ "acceptKind": "",
2401
+ "acceptMime": "",
2402
+ "priceVariants": [
2403
+ {
2404
+ "activeKey": "pv:print-fr|message|d",
2405
+ "label": "",
2406
+ "isInitial": "true",
2407
+ "freshKey": "fresh:print-fr"
2408
+ }
2409
+ ],
2410
+ "headerPriceVariants": [
2411
+ {
2412
+ "activeKey": "pv:print-fr|message|d",
2413
+ "label": "",
2414
+ "isInitial": "true",
2415
+ "freshKey": "fresh:print-fr"
2416
+ }
2417
+ ],
2418
+ "hiddenKey": "hide:print-fr|message",
2419
+ "shownKey": "show:print-fr|message",
2420
+ "missingKey": "miss:print-fr|message",
2421
+ "invalidKey": "inv:print-fr|message",
2422
+ "rejectedKey": "rej:print-fr|message",
2423
+ "failedKey": "fail:print-fr|message",
2424
+ "uploadedKey": "up:print-fr|message",
2425
+ "uploadingKey": "load:print-fr",
2426
+ "freshKey": "fresh:print-fr",
2427
+ "values": []
2428
+ }
2429
+ ],
2430
+ "optionGroupsJson": "[{\"key\":\"size\",\"label\":\"Taille\",\"type\":\"choice\",\"required\":true,\"display\":\"buttons\",\"values\":[{\"key\":\"a5\",\"label\":\"A5 (fr)\",\"price\":{\"mode\":\"none\"},\"default\":true},{\"key\":\"a4\",\"label\":\"A4 (fr)\",\"price\":{\"mode\":\"fixed\",\"amount\":4}},{\"key\":\"a3\",\"label\":\"A3 (fr)\",\"price\":{\"mode\":\"fixed\",\"amount\":9}}]},{\"key\":\"paper\",\"label\":\"Paper\",\"type\":\"choice\",\"required\":true,\"display\":\"cards\",\"values\":[{\"key\":\"matte\",\"label\":\"Mat\",\"description\":\"Doux, sans reflet\",\"imageUrl\":\"https://cdn.example.com/matte.jpg\",\"price\":{\"mode\":\"none\"},\"default\":true},{\"key\":\"glossy\",\"label\":\"Glossy\",\"price\":{\"mode\":\"fixed\",\"amount\":3},\"priceWhen\":[{\"groupKey\":\"size\",\"valueKeys\":[\"a4\"],\"price\":{\"mode\":\"fixed\",\"amount\":5}},{\"groupKey\":\"size\",\"valueKeys\":[\"a3\"],\"price\":{\"mode\":\"fixed\",\"amount\":8}}]},{\"key\":\"fine-art\",\"label\":\"Fine-art\",\"price\":{\"mode\":\"percent\",\"percent\":40}}]},{\"key\":\"photo\",\"label\":\"Your photo\",\"type\":\"upload\",\"required\":true,\"helpText\":\"Au moins 2000 px\",\"price\":{\"mode\":\"none\"},\"accept\":\"image\",\"maxFiles\":1},{\"key\":\"message\",\"label\":\"Message\",\"type\":\"text\",\"required\":false,\"placeholder\":\"Pour Ana\",\"maxLength\":120,\"price\":{\"mode\":\"none\"}}]",
2431
+ "optionsPricingJson": "{\"productId\":\"print-fr\",\"netBase\":10,\"originalNetBase\":null,\"taxRate\":0,\"symbol\":\"$\",\"position\":\"before\",\"pricesDisabled\":false,\"defaultCombinationId\":\"\",\"variants\":[]}",
2432
+ "optionsDefaultDisplayPrice": "10.00",
2433
+ "optionsDefaultOriginalDisplayPrice": "",
2434
+ "optionsDefaultSummary": "Taille: A5 (fr) · Paper: Mat",
2435
+ "optionsFreshKey": "fresh:print-fr",
2436
+ "optionsValidKey": "valid:print-fr",
2437
+ "optionsOriginalKey": "orig:print-fr",
2438
+ "optionsSummaryKey": "sum:print-fr",
2439
+ "optionsFilesKey": "files:print-fr"
2440
+ }
2441
+ },
2442
+ {
2443
+ "name": "a product without options",
2444
+ "includeDetail": true,
2445
+ "taxRate": 0,
2446
+ "currentLanguage": null,
2447
+ "mainLanguage": null,
2448
+ "variants": null,
2449
+ "record": {
2450
+ "id": "plain",
2451
+ "name": "plain",
2452
+ "slug": "plain",
2453
+ "price": 10,
2454
+ "currency": "USD",
2455
+ "created_at": "2026-01-01T00:00:00.000Z",
2456
+ "updated_at": "2026-01-01T00:00:00.000Z"
2457
+ },
2458
+ "expected": {
2459
+ "hasProductOptions": "false",
2460
+ "optionsRequireInput": "false",
2461
+ "optionsQuickAdd": "true",
2462
+ "optionGroups": [],
2463
+ "optionGroupsJson": "[]",
2464
+ "optionsPricingJson": "{}",
2465
+ "optionsDefaultDisplayPrice": "",
2466
+ "optionsDefaultOriginalDisplayPrice": "",
2467
+ "optionsDefaultSummary": "",
2468
+ "optionsFreshKey": "",
2469
+ "optionsValidKey": "",
2470
+ "optionsOriginalKey": "",
2471
+ "optionsSummaryKey": "",
2472
+ "optionsFilesKey": ""
2473
+ }
2474
+ },
2475
+ {
2476
+ "name": "unreadable options read as none",
2477
+ "includeDetail": true,
2478
+ "taxRate": 0,
2479
+ "currentLanguage": null,
2480
+ "mainLanguage": null,
2481
+ "variants": null,
2482
+ "record": {
2483
+ "id": "broken",
2484
+ "name": "broken",
2485
+ "slug": "broken",
2486
+ "price": 10,
2487
+ "currency": "USD",
2488
+ "created_at": "2026-01-01T00:00:00.000Z",
2489
+ "updated_at": "2026-01-01T00:00:00.000Z",
2490
+ "option_groups": "[{not json"
2491
+ },
2492
+ "expected": {
2493
+ "hasProductOptions": "false",
2494
+ "optionsRequireInput": "false",
2495
+ "optionsQuickAdd": "true",
2496
+ "optionGroups": [],
2497
+ "optionGroupsJson": "[]",
2498
+ "optionsPricingJson": "{}",
2499
+ "optionsDefaultDisplayPrice": "",
2500
+ "optionsDefaultOriginalDisplayPrice": "",
2501
+ "optionsDefaultSummary": "",
2502
+ "optionsFreshKey": "",
2503
+ "optionsValidKey": "",
2504
+ "optionsOriginalKey": "",
2505
+ "optionsSummaryKey": "",
2506
+ "optionsFilesKey": ""
2507
+ }
2508
+ }
2509
+ ]
2510
+ }