From 5db27a523bb4843a4b324e448c64edba22abd023 Mon Sep 17 00:00:00 2001 From: Mark Moffat Date: Fri, 5 Oct 2018 22:45:12 +0930 Subject: [PATCH] Allow for order wide comments on payment --- routes/payments/authorizenet.js | 1 + routes/payments/paypal.js | 1 + routes/payments/stripe.js | 1 + views/order.hbs | 1 + views/partials/payments/shipping-form.hbs | 5 +++++ views/themes/Material/shipping-form.hbs | 3 +++ views/themes/Mono/shipping-form.hbs | 3 +++ 7 files changed, 15 insertions(+) diff --git a/routes/payments/authorizenet.js b/routes/payments/authorizenet.js index 6e785dd..263668e 100644 --- a/routes/payments/authorizenet.js +++ b/routes/payments/authorizenet.js @@ -68,6 +68,7 @@ router.post('/checkout_action', (req, res, next) => { orderState: req.body.shipState, orderPostcode: req.body.shipPostcode, orderPhoneNumber: req.body.shipPhoneNumber, + orderComment: req.body.orderComment, orderStatus: orderStatus, orderDate: new Date(), orderProducts: req.session.cart diff --git a/routes/payments/paypal.js b/routes/payments/paypal.js index a5d3f56..6a660dc 100644 --- a/routes/payments/paypal.js +++ b/routes/payments/paypal.js @@ -172,6 +172,7 @@ router.post('/checkout_action', (req, res, next) => { orderState: req.body.shipState, orderPostcode: req.body.shipPostcode, orderPhoneNumber: req.body.shipPhoneNumber, + orderComment: req.body.orderComment, orderStatus: payment.state, orderDate: new Date(), orderProducts: req.session.cart diff --git a/routes/payments/stripe.js b/routes/payments/stripe.js index 931dc3b..d1e0120 100644 --- a/routes/payments/stripe.js +++ b/routes/payments/stripe.js @@ -48,6 +48,7 @@ router.post('/checkout_action', (req, res, next) => { orderState: req.body.shipState, orderPostcode: req.body.shipPostcode, orderPhoneNumber: req.body.shipPhoneNumber, + orderComment: req.body.orderComment, orderStatus: paymentStatus, orderDate: new Date(), orderProducts: req.session.cart diff --git a/views/order.hbs b/views/order.hbs index 06f3f15..abed037 100644 --- a/views/order.hbs +++ b/views/order.hbs @@ -38,6 +38,7 @@
  • State: {{result.orderState}}
  • Postcode/Zipcode: {{result.orderPostcode}}
  • Phone number: {{result.orderPhoneNumber}}
  • +
  • Order comment: {{result.orderComment}}
  •  
  • Products ordered
  • diff --git a/views/partials/payments/shipping-form.hbs b/views/partials/payments/shipping-form.hbs index d841c71..a1e1c6b 100644 --- a/views/partials/payments/shipping-form.hbs +++ b/views/partials/payments/shipping-form.hbs @@ -42,4 +42,9 @@
    + +
    +
    + +
    \ No newline at end of file diff --git a/views/themes/Material/shipping-form.hbs b/views/themes/Material/shipping-form.hbs index 25f9fef..6f2b147 100644 --- a/views/themes/Material/shipping-form.hbs +++ b/views/themes/Material/shipping-form.hbs @@ -24,4 +24,7 @@
    +
    +
    +
    \ No newline at end of file diff --git a/views/themes/Mono/shipping-form.hbs b/views/themes/Mono/shipping-form.hbs index 25f9fef..6f2b147 100644 --- a/views/themes/Mono/shipping-form.hbs +++ b/views/themes/Mono/shipping-form.hbs @@ -24,4 +24,7 @@
    +
    +
    +
    \ No newline at end of file