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

cart item price increase as the quantity increases. #3

Open
codersam10 opened this issue Apr 29, 2023 · 1 comment
Open

cart item price increase as the quantity increases. #3

codersam10 opened this issue Apr 29, 2023 · 1 comment

Comments

@codersam10
Copy link

How can i make increment in the cart item price here (shown in the image) as the quantity of a single cart item increases?

Screenshot1

Repository owner deleted a comment from Yashparkar06 May 1, 2023
@MohitSojitra
Copy link
Owner

MohitSojitra commented May 1, 2023

How can i make increment in the cart item price here (shown in the image) as the quantity of a single cart item increases?

Screenshot1

@codersam10

Regarding your question about incrementing the cart item price as the quantity of a single cart item increases, you can retrieve the item price from the redux store and use it to calculate the total price based on the quantity. I would suggest referring to the cartScreen.js file to see how the getCartSubTotal function works for more context.

However, I would also like to share my thoughts on this approach. Instead of updating the price to reflect the total amount, it might be better to display the single item price alongside the quantity. This will ensure that the user has a clear understanding of the cost of each individual item, and will avoid confusion if they come back to the cart page after a few days. This will provide a better user experience overall.

I hope this suggestion helps. Please let me know if you have any other questions or concerns.

Thanks.

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