# Max Quantity Order

Hello,

Is there any way to put a maximum order for all the products in my store? For example i dont want the customer to buy more than 10 products, i know that i can put the max for every product but i want to put the same maximum for all my products.

Actually the customer can put as quantity as he wants to buy but for example if he wants 50 and i have 45 automatically 45 products are put in the customer cart exposing this way my stock, i wont a possibility: 1. if he wants to buy 50 and i have in stock 45 to show the message there is not enough stock and not to put in his cart 45 or if this is not possible to put a maximum quantity for buying.

I will appreciate any suggestion,

Every product description has

Minimum order quantity:
Maximum order quantity:

I have my product page done like this

https://forum.cs-cart.com/topic/51105-in-stock/?fromsearch=1

if got less then 100 product got in stock written, if 100+ then actual amount printed

Hello,

Is there any way to put a maximum order for all the products in my store? For example i dont want the customer to buy more than 10 products, i know that i can put the max for every product but i want to put the same maximum for all my products.

Actually the customer can put as quantity as he wants to buy but for example if he wants 50 and i have 45 automatically 45 products are put in the customer cart exposing this way my stock, i wont a possibility: 1. if he wants to buy 50 and i have in stock 45 to show the message there is not enough stock and not to put in his cart 45 or if this is not possible to put a maximum quantity for buying.

I will appreciate any suggestion,

Unfortunately there is no ability to set maximum amount of items for the whole order.

Unfortunately there is no ability to set maximum amount of items for the whole order.

I understand, but is it possible that if the customer wants to buy a product with quantity 30 and that product has quantity 25 to not add in cart that produtct with quantity 25 (as it happens now) but show there is not enough stock??

Unfortunately, no

Unfortunately, no

Is there any way to set a max order amount as it is for min order amount?

- app/controllers/frontend/checkout.php

- app/functions/fn.cart.php

In this files you can find conditions for minimum order amount. Search by min_order_amount. Use it as example

You can use the 'check_add_to_cart_pre' hook and have your hook function be something like

```define('MY_MAX_ITEMS', 30);