Skip to content

Commit

Permalink
product edit bug fixed saleprice is not changing
Browse files Browse the repository at this point in the history
  • Loading branch information
navneethvi committed Feb 8, 2024
1 parent f87a8fd commit 70024ae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions controllers/orderContoller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions controllers/productController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit 70024ae

Please sign in to comment.