I would like my website to always accurately show the user what they’re paying for. Currently, if the user changes a tab to a previous checkout page, the cart shown will be outdated but the cart they’ll actually pay for is not. So there’s a difference between what is shown to the user and what is processed, I don’t want this to happen and would like the cart to update automatically even in other tabs when the cart is updated. Alternatively, I would like to check the integrity of the cart when the user submits the checkout form.
When having a checkout page opened and adding an item to the cart on another opened tab, the first checkout page does not update accordingly. Which means that the user will see an outdated version of the cart if they change tabs. However, when the Stripe Checkout button is pressed on the outdated page, the items displayed in Stripe are the correct-updated ones. Which means that users will see a different cart on the checkout page than on the Stripe checkout, with a different price.
Steps to reproduce:
- Add Listing to cart and proceed to the checkout page ‘/checkout’
- Keep this checkout page opened
- Open another tab and navigate to another listing page
- Add the new listing to the cart and proceed to the new checkout page.
- Switch tab to come back to the previous checkout page.
- The user now sees an outdated cart, but if they proceed to pay, they’ll be billed for the ‘new’ cart instead of the ‘old’ one they’re seeing.
What I would like to happen instead:
1-4. Same steps
5. The user is shown an updated cart with the following temporary message “Cart Updated” and will pay for the new items in the cart.
Could you please help me achieve that? Thank you!
(I’m using Hivepress with Taskhive child theme)