When I visit a page using the magentoshop; I get this errormessage:
Call to a member function getId() on a non-object in /xxxxx/app/code/core/Mage/Catalog/Model/Product/Type/Configurable/Price.php on line 85
I headed for that line, it's a part of a function called getTotalConfigurableItemsPrice. It's in a foreach:
And it says:
foreach ($attributes as $attribute) {
$attributeId = $attribute->getProductAttribute()->getId();
And the attribute stuff is the problem. I tried a var_dump() on $attribute->getProductAttribute() and recieved NULL A var_dump on($attribute) shows i.e.
["_data":protected]=>
array(5) {
["product_super_attribute_id"]=>
string(4) "3845"
["product_id"]=>
string(8) "10001563"
["attribute_id"]=>
string(3) "135"
["position"]=>
string(1) "0"
["product_attribute"]=>
NULL
}
What's wrong with the attribute and how can I fix it ? If I say:
$attributeId = 1234;
instead of
$attributeId = $attribute->getProductAttribute()->getId();
The error is gone, but I need true values ..