feat: complete saleor core extensions app with React email templates
- Order confirmation, shipped, and cancelled email templates - Uses @react-email/components for professional HTML emails - Sends admin and customer notifications - Integrates with Resend for email delivery - Webhook handlers for ORDER_CREATED, ORDER_FULFILLED, ORDER_CANCELLED - Docker image optimized for production - Persistent auth data storage via PVC
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
fragment OrderCancelledWebhookPayload on OrderCancelled {
|
||||
order {
|
||||
id
|
||||
number
|
||||
userEmail
|
||||
user {
|
||||
email
|
||||
firstName
|
||||
lastName
|
||||
}
|
||||
status
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
fragment OrderCreatedWebhookPayload on OrderCreated {
|
||||
order {
|
||||
id
|
||||
number
|
||||
created
|
||||
status
|
||||
userEmail
|
||||
languageCode
|
||||
channel {
|
||||
slug
|
||||
}
|
||||
user {
|
||||
email
|
||||
firstName
|
||||
lastName
|
||||
}
|
||||
shippingAddress {
|
||||
firstName
|
||||
lastName
|
||||
streetAddress1
|
||||
streetAddress2
|
||||
city
|
||||
postalCode
|
||||
country {
|
||||
country
|
||||
}
|
||||
phone
|
||||
}
|
||||
billingAddress {
|
||||
firstName
|
||||
lastName
|
||||
streetAddress1
|
||||
streetAddress2
|
||||
city
|
||||
postalCode
|
||||
country {
|
||||
country
|
||||
}
|
||||
phone
|
||||
}
|
||||
lines {
|
||||
id
|
||||
quantity
|
||||
unitPrice {
|
||||
gross {
|
||||
amount
|
||||
currency
|
||||
}
|
||||
}
|
||||
totalPrice {
|
||||
gross {
|
||||
amount
|
||||
currency
|
||||
}
|
||||
}
|
||||
variant {
|
||||
name
|
||||
sku
|
||||
product {
|
||||
name
|
||||
media {
|
||||
url
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
subtotal {
|
||||
gross {
|
||||
amount
|
||||
currency
|
||||
}
|
||||
}
|
||||
shippingPrice {
|
||||
gross {
|
||||
amount
|
||||
currency
|
||||
}
|
||||
}
|
||||
total {
|
||||
gross {
|
||||
amount
|
||||
currency
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
fragment OrderFilterShippingMethodsPayload on OrderFilterShippingMethods {
|
||||
order {
|
||||
id
|
||||
}
|
||||
shippingMethods {
|
||||
id
|
||||
name
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
fragment OrderFulfilledWebhookPayload on OrderFulfilled {
|
||||
order {
|
||||
id
|
||||
number
|
||||
userEmail
|
||||
user {
|
||||
email
|
||||
firstName
|
||||
lastName
|
||||
}
|
||||
status
|
||||
fulfillments {
|
||||
id
|
||||
status
|
||||
created
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
query LastOrder {
|
||||
orders(first: 1) {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
number
|
||||
created
|
||||
user {
|
||||
firstName
|
||||
lastName
|
||||
}
|
||||
shippingAddress {
|
||||
country {
|
||||
country
|
||||
}
|
||||
}
|
||||
total {
|
||||
gross {
|
||||
amount
|
||||
currency
|
||||
}
|
||||
}
|
||||
lines {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
query ProductTimestamps($id: ID) {
|
||||
product(id: $id) {
|
||||
created
|
||||
updatedAt
|
||||
}
|
||||
}
|
||||
+37797
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
subscription OrderCancelledSubscription {
|
||||
event {
|
||||
...OrderCancelledWebhookPayload
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
subscription OrderCreatedSubscription {
|
||||
event {
|
||||
...OrderCreatedWebhookPayload
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
subscription OrderFilterShippingMethodsSubscription {
|
||||
event {
|
||||
...OrderFilterShippingMethodsPayload
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
subscription OrderFulfilledSubscription {
|
||||
event {
|
||||
...OrderFulfilledWebhookPayload
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user