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

[solved] Fatal error whenn adding product to cart: Undefined class constant ‘TYPE_BILLING’
 
ConFX
Member
 
Total Posts:  37
Joined:  2009-05-29
 

Hi @ll,

first it seemed that everything went well during the upgrade from 1.6.2 to 1.7.0.
But during my tests I found out that adding an article to the cart leads to this error:

Fatal errorUndefined class constant 'TYPE_BILLING' in [...]/app/code/core/Mage/Sales/Model/Quote.php on line 547

Adding the lines

const TYPE_BILLING  'billing';
    const 
TYPE_SHIPPING 'shipping';
to the file /app/code/core/Mage/Sales/Model/Quote/Address.php (the lines were the in version 1.6.0) didn’t help ...

Any ideas?

ConFX

 
Magento Community Magento Community
Magento Community
Magento Community
 
bnice
Jr. Member
 
Total Posts:  15
Joined:  2011-06-09
 

I’ve added local files from an old installation to prevent telephone being a required field during checkout. When I’ve deleted that files everything went normal.

This modification was made once following the steps shown here: http://reinoud.net/2011/03/magento-removing-mandatory-validation-of-telephone-field and on several other descriptions. Maybe I had to be more careful overriding core files with old revisions of local files.

 
Magento Community Magento Community
Magento Community
Magento Community
 
ConFX
Member
 
Total Posts:  37
Joined:  2009-05-29
 

Hi bnice,

thanks for your response. This was exactly the proble I had, too!

Greetings,
ConFX

 
Magento Community Magento Community
Magento Community
Magento Community
 
dustinboling
Jr. Member
 
Total Posts:  3
Joined:  2010-08-02
 

Thank you! I had done the same.

I deleted the file located at:
app/code/local/Mage/Customer/Model/Address/Abstract.php

and all works as normal now. Though, the phone number is now being required again.

 
Magento Community Magento Community
Magento Community
Magento Community
 
freesh
Jr. Member
 
Total Posts:  7
Joined:  2011-04-01
 

Ahhhh thank you smile That was my problem too.

 
Magento Community Magento Community
Magento Community
Magento Community
 
klistrian
Member
 
Total Posts:  42
Joined:  2009-06-19
 

Same thing here. After upgrading to 1.7.0.2 it gave me a http 500 when adding a product to the shopping cart. Removing abstract fixed it.

Then I copied over a new abstract.php from the 1.7 core code and did the same fix in that code. Success!

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top