Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Page 1 of 3
Fatal Error ading productos to the cart
 
N Lopez
Sr. Member
 
Total Posts:  94
Joined:  2008-06-16
 

I am having sometimes an error when I try to add a product to the cart on the front end.

Fatal error: Call to a member function getStoreId() on a non-object in /home/calzafin/domains/calzafino.com/public_html/app/code/core/Mage/Sales/Model/Quote/Item.php on line 209

Can you help me with this problem please?

 
Magento Community Magento Community
Magento Community
Magento Community
 
lemax
Guru
 
Total Posts:  318
Joined:  2008-04-03
Nantes, France
 

Same thing here.
Do you have a database with InnoDB tables ? Varien said the problem comes from tables in MyISAM instead of InnoDB.

Max

 
Magento Community Magento Community
Magento Community
Magento Community
 
lemax
Guru
 
Total Posts:  318
Joined:  2008-04-03
Nantes, France
 

My store is also showing ?___SID=U at the end of the URL after that bug.
What’s hanppening ?
Max

 
Magento Community Magento Community
Magento Community
Magento Community
 
lemax
Guru
 
Total Posts:  318
Joined:  2008-04-03
Nantes, France
 

Any idea about this problem ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
baoutch
Jr. Member
 
Total Posts:  11
Joined:  2007-09-04
 

I’m having the same error on version 1.2.0.1

Fatal errorCall to a member function getStoreId() on a non-object ... line 209

This is strange as I had not seen this error before while doing the exact same operations.
Has anyone figured out a workaround?

Thanks!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Polo Magento
Jr. Member
 
Total Posts:  21
Joined:  2008-12-11
 

Same here on 1.2.0.2
which type of product do you use ?

 
Magento Community Magento Community
Magento Community
Magento Community
 
ds1122
Jr. Member
 
Total Posts:  11
Joined:  2008-08-21
 

Exactly the same problem here when trying to add a product to cart:

Fatal error: Call to a member function getStoreId() on a non-object in /opt/lampp/htdocs/magento/app/code/core/Mage/Sales/Model/Quote/Item.php on line 209

Looking for a solution…

EDIT: I noticed that when I logged out of the user account I was using for the test orders the problem disappeared. I still have to check if it appears again if I login again with the same account. Nevertheless the problem still exists.

 
Magento Community Magento Community
Magento Community
Magento Community
 
baoutch
Jr. Member
 
Total Posts:  11
Joined:  2007-09-04
 

This is really weird… Today i don’t see the error. Wether i’m connected as a user or not, everything goes fine.
I have a dedicated server and didn’t change anything in its configuration.
I’m kinda worried though. Wouldn’t want this to happen on a random basis.
Hope someone gets the reasons of the error.

Btw i do have an InnoDB engine running on my magento database.

Cheers.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Polo Magento
Jr. Member
 
Total Posts:  21
Joined:  2008-12-11
 

Same conclusion for the moment here, very weird…

Because i am developping an extension and didn’t have time to check through this bug, i replaced getStoreId() by my true store_id, which was 0, and i didn’t get the error anymore.The “quote” for the cart object seems not to initialize correctly. I’ll make further inverstigation on this.

But i’m a bit disapointed. That’s the second fatal bug i’m discovering in 1.2.0.2. The other one is very very funny :
- A Bundle product with fixed price
- Some options with fixed price != 0
- When i check one or more, the price is well updated on the detail page
- But not when i add it into cart, and sometimes yes on cart, but not every product in final bill o_O

And i found why. The SKU of my bundle product o_o I still don’t understand why, i modified it and tada o_o

Hope the Varien team will fix fatal bugs like that before making new features !

 
Magento Community Magento Community
Magento Community
Magento Community
 
Daynos
Sr. Member
 
Avatar
Total Posts:  98
Joined:  2008-02-12
Rennes, Bretagne
 

A customer reports to me the same error !
She sends me a screenshot (cf attachements);

As I have only 1 shop, I did the same hack. I replaced line 209 :

->setStoreId($this->getQuote()->getStoreId())
by
->setStoreId(0)

I guess this is not a perfect solution, but as long as it allows customers to put products in their cart, it sounds fine wink

Image Attachments
bug-getStoreId.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
 
Otternase
Member
 
Total Posts:  67
Joined:  2008-02-14
 

Hi@ all

Same problem here, version 1.202, i have one configurable product with two options, if i select the second option before selecting the first one I get this error.

The hack of Polo Magento doesn’t work for me i have more than one Shop.

Has anyone checked the solution from
http://www.magentocommerce.com/boards/viewthread/27706/

I have no idea which tables i have to change so Innodb and which one have to be MyISAM
<edit>
I found a list by Lemax in thje following thread
http://www.magentocommerce.com/boards/viewthread/26356/P15/

(...)
All tables should be InnoDB except the following :
catalogsearch_fulltext
log_customer
log_quote
log_summary
log_summary_type
log_url
log_url_info
log_visitor
log_visitor_info
oscommerce_orders
oscommerce_orders_products
oscommerce_orders_status_history
oscommerce_orders_total
paygate_authorizenet_debug
paypal_api_debug
product_alert_stock
sendfriend_log

InnoDB should be enabled, then when you create a table it has the correct engine (InnoDB or MyISAM)
(...)
</edit>

Best regards

Otternase

 
Magento Community Magento Community
Magento Community
Magento Community
 
dAvydAv
Jr. Member
 
Avatar
Total Posts:  29
Joined:  2008-04-22
 

Merci Daynos,

Grâce à toi cela fonctionne!!!!

It’s work again!!

 
Magento Community Magento Community
Magento Community
Magento Community
 
stengah
Member
 
Avatar
Total Posts:  42
Joined:  2008-07-17
Denmark
 

Same issue here:

Fatal error: Call to a member function getStoreId() on a non-object in home/myuser/domains/mydomain.com/public_html/app/code/core/Mage/Sales/Model/Quote/Item.php on line 209

When adding configurable item to cart - calling to this page: http://mydomain.com/checkout/cart/

I dont know if this is the same with simple products - I mostly use configurable products and need this solved.

I am using Magento ver. 1.2.0.2

Surely somebody from the Varien team is looking into this. In my book this bug is critical considering that it appears in a release named production stable - and ought to be adressed asap.

Meanwhile - anybody here have any qualified solution to this issue whatsoever - if one runs more than 1 store??

 
Magento Community Magento Community
Magento Community
Magento Community
 
Polo Magento
Jr. Member
 
Total Posts:  21
Joined:  2008-12-11
 

I think there are problems with associations Product/Store.

i don’t have time right know, but look if you’re product are well associated with a store (and not only with a category).

 
Magento Community Magento Community
Magento Community
Magento Community
 
stengah
Member
 
Avatar
Total Posts:  42
Joined:  2008-07-17
Denmark
 

Solution suggested by Daynos at # 9 seems to work for 1 store. At least it did in my case - but for people woth multiple stores I do not know.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Polo Magento
Jr. Member
 
Total Posts:  21
Joined:  2008-12-11
 

Read all thread before posting dudes, it was already writen that our solution is for only 1 store wink

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 1 of 3