I'm have an onBeforeWrite function that if a checkbox is checked in that class, it checks some criteria in the relationships and if that returns in the negative, blocks the save and returns an error message using the following:
user_error('Products can not be marked for sale without active variants', E_USER_ERROR);
exit();
From Firebug I can see that this line works as it returns the ajax save request with the error and a code of 500 Error. What I want to do though is have that error displayed to the user in the little javascript notification in the bottom left corner of the panel that default actions use. Is there a way to hook into that?