How do I control the Quantity increments on the Checkout page?
Problem Statement
You want to know how do I control the quantity increments on the checkout page.
Scope How do I limit quantities displayed on the Checkout page?
Can I make sure the quantity is set in specific multiples?
Solution
You can control how customers increase or decrease the quantity of a Plan or Addon on the checkout page, by either setting a minimum/Maximum value of setting increments in ranges like 10, 20,30...... so on.
Please follow the steps below to modify the quantity of the dropdown box on the checkout page.
- Enable "Customize plan/addon quantity based on meta configuration" in your Chargebee site.
To do this, navigate to Settings >> Configure Chargebee >> Checkout and Self Serve portal >> Advanced settings >> enable the option to "Customize plan/addon quantity based on meta configuration"
- Using JSON, you can modify the plan/addon level metadata. This will then get reflected on the plan specific checkout page.
**Based on your requirement, modify the JSON below. To setup quantity based increments, you can define the step, min qty, max qty.
"quantity_meta": {
"type": "range",
"min": 10,
"max": 100,
"step": 10
}
}```
To show specific quantity on the checkout page, you can define it in an array of values.
```{
"quantity_meta": {
"type": "fixed",
"values": [5, 6, 7, 8, 9, 10]
}
}```
3. Add the JSON metadata to the plan/addon configuration.
Navigate to the specific plan/addon, and in the plan details page, you'll find the option to add metadata.
<Image src="/assets/screenshots/kb/billing/XGoA-Bv1oCzzUvQCNjPXHMTX_9ienOZirA.png" alt=""/>
Add the metadata here, and you'll see the changes reflected on the Checkout page.
Here's a video tutorial simulating a simple per-unit price use-case.
[drive_video embed]
Refer [here](https://www.chargebee.com/checkout-portal-docs/feature-quantity-restriction.html), to know more about customizing your plan/addon metadata.
If you have any further questions, please reach out to [support](/billing/2.0/kb/getting-started/how-to-contact-chargebees-support-team?utm_source=user-doc&utm_medium=content&utm_campaign=support).
Related Articles
Show more
Was this article helpful?