How to set a Purchase Limit i.e. Minimum and maximum limits on cart and products via code.?

How to set a Purchase Limit i.e. Minimum and maximum limits on cart and products via code.?

I want to Limit the customer to buy products of atleast Rs:1000, if not the customer will not be lead to the checkout page and instead given an error to buy more.

How may I do that via code.?

You can try to change cart.liquid. Add js to check whether the order amount exceeds the limit, if not, tell customers to buy more and return.

In 2023, you can do this with the new cart and checkout validation API. Will be released in Sept 2023