Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Table of Contents
stylenone

...

  • We’ll adjust the title of the modal that already exists at checkout to be equal to the legacy /offers modal

  • We’ll adjust the legacy /offers modal to show the yes/no button to be equal to the modal that we have on the cart page

  • We’ll adjust the legacy /offers modal to not show the X close button at the top to be equal to the modal that we have on the cart page

    image-20240311-165139.pngImage Added

Solution flow

...

Acceptance criteria

  • If the user wants to apply a new offer after already having one applied to the cart, we need to show a modal asking for permission to replace the current offer

  • If the user clicks at yes/confirm we should replace the current offer with the new one added

  • If the user clicks in no/cancel/X at the top we should do nothing. We’ll only close the modal, and the current offer will remain added to the cart as before

  • If the user is at the cart in a scenario where he only has the offer at the cart entry (without other items/products) we need to ensure that the user will stay at the cart during the replacement process

  • Respect the design UI defined above. This was validated/approved by the design team

  • If the user started the flow through the legacy flow but decided to apply another offer at the checkout page the replace logic should work as expected

...

Tech refinement breakdown

...

Task 1: adjust cart-promo-codes.view.tsx to accept modal values through params

PS: The final solution was more simple than what’s suggested here. I did not need to create new params because I standardize things.

File to be changed: frontend/src/pages/cart/cart-promo-codes/cart-promo-codes.view.tsx

...