I don't understand this error because for one it's in my spanish version and it's exactly the same in the english version. Another thing is that the error (below) says it was previously declared at the same place as the error.
PHP Fatal error: Cannot redeclare isProductSpecial() (previously declared in /home/xxxx/public_html/app/design/frontend/spanish/default/template/catalog/product/view.phtml:203) in /home/xxxx/public_html/app/design/frontend/spanish/default/template/catalog/product/view.phtml on line 203
Here is the code:
<div id="sticker-box">
<?php
function isProductNew($product) {
$todayDate = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
if($todayDate >= $product->getData('news_from_date') && $todayDate <= $product->getData('news_to_date'))
{
return TRUE;
}
else
{
return FALSE;
}}
echo (isProductNew($_product)) ? '<div id="sticker-container"><div id="main-sticker-new"></div></div>' : '';
?>
<?php
function isProductSpecial($product) {
$todayDate = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
if($todayDate >= $product->getData('special_from_date') && $todayDate <= $product->getData('special_to_date'))
{
return TRUE;
}
else
{
return FALSE;
}}
echo (isProductSpecial($_product)) ? '<div id="sticker-container"><div id="main-sticker-sale"></div></div>' : '';
?>
</div>
Any idea how to correct this? Google Webmaster says this is causing many pages to have Index coverage issues.