Ir al contenido
Menú
Se marcó esta pregunta
1 Responder
2502 Vistas

Hi, @all
If a guest wants to put a product for rental in the shopping cart, he gets the following error message:

"The given product does not exist therefore it cannot be added to cart."

When the product is an "Sale Product" works fine.

It is works as designed?
Greetings fro Germany

Avatar
Descartar
Mejor respuesta

Hi,

To be able to add a product to cart, three conditions need to be met product is active, can be sold is active and published to website. You can't add a product is not set as can be sold even if it's a rental product. 

Here you are the code of checking product:

def _is_add_to_cart_allowed(self):
self.ensure_one()
return self.user_has_groups('base.group_system') or (self.active and self.sale_ok and self.website_published)
Avatar
Descartar
Publicaciones relacionadas Respuestas Vistas Actividad
3
ago 25
2835
1
may 25
1822
1
may 25
2771
1
abr 25
3742
1
abr 25
4610