Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Custom “Add to Cart” URLs - not working as expected with cart & checkout blocks #2670

Closed
garymurray opened this issue Jun 9, 2020 · 0 comments · Fixed by #2854
Closed
Assignees
Labels
block: cart Issues related to the cart block. type: bug The issue/PR concerns a confirmed bug.
Milestone

Comments

@garymurray
Copy link

Describe the bug
As reported on the release post of the cart and checkout blocks - if someone is using custom add-to-cart urls on something like a landing page, and limiting the item to be sold invidually - if the customer happens to go back to the landing page and tries to add a second item (of the same thing) to their cart they get a broken error message in the cart. The shortcode used to just take them directly to the checkout page and show the error message. See screenshots below.

To Reproduce

  • Create a new blank page
  • Add a button, and give that button a custom add to cart url for a product
  • Ensure the product you are using in the button is set to only Enable this to only allow one of this item to be bought in a single order
  • Add the item to your cart - you should be redirected to the checkout page
  • Then navigate back to the initial landing page with the custom button
  • Add another one of the same product to your cart
  • See the error message in the cart

Expected behavior

  • The experience should at least be similiar or an improved version of how the shortcodes handled this - i.e. redirected back to the checkout page with a message to say you can only buy 1 item of the product.

Screenshots

Error message as shown in the cart block after trying to enter a second product:

Screenshot 2020-06-09 at 08 49 22

The current message as shown in the checkout (using the shortcodes):

Screenshot 2020-06-09 at 08 50 56

@garymurray garymurray added needs: design The issue requires design input/work from a designer. block: checkout Issues related to the checkout block. labels Jun 9, 2020
@nerrad nerrad added type: bug The issue/PR concerns a confirmed bug. block: cart Issues related to the cart block. and removed needs: design The issue requires design input/work from a designer. block: checkout Issues related to the checkout block. labels Jun 9, 2020
@Aljullu Aljullu self-assigned this Jul 13, 2020
@haszari haszari added this to the 3.3.0 milestone Aug 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: cart Issues related to the cart block. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
4 participants