Kindly wait a moment, post will be visible in just 5 seconds.

No Preview

Rizwan Khan

Posted on 10 September 2020

MERN Stack Project | Ecommerce Website Source Code | Youtube Project

Ad Banner
No Preview

Hello Friends,

My name is Rizwan Khan. I am creating a MERN Stack Series on my Youtube Channel. So this post is for those who is following my youtube mern stack series for their doubts and problems.

But I would recommed to do not use source code directly if you are planning to learn MERN Stack Series. watch the videos write code step by step it will clear and solve all your problems...

Thanks

Github Links

Back End Source Code
https://github.com/Rizwan17/ecommerce-back-end-rest-server.git

Admin App Source Code
https://github.com/Rizwan17/ecommerce-admin-app.git

Flipkart Clone

https://github.com/Rizwan17/ecommerce-flipkart-clone.git

5

36K

4

No Preview

Rizwan Khan

India

Coding is an art and I love art

Explore more similar Post

33 Comments

tejaswini dhomne

27 April 2023

When I added already exist product in the cart then the quantity in not updating, I have added code till Video: 35. Please help

0
REPLY

amer mohamed

24 October 2022

Thank you bro

1
REPLY

Ashikur Rahman Munna

17 August 2022

Please watch this post - https://webscript.info/ashikurrahmanmunna3.6/error-updating-the-path-cartitems-would-create-a-conflict-at-cartitems-62f64360bfe4e

0
REPLY

eddy bassey

2 May 2022

The thing is many us, like myself need your config and env files file to understand what were missing after downloading the repo. I have finished the course but i cant remember all the config files as i had mistakenly deleted the folder, now i need it for a project i am working on and need to submit it urgently. Can anyone help me sort this out?

0
REPLY

Rohan Yadav

22 April 2022

Hey Rizwan...I'm a beginner and I want to run this project directly on my computer. Can you explain the steps please?

0
REPLY

Annu Singh

15 April 2022

sir getProductPage ApI not working. It shows pending status not given any response. const express = require('express'); const { upload, requireSignin, adminMiddleware } = require('../../common-middleware'); const { createPage, getPage } = require('../../controller/admin/page'); const router = express.Router(); router.post(`/page/create`, requireSignin, adminMiddleware, upload.fields([ { name: 'banners' }, { name: 'products' } ]), createPage) router.get(`/page/:category/:type`, getPage); module.exports = router; product.action.js export const getProductPage = (payload) => { return async dispatch => { const { cid, type } = payload.params; console.log({cid, type}); const res = await axios.get(`/page/${cid}/${type}`); console.log('This is result',res); if(res.status === 200){ }else{ } } }

0
REPLY

Gargi Shastri

14 April 2022

I am getting the above error while trying "Add New Product" Inspect Element->Network->Preview Error: connect ENETUNREACH <address> at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1148:16) and Inspect Element->Network->Response <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>Error</title> </head> <body> <pre>Error: connect ENETUNREACH <address> <br> &nbsp; &nbsp;at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1148:16)</pre> </body> </html> Please Help!!

0
REPLY

Ganesh konagalla

24 March 2022

bro while i am adding products and clicking on save changes i am getting {"error":{"errors":{"category":{"name":"ValidatorError","message":"Path `category` is required.","properties":{"message":"Path `category` is required.","type":"required","path":"category"},"kind":"required","path":"category"}},"_message":"Product validation failed","name":"ValidationError","message":"Product validation failed: category: Path `category` is required."}} fix categories and add products-15

0
REPLY

Ebad Ahmed

17 February 2022

is it a multi vendor application??

0
REPLY

Fred Miller

3 February 2022

Did i miss something i cant upload Catagories thru post man says i dont have super admin permission........ a little help please

0
REPLY

Rizwan Khan

7 February 2022

Your First Id will be super admin and super admin only can create categories not everyone

REPLY

Isaac A

26 January 2022

Bro not able to login even after using the provided crredentials

1
REPLY

Rizwan Khan

26 January 2022

credential for what ?

1
REPLY

Isaac A

26 January 2022

Bro I was Able to do that But the Sandbox Payment from paypal is redirecting to cancel.php after payment

0
REPLY

Isaac A

26 January 2022

cart process.php and cancel.php are both empty so cannot place order successfully waht to do bro do you have that code

0
REPLY

Julien Lombardi

5 November 2021

Hey Rizwan, thank you so much for this great tutorial! I have run into a problem, I am unable to display the delivery addresses during the checkout process, my console says "POST http://localhost:2000/api/user/getaddress 404 (Not Found)" I am unsure how to fix this. Creating an address worked as far as I know, I am able to view the array in the backend through mongo db.

0
REPLY

Brandon Hansen

21 October 2021

First off, awesome tutorial! I had one question/issue that may just be something I am missing. After an order is created by a user and you move to the admin side to process the orders, how is the admin supposed to know where to "ship" the order since we are not getting the address in the admin-orders page?

0
REPLY

Sejal Rai

11 October 2021

sir getProductDetailsById api is not working , i have done whatever you have done still its not working . please help(video:31)

0
REPLY

Rizwan Khan

14 October 2021

Please verify the request data. 1 - check your getProductDetailsById is getting call from correct api. if possible pick curl and try from postman. 2 - Check getProductDetailsById is getting call with product id

REPLY

Hamza Arif

8 October 2021

sir product pictures are not displaying on the product details modal. please help

0
REPLY

Rizwan Khan

14 October 2021

Probably incorrect image path, can u plz confirm the image path

REPLY

H057 Kuldeep Sahu

25 June 2021

