Skip to Content
Меню
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
Це запитання позначене
2 Відповіді
1259 Переглядів

How can I set the maximum number of products to be added to the cart in a single order?

Аватар
Відмінити
Автор Найкраща відповідь

With the help of the new Prevent Sale of Zero Price Order feature we can now limit the maximum number of products someone can add to cart.

Enable the Prevent Sale of Zero Price Product under the Shop – Products section of the website settings.

Set the Sales price of the product on the product template. In this case it is going to be 100.

Let's say the maximum quantity someone can buy in a single order is 10 units.

We need to make sure when someone orders more than 10 quantities Odoo changes the price of the product to 0.

This can be achieved with the help of a pricelist.

Select Website -> eCommerce -> Pricelist

Select the Pricelist for the website and Add the product with a Price of 0 and a minimum quantity of 11.

When a visitor comes to the website to buy the product, when they change the quantity to 11 or more, Odoo will automatically display the message “Not Available for Sale”.

Once the message appears, the client will have to reload the page or go back to the shop and get to the product page to re-add the product.

The Next step is to edit the text to inform the client that they can only order up to 10 quantities in an order.

To do this, As the internal user, change the quantity on a product to display the original message and then select the edit button on the page.

Select the text and edit it.

Note: The message here will be the same across all products.


Below are a few scenarios and how they might look on the website.

If there are 10 of these products on the cart already you will not be able to add more, if you try to do so Odoo will give a message in the top right corner.

If you go to the cart and try increasing the quantity the same message will be displayed on the top right corner of the screen, it will be displayed as there is an additional quantity, but the total will not change.

As you proceed to the next steps the maximum quantity will be displayed on the order.

If there is a partial quantity available on the cart like, if the maximum is 10 and there are 7 in the cart, if we try to add 4 more quantities, Odoo will give the same message again and will not add any product to the cart.

 

Аватар
Відмінити
Найкраща відповідь

Hello, I'm allowing myself to react because I had the same question :) thank you for the super detailed answer, is it possible to do the same thing but on an e-commerce category?




Аватар
Відмінити
Related Posts Відповіді Переглядів Дія
1
жовт. 24
3633
2
квіт. 25
1256
1
квіт. 25
5873
2
жовт. 24
1784
1
вер. 24
1481