diff --git a/imports/plugins/core/orders/client/templates/orders.js b/imports/plugins/core/orders/client/templates/orders.js index c3b6f0a183d..6c0ffb59547 100644 --- a/imports/plugins/core/orders/client/templates/orders.js +++ b/imports/plugins/core/orders/client/templates/orders.js @@ -90,7 +90,7 @@ Template.orders.onCreated(function () { // fetch available orders this.autorun(() => { this.subscribe("Orders"); - const filter = this.data && this.data.filter.name || Reaction.Router.getQueryParam("filter"); + const filter = this.data && this.data.filter && this.data.filter.name || Reaction.Router.getQueryParam("filter"); const query = OrderHelper.makeQuery(filter); const orders = Orders.find(query).fetch(); diff --git a/private/email/templates/orders/new.html b/private/email/templates/orders/new.html index 337c55c4eaf..c6d351c46f5 100644 --- a/private/email/templates/orders/new.html +++ b/private/email/templates/orders/new.html @@ -159,9 +159,9 @@   - Your Order - Order Date -   + Your Order + Order Date + Status @@ -184,18 +184,18 @@ {{order._id}} {{orderDate}} -   + Not shipped -   +   -   +   @@ -232,10 +232,10 @@ {{billing.paymentMethod}} -   +   - Item(s) + Item(s) diff --git a/private/email/templates/orders/refunded.html b/private/email/templates/orders/refunded.html index 5613389151b..5b72a989c70 100644 --- a/private/email/templates/orders/refunded.html +++ b/private/email/templates/orders/refunded.html @@ -159,8 +159,8 @@   - Your Order - Order Date + Your Order + Order Date   @@ -191,11 +191,11 @@ -   +   -   +   @@ -232,10 +232,10 @@ {{billing.paymentMethod}} -   +   - Item(s) + Item(s) diff --git a/private/email/templates/orders/shipped.html b/private/email/templates/orders/shipped.html index 3259754d643..5d75d85976b 100644 --- a/private/email/templates/orders/shipped.html +++ b/private/email/templates/orders/shipped.html @@ -159,9 +159,9 @@   - Your Order - Order Date -   + Your Order + Order Date + Tracking Number @@ -184,18 +184,22 @@ {{order._id}} {{orderDate}} -   + {{#if shipping.tracking}} + {{shipping.carrier}}
{{shipping.tracking}} + {{else}} + Tracking not available + {{/if}} -   +   -   +   @@ -232,10 +236,10 @@ {{billing.paymentMethod}} -   +   - Item(s) + Item(s) diff --git a/server/methods/core/orders.js b/server/methods/core/orders.js index 129fd9b973f..0a95a0958f0 100644 --- a/server/methods/core/orders.js +++ b/server/methods/core/orders.js @@ -467,6 +467,8 @@ export const methods = { orderDate: moment(order.createdAt).format("MM/DD/YYYY"), orderUrl: getSlug(shop.name) + "/cart/completed?_id=" + order.cartId, shipping: { + tracking: order.shipping[0].tracking, + carrier: order.shipping[0].shipmentMethod.carrier, address: { address: order.shipping[0].address.address1, city: order.shipping[0].address.city,