Skip to content

Commit d246160

Browse files
discount using metafield and rest from actual cart
1 parent 199c691 commit d246160

File tree

3 files changed

+301
-144
lines changed

3 files changed

+301
-144
lines changed
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
query Input {
2-
discountNode {
3-
metafield(namespace: "$app:{{handle | replace: " ", "-" | downcase}}", key: "function-configuration") {
4-
value
5-
}
2+
cart {
3+
buyerIdentity {
4+
email
5+
}
66
}
77
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
query Input {
22
fetchResult {
33
body
4+
status
5+
}
6+
cart {
7+
deliveryGroups {
8+
id
9+
}
10+
lines {
11+
id
12+
cost {
13+
subtotalAmount {
14+
amount
15+
}
16+
}
17+
}
18+
}
19+
discountNode {
20+
metafield(namespace: "$app:{{handle | replace: " ", "-" | downcase}}", key: "function-configuration") {
21+
value
22+
}
423
}
524
}

0 commit comments

Comments
 (0)