Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Is there any way to prevent customers to buy products with no stock on ecommerce?

By
Xavier Micharet
on 2/9/15, 12:15 PM 410 views

I have been testing Odoo in order to implement it for my ecommerce and, despite I think is the best option for what I need, I have found one problem that makes it useless for my organization.

The ecommerce module allows you to buy products even when you have no stock. If I have no stock I need to show a message saying that the product is not available and dissable the add to cart button. Inspecting the website.sale_producte template I have seen that these options are in the code but they appear not to work.

<p t-if="len(product.product_variant_ids) &gt; 1" class="css_not_available_msg bg-danger" style="padding: 15px;">Product not available</p>

                    <a id="add_to_cart" class="btn btn-primary btn-lg mt8 js_check_product a-submit" href="#">Add to Cart</a>

Has any one found a solution for this?

0
Nilim
On 1/27/16, 8:18 AM

Hi Xavier,

I have gone through your query and tried to replicate the same.In order to prevent customers to buy products with no stock on eCommerce I have a recommendation which might solve your problem.

Hence as a solution to your query, we already have a module which caters to your need.


Kindly check the below mentioned link for more info :- 

https://apps.odoo.com/apps/modules/9.0/website_stock/



Hope this helps.



Cheers!!

0

This is duplicated,  the answer of this is on this question.

https://www.odoo.com/es_ES/forum/help-1/question/product-not-available-dont-appear-when-a-product-have-0-in-hand-quantity-74882

 

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 2/9/15, 12:15 PM
Seen: 410 times
Last updated: 1/27/16, 8:18 AM