Feat/add remove product cart #205
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related task(s)/issue(s) 🔗
Description 📋
To prevent duplication and increase user convenience, only allow a product to be added to the shopping cart if it is not already present in it. If the product is not already in the user's shopping cart, provide an "Add to Cart" button that adds the product with the selected options to their cart.
🔨 Implementation Details
Product Duplication Check: Before adding a product to the shopping cart, verify whether the product is already present in the user's shopping cart.
"Add to Cart" Button: If the product is not already in the shopping cart, the "Add to Cart" button should be active and clickable. When clicked, this button should add the product with the selected options to the shopping cart.
API Integration: Use the commercetools to manage the shopping cart and add products to it.
✅ Acceptance Criteria
The application checks whether a product is already in the user's shopping cart before adding it.
If the product is not already in the shopping cart, the "Add to Cart" button is active and can add the product to the cart.
If the product is already in the shopping cart, the "Add to Cart" button is inactive or provides a relevant notice.
Done / deadline 📅
04.06.2024 / 18.06.2024
Screenshot/Illustration (optional) 📌
Comments (optional) 💬