[Bug]: User is able to remove items from the cart at the checkout
marinaglancy opened this issue · comments
What happened?
When calling checkout I add two items:
- Base price, quantity 1;
- Price for storage, quantity 50.
The price for storage has constraints that it has to be between 50 and 1000 (Gb).
At the checkout the user is able to change the quantity for storage within the allowed limits but is also able to completely remove this item. I do not want them to be able to remove it.
I can not find any setting that would prevent user from modifying the items at the checkout, even if I create a transaction using the API and pass the transaction id to the paddle.checkout.open() method
Steps to reproduce
- Create two products, one with a price price and allowing quantity 1 to 1; second one with a price allowing quantity between 50 and 1000
- Call paddle.checkout.open() for two items - base product and storage product (quantity 50)
- User is able to remove the storage during the checkout
What did you expect to happen?
No response
How are you integrating?
No response
Logs
No response
Hey @marinaglancy 👋
Thanks for taking the time to send in such a detailed issue. Setting a quantity limit against a price lets you specify the maximum and minimum units for an item when buying, but it doesn't require a customer to buy an item. In your example, it'll stop the customer from buying fewer than 50 units, but won't stop them removing the item altogether.
There's a few things you can do here that might help:
- If you're creating a transaction using the API then passing it to Paddle.js, you can mark the transaction as
billed
to prevent quantity changes. Billed transactions cannot be changed, so the quantity stepper and delete icon for items aren't presented. - If you're passing items and customer data when opening a checkout so that customers land on the payment screen, the transaction for the checkout is created as
ready
. You can use aneventCallback
to listen for checkout events, then send a request to the Paddle API to mark a transaction asbilled
. - You can consider using inline checkout instead of overlay. With inline checkout, you can present the items list yourself. This means you that you don't need to include the option to change quantities or remove items. We have a simple Codepen that includes an items list with no quantity stepper.
Here's a quick screenshot of how overlay checkout looks for a billed transaction 👇
Stopping customers from removing an item like this is feedback that we've had before, so I chatted with the PM who heads up checkout to let them know it's something that you're looking for too. In the meantime, I'm going to mark this as a feature request and close the issue. Pop back and let us know how you get on with the suggested solutions, and feel free to reopen the issue if there's anything else we can do to help 😄
Thank you very much! Marking transaction as billed worked perfectly