sir getProductPage ApI not working. its show panding status not given any response. i am just copy past code but its not work. only show panding status. please help sir

0
REPLY

munish lahoria

10 June 2021

Error: slugify: string argument expected at replace (E:\shopping-app\mern-back-end\node_modules\slugify\slugify.js:20:13) at exports.addCategory (E:\shopping-app\mern-back-end\src\controller\category.js:27:15) at Layer.handle [as handle_request] (E:\shopping-app\mern-back-end\node_modules\express\lib\router\layer.js:95:5) at next (E:\shopping-app\mern-back-end\node_modules\express\lib\router\route.js:137:13) at exports.adminMiddleware (E:\shopping-app\mern-back-end\src\middleware\index.js:27:5) at Layer.handle [as handle_request] (E:\shopping-app\mern-back-end\node_modules\express\lib\router\layer.js:95:5) at next (E:\shopping-app\mern-back-end\node_modules\express\lib\router\route.js:137:13) at exports.requireSignin (E:\shopping-app\mern-back-end\src\middleware\index.js:12:6) at Layer.handle [as handle_request] (E:\shopping-app\mern-back-end\node_modules\express\lib\router\layer.js:95:5) at next (E:\shopping-app\mern-back-end\node_modules\express\lib\router\route.js:137:13) at Route.dispatch (E:\shopping-app\mern-back-end\node_modules\express\lib\router\route.js:112:3) at Layer.handle [as handle_request] (E:\shopping-app\mern-back-end\node_modules\express\lib\router\layer.js:95:5) at E:\shopping-app\mern-back-end\node_modules\express\lib\router\index.js:281:22 at Function.process_params (E:\shopping-app\mern-back-end\node_modules\express\lib\router\index.js:335:12) at next (E:\shopping-app\mern-back-end\node_modules\express\lib\router\index.js:275:10) at Function.handle (E:\shopping-app\mern-back-end\node_modules\express\lib\router\index.js:174:3)

0
REPLY

Rizwan Khan

19 June 2021

How are you sending the data if using form to send data then you should make sure you are using upload middleware in route of create category

REPLY

munish lahoria

10 June 2021

How to fix this Error: slugify: string argument expected

0
REPLY

Rizwan Khan

19 June 2021

How are you sending the data if using form to send data then you should make sure you are using upload middleware in route of create category

REPLY

dileep bannikatti

6 June 2021

slugify: string argument expected. Can u help me fix it ?

0
REPLY

Rizwan Khan

7 June 2021

slugify requires an string parameter, you are getting this error means your title of the product or category is not correct, comment your backend code snippet where slugify is giving error

1
REPLY

munish lahoria

10 June 2021

const mongoose = require('mongoose'); const categroySchema = new mongoose.Schema({ name:{ type:String, required:true, trim:true }, slug:{ type:String, required:true, unique:true }, parentID:{ type:String, } }, { timestamps:true}); module.exports = mongoose.model('Category', categroySchema);

0
REPLY

munish lahoria

11 June 2021

import React, { useEffect, useState } from 'react' import { Button, Col, Container, Row, Modal,} from 'react-bootstrap' import { useDispatch, useSelector } from 'react-redux'; import { addCategory, getAllCategory } from '../../actions'; import Layout from '../../components/Layout' import Input from '../../components/UI/Input'; function Category() { const [show, setShow] = useState(false); const [categoryName, setcategoryName] = useStat

0
REPLY

Ichwanul rahman

31 May 2021

how to give an error response?

0
REPLY

Rizwan Khan

31 May 2021

there are different types of error response you can create. for eg, 400, 401, 402, 403.....and so on. expressJs example: res.status(400).json({error}); // Bad Request res.status(401).json({error}); // Unauthorised res.status(402).json({error}); // Payment Required res.status(403).json({error}); // Forbidden res.status(404).json({error}); //Not Found ......and so on. More explanation https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses

REPLY

rickgigs

18 April 2021

i m following your tutorial i fouund some problem but i dont know how

1
REPLY

Jorge Santos

27 March 2021

I'm following your flikart tutorial, I found some problems that had in my backend code and decided to use your BackEnd and try only FrontEnd. Download on your Github the Admin-App and RestServer but there is an interaction problem between them ... I can't add products with images, so adding without image with product index repetition error ... You can help me, thanks.

1
REPLY

Rajesh Banoth

21 February 2021

Thanq for this great tutorial, actually iam facing a issue while uploading product details something like missing credentials in config if using AWS_config_file,set aws_sdk_load_config=1,can you please help me to sort out this issue

0
REPLY

Pavan Srinivas

6 February 2021

app.listen(process.env.PORT, () => { console.log(`Server is running on port ${process.env.PORT}`);}); and run git bash to check the server it gives this result server is running on port $index.server.js instead of server is running on port 2000

0
REPLY

yeng moua

8 December 2020

× TypeError: Cannot read property 'map' of undefined Orders src/containers/Orders/index.js:37 34 | console.log({order}) 35 | 36 | return ( > 37 | <Layout sidebar> | ^ 38 | 39 | { 40 | order.orders.map((orderItem, index) => ( View compiled ? 23 stack frames were collapsed. (anonymous function) src/actions/initialData.action.js:22 19 | type: productConstants.GET_ALL_PRODUCTS_SUCCESS, 20 | payload: { products }, 21 | }); > 22 | dispatch({ | ^ 23 | type: orderConstants.GET_CUSTOMER_ORDER_SUCCESS, 24 | payload: { orders }, 25 | });

0
REPLY

Rizwan Khan

13 December 2020

you are not getting orders data in api call

REPLY