Show the Bonus Product in a Product View Modal to enable adding it to the cart#2680
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
| itemsAdded: state.data.itemsAdded, | ||
| selectedQuantity: state.data.selectedQuantity | ||
| }) | ||
| } |
There was a problem hiding this comment.
Are we not going to show add to cart modal after the user selects bonus products? What if there is a case where user does not choose any bonus products and directly closes the bonus modal? Currently we are showing add to cart modal in that scenario.
There was a problem hiding this comment.
The bonus selection dialog is shown only after the main product has been added to the cart. If the user closes the bonus selection dialog the user is returned to the product detail page. If the user selects a bonus product on the bonus selectyion modal a product view modal is shown with the add to cart button. If the user closes the product view modal with the bonus product details than the user is returned to the bonus selection modal.
| newBonusItems, | ||
| allBonusItems: addToCartResponse.bonusDiscountLineItems, | ||
| openAddToCartModalIfNeeded: true, | ||
| product, |
There was a problem hiding this comment.
We can remove product, itemsAdded and selectedQuantity parameters too if we are not planning to show AddToCart modal. Those params are used inside AddToCart modal
There was a problem hiding this comment.
The changes in product view should be part of a future refactoring/clean-up work that is already being planned.
Description
Show the Bonus Product in a Product View Modal after selecting a bonus product tile in the bonus products selection modal
-enabled the add to cart capability in the Product View Modal
-show the existing bonus product count in the title area
-navigate to the cart page after the product is added
Types of Changes
Changes
How to Test-Drive This PR
Checklists
General
Accessibility Compliance
You must check off all items in one of the follow two lists:
or...
Localization