How to set and retrieve error inside component in model I have:
if (empty开发者_JAVA百科($coupon->coupon_id))
{
$this->setError( JText::_( "Invalid Coupon" ) );
return false;
}
How to retrieve this error inside controller? this->getError gives nothing :(
Thanks
Do you want to return the error to the screen?
If so, http://docs.joomla.org/Display_error_messages_and_notices
In your controller you need to invoke your model and use the $model->getError(); function instead of $this->getError();
精彩评论