Adds integration to send sales orders to brightpearl

This commit is contained in:
Sebastian Rindom committed 2020-08-03 10:23:45 +02:00
1 parent 630bf3abc6
commit c18677d5f2
20 files changed
+931 -10

No files matched your search

+5 -1
View File
@@ -39,7 +39,11 @@ class OrderSubscriber {
})
this.eventBus_.subscribe("order.placed", async order => {
await this.cartService_.delete(order.cart_id)
await this.cartService_.delete(order.cart_id).catch(err => {
if (err.type !== "not_found") {
throw err
}
})
})
this.eventBus_.subscribe("order.placed", this.handleDiscounts)