Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hello, Assistance Needed. #2

Closed
talmax1124 opened this issue Aug 16, 2022 · 17 comments
Closed

Hello, Assistance Needed. #2

talmax1124 opened this issue Aug 16, 2022 · 17 comments

Comments

@talmax1124
Copy link

Hello, I need assistance with the Add to Cart & Reduce Stock.

I have tried implementing both, but for example, the Add To Cart Functionality but it doesn't add the qty to the existing product. and I can't find the code for reducing stock.

If you could make a Pull Request on my repo, that will be so greatly appreciated.

Repo URL: https://github.com/talmax1124/creativeduoshop

@NZedan
Copy link
Owner

NZedan commented Aug 16, 2022

Hi, I will take a look and get back to you.

@talmax1124
Copy link
Author

Hi, I will take a look and get back to you.

@NZedan Ok, thank you. And I just moved to another repo because I was trying to upgrade to react 18, but some of the components still hasn't catched up to it.

The new URL: github.com/talmax1124/cdshop22

@talmax1124
Copy link
Author

Hi, I will take a look and get back to you.

You could also use some of my code. I implemented stripe checkout, forgot password, user mail validation with email, and some other things.

Thanks again for looking at it @NZedan

@talmax1124
Copy link
Author

@NZedan Hey, were you able to make it work?

@NZedan
Copy link
Owner

NZedan commented Aug 22, 2022

Hi, I'm trying to set up the oauth strategy, what should I put as the api uri?

@talmax1124
Copy link
Author

Oh, the oath, for google? It is only working in prod for some reason but just put the localhost port which should be 7500 if I'm right

@talmax1124
Copy link
Author

Hi, I'm trying to set up the oauth strategy, what should I put as the api uri?

@NZedan Did that get it to work?

@talmax1124
Copy link
Author

@NZedan Your ENV file should look like this:

NODE_ENV = development
PORT = 7500
MONGO_URI =
JWT_SECRET = 'abc123'
REACT_EDITOR = atom
STRIPE_PUBLISHABLE_KEY =
STRIPE_SECRET_KEY = =
CLOUDINARY_API_KEY = =
CLOUDINARY_API_SECRET =
CLOUDINARY_CLOUD_NAME =
GOOGLE_CLIENT_ID =
GOOGLE_CLIENT_SECRET =
MailGunAPI =
MailGunDomain =
API_URI=http://localhost:7500
ORIGIN_URI=http://localhost:3000
SESSION_SECRET= rgrwtwre
CLIENT_URL = http://localhost:3000

@NZedan
Copy link
Owner

NZedan commented Aug 24, 2022

Thanks @talmax1124, I couldn't get all the necessary credentials going to get your project fully operational on my system and I don't have much time on this at the mo, so I have made some changes to your code for the things you requested but as I can't run it, it may or may not work! Hopefully it will give you some idea of what I was doing. I have added a message field to the order model that you can pick up on the order screen to implement order timeouts/expiry etc.
Hope this helps.

@talmax1124
Copy link
Author

Ok, I'll check it right now. Thanks!

@talmax1124
Copy link
Author

@NZedan I get this error file:///Users/carlitos/cdshop22/backend/controllers/orderController.js:330
[1] getOrderById,
[1] ^^^^^^^^^^^^
[1]
[1] SyntaxError: Duplicate export of 'getOrderById'
[1] at ESMLoader.moduleStrategy (node:internal/modules/esm/translators:115:18)
[1] at ESMLoader.moduleProvider (node:internal/modules/esm/loader:289:14)

@talmax1124
Copy link
Author

talmax1124 commented Aug 24, 2022 via email

@NZedan
Copy link
Owner

NZedan commented Aug 24, 2022

I won't have time until next week. Remove "export" from line 144 of orderController

@talmax1124
Copy link
Author

Ok! Still couldn't get it fixed. @NZedan

@talmax1124
Copy link
Author

Hello! Could you do it? @NZedan

@talmax1124
Copy link
Author

@NZedan

@NZedan
Copy link
Owner

NZedan commented Oct 23, 2022

Hi Carlos, I'm sorry I can't work on your code for you, you will have to look closely at the code I have given you to see how it is working and work through any errors you encounter systematically.

Check the package.json in your frontend folder as I may have forgotten to change the proxy back to 7500 (I set it to 6000 when I was trying to get it working).

@NZedan NZedan closed this as completed Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants