Carrello con scontistica aggiornata
This commit is contained in:
@@ -22,6 +22,7 @@ const OrdersCartSchema = new Schema({
|
||||
numord_pers: { type: Number },
|
||||
userId: { type: Schema.Types.ObjectId, ref: 'User' },
|
||||
totalQty: { type: Number, default: 0 },
|
||||
TotalPriceProduct: { type: Number, default: 0 },
|
||||
totalPrice: { type: Number, default: 0 },
|
||||
department: {
|
||||
type: String, ref: 'Department'
|
||||
@@ -265,9 +266,6 @@ module.exports.getOrdersCartByUserId = async function (uid, idapp, numorder) {
|
||||
|
||||
myorderscart = await OrdersCart.getOrdersCartByQuery(query);
|
||||
|
||||
if (myorderscart)
|
||||
console.log('*** Num myorderscart ', myorderscart.length);
|
||||
|
||||
|
||||
/*transform: function(doc, populated) {
|
||||
// Rinomina 'idProduct' a 'product' nei risultati della popolazione
|
||||
@@ -302,6 +300,7 @@ module.exports.updateOrdersCartById = function (id, newOrdersCart, callback) {
|
||||
items: newOrdersCart.items,
|
||||
totalQty: newOrdersCart.totalQty,
|
||||
totalPrice: newOrdersCart.totalPrice,
|
||||
totalPriceProduct: newOrdersCart.totalPriceProduct,
|
||||
userId: userId,
|
||||
status: newOrdersCart.status,
|
||||
numorder: newOrdersCart.numorder,
|
||||
|
||||
Reference in New Issue
Block a user