Fatal error at the home page and categories pages "productlist.phtml on line 96"

Hello again and Thanks for help.

Im getting this error at the home page and categories pages and i can not find the answer again.
followed the user guide but did not work

Call to a member function getDefaultValue() on a non-object in ……\app\design\frontend\default\jm_walltemplat e\catalog\product\list.phtml on line 96

Thanks

2 answers

Profile photo of Sherlock 0.00 $tone November 13, 2012
Public

Hi julianserna,

Just try to replace the file of app\design\frontend\default\jm_walltemplate\catal og\product\list.phtml by my attachment file (remember to unzip it first )
Let me know if it helps !

#1
Profile photo of Julian Serna 0.00 $tone November 13, 2012
Public

Hi Sherlock Holmes.
Thanks for ur help!!! very helpfull

I made a change on app\design\frontend\default\jm_walltemplate\catal og\product\list.phtml and
app\design\frontend\default\jm_walltemplate\jooml art\jmproducts\list.phtml

Replace

Code:

			 $attdefaultvalue = $attribute->getDefaultValue();
				         $attributeValue = Mage::getModel('catalog/product')->load($_product->getId())->getlabel();
				         $attributeValueName = Mage::getModel('catalog/product')->load($_product->getId())->getAttributeText('label');
						     if(strlen($attributeValue) &&  ($attdefaultvalue !== $attributeValue)) { 
							   	 $labeltype = $attributeValueName;        
							 	 } 
								 else {
						   		 $labeltype = "";
				         }

by

Code:

	if(is_object($attribute)) {
		$attdefaultvalue = $attribute->getDefaultValue();
		$attributeValue = Mage::getModel('catalog/product')->load($_product->getId())->getlabel();
		$attributeValueName = Mage::getModel('catalog/product')->load($_product->getId())->getAttributeText('label');
		if(strlen($attributeValue) &&  ($attdefaultvalue !== $attributeValue)) {
			$labeltype = $attributeValueName;
		}
		else {
			$labeltype = "";
		}
	}

Thank You

#2

This question is now closed

Written By

Comments