hi all, does Solidus provide a way to restrict onl...
# general
r
hi all, does Solidus provide a way to restrict only a certain qty is allowed to be added to the cart although it’s available on hand? use case is for discounted product so that it doesn’t ran out in 1 transaction
✅ 1
k
Not out of the box, but I think it’s quite simple to extend it in a non-invasive way: add a before_action in the orders#populate that remove the extra line item quantity from params if needed. On the frontend, you have the freedom to do what you want, eg. to only allow 1 as quantity in the input you can use max on the quantity input:
Copy code
<input type="number" ... min="1" max="1">
r
thx @kennyadsl. will give it a go