I would like to know if this is possible to enable HTML links in custom messages (ie: error messages).
Here is my example: I've made an override for my needs of Mage_CatalogInventory_Model_Stock_Item/Item.php
Function checkQuoteItemQty :
if (!$this->checkQty($summaryQty) || !$this->checkQty($qty)) {
//$message = Mage::helper('cataloginventory')->__('The requested quantity for "%s" is not available.', $this->getProductName());
$message = Mage::helper('cataloginventory')->__('The requested quantity for "%s" is not available (max:%s).', $this->getProductName(), ($this->getQty() * 1));
$cat_id = $this->getProduct()->getCategoryIds();
if($cat_id){
$url = Mage::getModel('catalog/category')->load($cat_id[0])->getUrl();
$message .= Mage::helper('cataloginventory')->__('You might be interested in <a href="%s">those products</a>.', $url);
}
$result->setHasError(true)
->setMessage($message)
->setQuoteMessage($message)
->setQuoteMessageIndex('qty');
return $result;
}
But the HTML link I created in $message : ($message .= Mage::helper('cataloginventory')->__('You might be interested in those products.', $url);) is not clickable and considered as text (because of the translation I guess...). Is it possible to change this behavior?
Regards.