diff --git a/controllers/orderContoller.js b/controllers/orderContoller.js index 3217ba0..06cf367 100644 --- a/controllers/orderContoller.js +++ b/controllers/orderContoller.js @@ -106,7 +106,7 @@ const orderPlaced = async (req, res) => { // const findAddress = address.find(item => item._id.toString() === addressId); const findAddress = address.address.find(item => item._id.toString() === addressId); console.log(findAddress); - console.log("Before product search") + // console.log("Before product search") const findProduct = await Product.findOne({ _id: productId }) // console.log(findProduct); @@ -117,7 +117,7 @@ const orderPlaced = async (req, res) => { image: findProduct.productImage[0], quantity: 1 } - console.log("Before order placed") + // console.log("Before order placed") const newOrder = new Order(({ product: productDetails, totalPrice: totalPrice, diff --git a/controllers/productController.js b/controllers/productController.js index 240b2ac..1db0c58 100644 --- a/controllers/productController.js +++ b/controllers/productController.js @@ -120,7 +120,7 @@ const editProduct = async (req, res) => { brand: data.brand, category: data.category, regularPrice: data.regularPrice, - salePrice: data.regularPrice, + quantity: data.quantity, size: data.size, color: data.color, @@ -139,7 +139,7 @@ const editProduct = async (req, res) => { brand: data.brand, category: data.category, regularPrice: data.regularPrice, - salePrice: data.salePrice, + salePrice: data.regularPrice, quantity: data.quantity, size: data.size, color: data.color,