|
This seems to be tied to the shopping cart/coupon logic…
I attempted to use a try-catch statement in the file, but that didn’t work for some reason. I’m assuming because PHP is not recognizing it as OO code because it is not an object. So here is what I did instead:
Inside the Item.php, I added the following lines:
$mystoreid;
if (is_object($this->getQuote())) {
$mystoreid = $this->getQuote()->getStoreId();
} else {
$mystoreid = 0;
}
Then I changed the setStoreId line that was causing the error to the following:
$product = Mage::getModel(’catalog/product’)
->setStoreId($mystoreid)
->load($this->getProductId());
I don’t know if this will really working in the long run or if it might create greater problems later. I’ll have to test a few things out.
This has not resolved any of the issues I’m having with the shopping cart logic, but it has resolved the crashed cart issue on the main website.
wsj3 - 16 June 2009 04:51 PM I’m having this problem too in 1.3.2.1. I have a configurable product which causes this fatal error when added to the cart.
Fatal error: Call to a member function getStoreId() on a non-object in /home/will/domains/growandmake.com/public_html/app/code/core/Mage/Sales/Model/Quote/Item.php on line 214
If anyone discovers a fix let us know.
FOLLOW-UP: After closing out my browser I went back and added the product to my cart again. This time it didn’t cause the error until I closed the browser and relaunched where the item was displayed in the cart on the left side of the page with the same error.
FURTHER FOLLOW-UP: I performed the hack described in this thread, which seems to be working. I really don’t want to leave this hack because I know at some point it will come back to create other problems. Varien please investigate and fix this.
|