Fixed order sorting + instore orders missing values
parent
52af6e1490
commit
e91b44074a
|
@ -206,5 +206,6 @@
|
||||||
"Company": "Company",
|
"Company": "Company",
|
||||||
"View": "View",
|
"View": "View",
|
||||||
"Related products": "Related products",
|
"Related products": "Related products",
|
||||||
"Disable stock tracking": "Disable stock tracking"
|
"Disable stock tracking": "Disable stock tracking",
|
||||||
|
"Company name": "Company name"
|
||||||
}
|
}
|
|
@ -21,7 +21,7 @@ router.get('/admin/orders/:page?', restrict, async (req, res, next) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get our paginated data
|
// Get our paginated data
|
||||||
const orders = await paginateData(false, req, pageNum, 'orders', {}, { productAddedDate: -1 });
|
const orders = await paginateData(false, req, pageNum, 'orders', {}, { orderDate: -1 });
|
||||||
|
|
||||||
// If API request, return json
|
// If API request, return json
|
||||||
if(req.apiAuthenticated){
|
if(req.apiAuthenticated){
|
||||||
|
@ -133,7 +133,9 @@ router.post('/admin/order/create', async (req, res, next) => {
|
||||||
orderShipping: req.session.totalCartShipping,
|
orderShipping: req.session.totalCartShipping,
|
||||||
orderItemCount: req.session.totalCartItems,
|
orderItemCount: req.session.totalCartItems,
|
||||||
orderProductCount: req.session.totalCartProducts,
|
orderProductCount: req.session.totalCartProducts,
|
||||||
|
orderCustomer: getId(req.session.customerId),
|
||||||
orderEmail: req.body.email || req.session.customerEmail,
|
orderEmail: req.body.email || req.session.customerEmail,
|
||||||
|
orderCompany: req.body.company || req.session.customerCompany,
|
||||||
orderFirstname: req.body.firstName || req.session.customerFirstname,
|
orderFirstname: req.body.firstName || req.session.customerFirstname,
|
||||||
orderLastname: req.body.lastName || req.session.customerLastname,
|
orderLastname: req.body.lastName || req.session.customerLastname,
|
||||||
orderAddr1: req.body.address1 || req.session.customerAddress1,
|
orderAddr1: req.body.address1 || req.session.customerAddress1,
|
||||||
|
|
|
@ -44,6 +44,12 @@
|
||||||
<input type="text" class="form-control" name="orderLastName" id="orderLastName" value="{{session.customerLastname}}" placeholder="Last name" required>
|
<input type="text" class="form-control" name="orderLastName" id="orderLastName" value="{{session.customerLastname}}" placeholder="Last name" required>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-12">
|
||||||
|
<div class="form-group">
|
||||||
|
<label class="control-label">{{ @root.__ "Company name" }}</label>
|
||||||
|
<input type="text" class="form-control" name="orderCompany" id="orderCompany" value="{{session.customerCompany}}" placeholder="Company name">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="control-label">{{ @root.__ "Address 1" }} *</label>
|
<label class="control-label">{{ @root.__ "Address 1" }} *</label>
|
||||||
|
|
Loading…
Reference in New Issue