pooranjoyb / popShop

eCommerce Shoping Platform (with Admin Panel) based on ReactTS & Daisy UI, integrating Supabase as BaaS
https://pop-shop-github.vercel.app/
MIT License
29 stars 68 forks source link

Cart Management #193

Closed dhruv8433 closed 4 weeks ago

dhruv8433 commented 1 month ago

@pooranjoyb

Please include a summary of the changes and the related issue. Please also include relevant motivation and context. List any dependencies that are required for this change.

Add product to cart as well as on Supabase [One to Many relationship] #109 Fixes # 109

Type of change

Please give a X on it which is applicable

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Screenshorts and Vedios:

image

image

Checklist:

give a X on it which is applicable

vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git β†—οΈŽ

Name Status Preview Comments Updated (UTC)
pop-shop βœ… Ready (Inspect) Visit Preview πŸ’¬ Add feedback Jun 9, 2024 2:15pm
dhruv8433 commented 1 month ago

@pooranjoyb

please check this and merge it

pooranjoyb commented 1 month ago

Hii @dhruv8433 why aren't you using the Cart-Slice we need to store that in store too. Maintain that too.

dhruv8433 commented 1 month ago

@pooranjoyb

now you can check it and merge it : i update code and now it also added to cart-slice too

image

image

dhruv8433 commented 1 month ago

@pooranjoyb please tell me if you want any kind of modifications...

pooranjoyb commented 1 month ago

@pooranjoyb please tell me if you want any kind of modifications...

Can you show me a video demonstration @dhruv8433

It's not working on my end :/

image

dhruv8433 commented 1 month ago

Ok i will share you video

dhruv8433 commented 1 month ago

@pooranjoyb

yaa, i understood.. bymistek i added username as primary key

now you can check it working properly

https://github.com/pooranjoyb/popShop/assets/114583978/af15c37e-6dbe-485f-8e98-7a1e7ba6ad2b

dhruv8433 commented 1 month ago

@pooranjoyb

please check this and merge it if you face any issue then inform me

pooranjoyb commented 1 month ago

@pooranjoyb

please check this and merge it if you face any issue then inform me

@pooranjoyb

please check this and merge it if you face any issue then inform me

@pooranjoyb

please check this and merge it if you face any issue then inform me

Dude, why Buy Now adds to cart. The flow is different. User should go to the Product-Details page and Add to Cart button should do that logic. Please update it. @dhruv8433

dhruv8433 commented 1 month ago

@pooranjoyb Ok ok Got it

dhruv8433 commented 1 month ago

@pooranjoyb

now you can check it image

pooranjoyb commented 1 month ago

check build errors by running npm run build in you local machine.

dhruv8433 commented 1 month ago

@pooranjoyb

solved completed build image

dhruv8433 commented 1 month ago

@pooranjoyb

Please merge it

dhruv8433 commented 1 month ago

@pooranjoyb

now you can check this i completed my task as you said

please check this and merge it

dhruv8433 commented 1 month ago

@pooranjoyb

deployment and build both are completed please merge it

dhruv8433 commented 1 month ago

@pooranjoyb

Please when you become free Merge it

pooranjoyb commented 1 month ago

@pooranjoyb

Please when you become free Merge it

Hii @dhruv8433 really sorry, I was occupied few days. Okay I've seen the deployment. Everything is working fine but just one improvement.

Should be one entry having array of items in cart. image

That'll do. I'll merge once this part is done. πŸš€

dhruv8433 commented 1 month ago

@pooranjoyb

i need help when i try to add product for same user it give me cors error can you please tell me how to resolve this

image

can you allow cors from supabase ?

pooranjoyb commented 1 month ago

@pooranjoyb

i need help when i try to add product for same user it give me cors error can you please tell me how to resolve this

can you allow cors from supabase ?

please check in supabase. RLS is already disabled. I guess you already have an access. @dhruv8433

dhruv8433 commented 1 month ago

@pooranjoyb

i tried many times but i can't find allow origin cors in supabase dashboard can you please help...

dhruv8433 commented 1 month ago

@pooranjoyb

now everything working as expected please check this and merge it

image

output:

image

dhruv8433 commented 1 month ago

@pooranjoyb

https://github.com/pooranjoyb/popShop/assets/114583978/7f2a720e-871e-4a1e-9739-5166d3805293

dhruv8433 commented 4 weeks ago

@pooranjoyb

now you can merge it please check everything working as expected

pooranjoyb commented 4 weeks ago

Awesome work @dhruv8433 πŸš€ What was the issue with cors tho ?

dhruv8433 commented 4 weeks ago

@pooranjoyb

no i just redisable RLS and try than it worked

dhruv8433 commented 4 weeks ago

please merge it

pooranjoyb commented 4 weeks ago

please merge it

Dude it ain't working, just checked the deployment. :/

screen-recorder-sun-jun-09-2024-18-59-44.webm

pooranjoyb commented 4 weeks ago

Please lmk if I'm missing something, do create a new record if the user doesnot exist in the table. @dhruv8433

dhruv8433 commented 4 weeks ago

@pooranjoyb

just wait i provide you a video

pooranjoyb commented 4 weeks ago

A hell loota work, init @dhruv8433 ? πŸ˜† But yeah at the end its working. So, well done! πŸ’―

dhruv8433 commented 4 weeks ago

Thank you @pooranjoyb

idk why video not downloaded bu thanks again

pooranjoyb commented 4 weeks ago

Thank you @pooranjoyb

idk why video not downloaded bu thanks again

But yeah there is still one issue. I guess that's probably easy to work around.

@dhruv8433

you can work on this in a separate issue. πŸ‘πŸΌ

dhruv8433 commented 4 weeks ago

@pooranjoyb Ok i will create separate issue for thay