@gem-sdk/adapter-shopify 1.58.0 → 2.0.0-dev.184
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.
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
quantityUnit
|
|
13
13
|
quantityValue
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
price {
|
|
16
16
|
...MoneyV2Select
|
|
17
17
|
}
|
|
18
|
-
|
|
18
|
+
compareAtPrice {
|
|
19
19
|
...MoneyV2Select
|
|
20
20
|
}
|
|
21
21
|
selectedOptions {
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
`;
|
|
37
37
|
const CartLineSelect = `
|
|
38
|
-
fragment CartLineSelect on
|
|
38
|
+
fragment CartLineSelect on BaseCartLine {
|
|
39
39
|
id
|
|
40
40
|
quantity
|
|
41
41
|
attributes {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
const normalizeCartProductVariant = (variant)=>{
|
|
4
|
-
const {
|
|
4
|
+
const { compareAtPrice, price, weight, weightUnit, id, sku, image } = variant;
|
|
5
5
|
return {
|
|
6
6
|
id,
|
|
7
7
|
requiresShipping: variant.requiresShipping,
|
|
8
8
|
availableForSale: variant.availableForSale,
|
|
9
9
|
sku: sku ?? id,
|
|
10
10
|
name: variant.title,
|
|
11
|
-
listPrice:
|
|
12
|
-
price: +
|
|
11
|
+
listPrice: compareAtPrice?.amount ? +compareAtPrice?.amount : 0,
|
|
12
|
+
price: +price.amount,
|
|
13
13
|
weight: {
|
|
14
14
|
value: weight ?? 0,
|
|
15
15
|
unit: weightUnit
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
quantityUnit
|
|
11
11
|
quantityValue
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
price {
|
|
14
14
|
...MoneyV2Select
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
compareAtPrice {
|
|
17
17
|
...MoneyV2Select
|
|
18
18
|
}
|
|
19
19
|
selectedOptions {
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
}
|
|
34
34
|
`;
|
|
35
35
|
const CartLineSelect = `
|
|
36
|
-
fragment CartLineSelect on
|
|
36
|
+
fragment CartLineSelect on BaseCartLine {
|
|
37
37
|
id
|
|
38
38
|
quantity
|
|
39
39
|
attributes {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
const normalizeCartProductVariant = (variant)=>{
|
|
2
|
-
const {
|
|
2
|
+
const { compareAtPrice, price, weight, weightUnit, id, sku, image } = variant;
|
|
3
3
|
return {
|
|
4
4
|
id,
|
|
5
5
|
requiresShipping: variant.requiresShipping,
|
|
6
6
|
availableForSale: variant.availableForSale,
|
|
7
7
|
sku: sku ?? id,
|
|
8
8
|
name: variant.title,
|
|
9
|
-
listPrice:
|
|
10
|
-
price: +
|
|
9
|
+
listPrice: compareAtPrice?.amount ? +compareAtPrice?.amount : 0,
|
|
10
|
+
price: +price.amount,
|
|
11
11
|
weight: {
|
|
12
12
|
value: weight ?? 0,
|
|
13
13
|
unit: weightUnit
|