ECommerce Ordini Email 1
This commit is contained in:
@@ -55,7 +55,7 @@ module.exports.executeQueryTable = function (idapp, params) {
|
||||
};
|
||||
|
||||
module.exports.getFieldsForSearch = function () {
|
||||
return [{field: 'note', type: tools.FieldType.string}]
|
||||
return [{ field: 'note', type: tools.FieldType.string }]
|
||||
};
|
||||
|
||||
|
||||
@@ -78,9 +78,14 @@ module.exports.getNewNumOrder = async function (uid, idapp) {
|
||||
|
||||
};
|
||||
|
||||
module.exports.getOrdersCartByUserId = async function (uid, idapp) {
|
||||
module.exports.getOrdersCartByUserId = async function (uid, idapp, numorder) {
|
||||
let query = { userId: uid, idapp, status: { $gte: shared_consts.OrderStatus.CHECKOUT_SENT } }
|
||||
const myorderscart = await OrdersCart.find(query);
|
||||
let myorderscart = null;
|
||||
if (numorder > 0) {
|
||||
query = { userId: uid, idapp, numorder, status: { $gte: shared_consts.OrderStatus.CHECKOUT_SENT } }
|
||||
}
|
||||
|
||||
myorderscart = await OrdersCart.find(query);
|
||||
|
||||
for (let ind = 0; ind < myorderscart.length; ind++) {
|
||||
for (const idkey in myorderscart[ind].items) {
|
||||
|
||||
Reference in New Issue
Block a user