The prices of our website depend on a webservice that get the prices from an external database. Sometimes this process fails and set the product price to '0'.
I want to design an observer that stops the adding to cart process of this product.
I know how to «observe» the event with the checkout_cart_product_add_after (the 'before' one seems to not work at all) observer. What I don't know is how to stop the adding to cart process.
With this observer I can check the product ID and then remove it from the cart. But this is executed before the product is added, so unless the consumer adds the product again, it's useless. How can I then stop the process?
Thank