Hi,
I'm experimenting with Oscar and have this example (
http://django-oscar.readthedocs.org/en/latest/howto/enforcing_stock_rules.html) set up in a project, but I'm not sure how to continue. By raising the InvalidBasketLineError inside the signal (I currently have it set to fail every time so I could experiment), it causes the site to 500. When adding a product to the cart that gets me a 500 page ("InvalidBasketLineError at /basket/add/4/"), when updating a quantity in an existing basket, since the update is done with Javascript I get a page that hangs.
How do I move forward with getting a user-friendly error here that displays to the user the reason they're not allowed to purchase? Since the documentation used an explicit exception with a message I expected that the basket would be trapping that exception by default and making the provided error message visible to the user (much as check_basket_is_valid does). Is this an "old" method of doing this? Overriding oscar.apps.checkout.session.CheckoutSessionMixin.check_basket_is_valid works great for displaying errors about something the user has in their basket, but it isn't used as early as possible (right upon add) to let the user know there's an issue selling them what they've added so the line signal example is still useful, I would imagine.
Adam