Я хочу знать, возможно ли включить HTML-ссылки в пользовательских сообщениях (например, в сообщениях об ошибках).
Вот мой пример: я сделал переопределение для своих нужд Mage_CatalogInventory_Model_Stock_Item/Item.php
Функция 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;
}
Но HTML-ссылка, которую я создал в $message, не активна и считается текстом (думаю, из-за перевода...). Можно ли изменить это поведение?
С уважением.