I think I'm doing something wrong, and I'd appreciate any insight.
I have an attribute for my products called 'freeshipping'
It's either set to Yes or No for each product.
On my category pages, I use the attribute to display a Free shipping icon with each product with this code:
<?php if ($_helper->productAttribute($_product, $_product->getAttributeText('freeshipping')) == "Yes"):?><img src="<?php echo $this->getSkinUrl('images/shipsfree-bug.png') ?>" class="freeshipicon" />
It's working fine on the frontend: it shows the free shipping icon if the the product has free shipping, and if it doesn't it shows nothing. The problem is that it's filling my system.log with this error:
2014-11-20T13:35:59+00:00 ERR (3): Warning: Missing argument 3 for Mage_Catalog_Helper_Output::productAttribute(), called in /MYPATHTOMAGENTO/app/design/frontend/rwd/default/template/catalog/product/list.phtml on line 150 and defined in /MYPATHTOMAGENTO/app/code/core/Mage/Catalog/Helper/Output.php on line 120 2014-11-20T13:35:59+00:00 ERR (3): Notice: Undefined variable: attributeName in /MYPATHTOMAGENTO/app/code/core/Mage/Catalog/Helper/Output.php on line 122 2014-11-20T13:35:59+00:00 ERR (3): Notice: Undefined variable: attributeName in /MYPATHTOMAGENTO/app/code/core/Mage/Catalog/Helper/Output.php on line 141
So clearly I'm doing something wrong in /template/catalog/product/list.phtml with the code above when I'm trying to check to see if the product has the freeshipping attribute set to Yes.
Any help would be greatly appreciate. Thanks in advance.