Skip to Content
Menu
This question has been flagged
2 Replies
5697 Views

is it possible to add a minimum amount of purchases to products and variants for purchases on the website? (odoo12)

Avatar
Discard
Author Best Answer

Impossible because I have different quantities for each product. It is not possible to integrate this information? Because it seems to me that in the part produced one inserts a tariff according to the quantities.

For me it is essential information. It should at least be in the e-commerce after part in the classic life management part is not an obligation. I find it really bad. Can not do something?

Avatar
Discard

As it is not possible by default, you can extend the feature by customization and make it possible :)

Author

how to do? can you give an example?

Example of some customization? You can see a lot of modules in the Odoo store which add new functionalities in the e-commerce, you can refer those modules and see

Best Answer

Hi,

If you are looking at this case, like when you sell your products through the online the customer should purchase a minimum quantity, by default there seems no such option is available.

For the backend sales, there seems some third-party modules are available in the store, but the same cannot be found for the e-commerce. Anyway, you can have a search for it.


A little workaround that you can do is that, activate the developer mode, navigate to Settings -> Technical -> Views, search for Select Quantity, then if you check the view you can see a line like this,

<input type="text" class="form-control quantity" data-min="1" name="add_qty" value="1"/>

You can change this Line as per the need, suppose if you need to set minimum quantity as 3, change the data-min and value to 3 in the above line,

<input type="text" class="form-control quantity" data-min="3" name="add_qty" value="3"/>

This is not flexible as it will be applied for all the products.


Thanks

Avatar
Discard
Related Posts Replies Views Activity
0
Jul 24
195
1
Apr 24
759
0
Nov 23
479
0
Jun 24
1038
3
Oct 23
5975