Skip to content

Commit

Permalink
Extend the order payload for translated names, attributes and price d…
Browse files Browse the repository at this point in the history
…etails
  • Loading branch information
krzysztofwolski committed Jul 26, 2023
1 parent 4e9c228 commit b197892
Show file tree
Hide file tree
Showing 3 changed files with 251 additions and 19 deletions.
157 changes: 157 additions & 0 deletions apps/emails-and-messages/graphql/fragments/OrderDetails.graphql
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
fragment OrderDetails on Order {
id
number
status
languageCodeEnum
userEmail
created
redirectUrl
channel {
slug
}
Expand All @@ -17,28 +21,103 @@ fragment OrderDetails on Order {
email
firstName
lastName
languageCode
}
billingAddress {
firstName
lastName
companyName
streetAddress1
streetAddress2
city
cityArea
postalCode
country {
country
}
phone
}
shippingAddress {
firstName
lastName
companyName
streetAddress1
streetAddress2
city
cityArea
postalCode
country {
country
}
phone
}
lines {
id
digitalContentUrl {
id
url
}
isShippingRequired
metadata {
key
value
}
privateMetadata {
key
value
}
productName
translatedProductName
variantName
translatedVariantName
productSku
variant {
preorder{
endDate
}
weight{
unit
value
}
attributes {
attribute {
id
name
slug
}
values {
id
name
slug
file {
url
contentType
}
}
}
product {
attributes {
attribute {
id
name
slug
}
values {
id
name
slug
file{
url
contentType
}

}
}
}
}
quantity
quantityFulfilled
taxRate
thumbnail {
url
alt
Expand All @@ -48,30 +127,108 @@ fragment OrderDetails on Order {
currency
amount
}
net {
currency
amount
}
tax {
currency
amount
}
}
totalPrice {
gross {
currency
amount
}
net {
currency
amount
}
tax {
currency
amount
}
}
unitDiscount {
currency
amount
}
unitDiscountReason
unitDiscountType
unitDiscountValue
undiscountedUnitPrice{
gross {
currency
amount
}
net {
currency
amount
}
tax {
currency
amount
}
}
}
subtotal {
gross {
amount
currency
}
net {
currency
amount
}
tax {
currency
amount
}
}
shippingPrice {
gross {
amount
currency
}
net {
currency
amount
}
tax {
currency
amount
}
}
total {
gross {
amount
currency
}
net {
currency
amount
}
tax {
currency
amount
}
}
undiscountedTotal {
gross {
amount
currency
}
net {
currency
amount
}
tax {
currency
amount
}
}
displayGrossPrices
isShippingRequired
shippingMethodName
}

0 comments on commit b197892

Please sign in to comment.