Magento Forum

   
Upgrade 1.4.1.1-1.7: checkout->save Undefined class constant ‘ENTITY’
 
mahaha99
Jr. Member
 
Total Posts:  11
Joined:  2012-09-29
 

Hi there,

when I try to save an order, on the last step of onestepcheckout, firebug returns a 500 error and in log file I find the errors I attached to this issue. I\’d say

Undefined class constant \'ENTITY\' in /var/www/html/testingshop_dev/app/code/core/Mage/Sales/Model/Resource/Quote.php on line 152refererhttps://dev.testingshop.de/checkout/onepage/
is the most important.
For testing we use prepayment, so that no payment provider is needed.
I did an upgrade via overwriting all not-needed files (all but own templates and own skin). Everything else works fine (except the Issue I described before ).

Thanks in advance,
Mario

File Attachments
checkout_save_log.txt  (File Size: 4KB - Downloads: 154)
 
Magento Community Magento Community
Magento Community
Magento Community
 
mahaha99
Jr. Member
 
Total Posts:  11
Joined:  2012-09-29
 

In my other post, Elfling, had some ideas I also tried: disable all modules incl. /local/Mage
Unfortunately this doesn’t help.

Do you have any other idea?

Thanks in advance
Mario

 
Magento Community Magento Community
Magento Community
Magento Community
 
elfling
Enthusiast
 
Avatar
Total Posts:  899
Joined:  2008-10-21
 

Hey Mario,

So the error occurs when you try and get a new order number from the database.

This is the code that is causing the problem.

return Mage::getSingleton('eav/config')->getEntityType(Mage_Sales_Model_Order::ENTITY)
            ->
fetchNewIncrementId($storeId);

Mage_Sales_Model_Order::ENTITY = ‘order’

Solution:

Reupload

Mage_Sales_Model_Order

Check in app/code/local

In local, do you have a directory called Mage.

If so, rename it ~Mage

Disable cache

Try and checkout.

 
Magento Community Magento Community
Magento Community
Magento Community
 
elfling
Enthusiast
 
Avatar
Total Posts:  899
Joined:  2008-10-21
 

Another solution would be to copy app / code / core / Mage / Sales / Model / Resource / Quote.php to local

Change

return Mage::getSingleton('eav/config')->getEntityType(Mage_Sales_Model_Order::ENTITY);

with

return Mage::getSingleton('eav/config')->getEntityType('order');

 
Magento Community Magento Community
Magento Community
Magento Community
 
mahaha99
Jr. Member
 
Total Posts:  11
Joined:  2012-09-29
 

Hi Elfling,

thank you very much. I found the solution. Strange enough: it was Econda Web Shop Controlling. I deinstalled it and installed it again and then the error was gone.

Great tips, thanks again for the help
take care
Mario

 
Magento Community Magento Community
Magento Community
Magento Community
 
elfling
Enthusiast
 
Avatar
Total Posts:  899
Joined:  2008-10-21
 

Your welcome Mario, glad I could help, even if it wasn’t the exact answer, but got you there in the end )

 
Magento Community Magento Community
Magento Community
Magento Community
 
Andy_I
Jr. Member
 
Total Posts:  5
Joined:  2012-01-18
 

Hi,

Many thanks for this thread. I experienced this exact problem (’undefined’ popup in Magento checkout after upgrade) and solved it by renaming the ‘app/code/local/Mage/Sales/Model/Order.php’ that I found to ensure that it was no longer picked up and that core Magento ‘Order.php’ module would be used.

There is obviously a question as to why this particular site was overriding that file in the first place, but this then just needs to be looked into.

Andy

 
Magento Community Magento Community
Magento Community
Magento Community
 
elfling
Enthusiast
 
Avatar
Total Posts:  899
Joined:  2008-10-21
 

The old Order.php file will have been trying to use methods from the old installation - pre upgrade.

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