1

I am getting below error, any help would be appreciated on making this error go away.
Fatal error: Undefined class constant 'TYPE_SHIPPING' in /app/code/core/Mage/Sales/Model/Quote.php on line 535 `

Call Stack: 0.0003 662728 1. {main}() /index.php:0 0.0021 1220368 2. Mage::run() /index.php:86 0.0070 3067968 3. Mage_Core_Model_App->run() /app/Mage.php:683 2.3175 20496024 4. Mage_Core_Controller_Varien_Front->dispatch() /app/code/core/Mage/Core/Model/App.php:354 2.3263 22448616 5. Mage_Core_Controller_Varien_Router_Standard->match() /app/code/core/Mage/Core/Controller/Varien/Front.php:176 2.3283 23055408 6. Mage_Core_Controller_Varien_Action->dispatch() /app/code/core/Mage/Core/Controller/Varien/Router/Standard.php:250 2.4710 29822912 7. Mage_Cms_IndexController->indexAction() /app/code/core/Mage/Core/Controller/Varien/Action.php:419 2.4714 29913656 8. Mage_Cms_Helper_Page->renderPage() /app/code/core/Mage/Cms/controllers/IndexController.php:45 2.4715 29913656 9. Mage_Cms_Helper_Page->_renderPage() /app/code/core/Mage/Cms/Helper/Page.php:52 2.7074 43451768 10. Mage_Core_Controller_Varien_Action->renderLayout() /app/code/core/Mage/Cms/Helper/Page.php:137 2.7076 43453432 11. Mage_Core_Model_Layout->getOutput() /app/code/core/Mage/Core/Controller/Varien/Action.php:390 2.7076 43453568 12. Mage_Core_Block_Abstract->toHtml() /app/code/core/Mage/Core/Model/Layout.php:555 2.7079 43458392 13. Mage_Core_Block_Template->_toHtml() /app/code/core/Mage/Core/Block/Abstract.php:863 2.7079 43458392 14. Mage_Core_Block_Template->renderView() /app/code/core/Mage/Core/Block/Template.php:286 2.7084 43459440 15. Mage_Core_Block_Template->fetchView() /app/code/core/Mage/Core/Block/Template.php:272 2.7087 43521872 16. include('/app/design/frontend/anatomical/default/template/page/1column.phtml') /app/code/core/Mage/Core/Block/Template.php:241 2.7582 44914856 17. Mage_Core_Block_Abstract->getChildHtml() /app/design/frontend/anatomical/default/template/page/1column.phtml:11 2.7582 44915016 18. Mage_Core_Block_Abstract->_getChildHtml() /app/code/core/Mage/Core/Block/Abstract.php:526 2.7582 44915016 19. Mage_Core_Block_Abstract->toHtml() /app/code/core/Mage/Core/Block/Abstract.php:582 2.7585 44915384 20. Mage_Core_Block_Template->_toHtml() /app/code/core/Mage/Core/Block/Abstract.php:863 2.7585 44915384 21. Mage_Core_Block_Template->renderView() /app/code/core/Mage/Core/Block/Template.php:286 2.7587 44915576 22. Mage_Core_Block_Template->fetchView() /app/code/core/Mage/Core/Block/Template.php:272 2.7589 44987520 23. include('/app/design/frontend/anatomical/default/template/page/html/header.phtml') /app/code/core/Mage/Core/Block/Template.php:241 2.7589 44987664 24. Mage_Core_Block_Abstract->getChildHtml() /app/design/frontend/anatomical/default/template/page/html/header.phtml:13 2.7589 44987824 25. Mage_Core_Block_Abstract->_getChildHtml() /app/code/core/Mage/Core/Block/Abstract.php:526 2.7589 44987824 26. Mage_Core_Block_Abstract->toHtml() /app/code/core/Mage/Core/Block/Abstract.php:582 2.7590 44988184 27. Mage_Core_Block_Template->_toHtml() /app/code/core/Mage/Core/Block/Abstract.php:863 2.7590 44988184 28. Mage_Core_Block_Template->renderView() /app/code/core/Mage/Core/Block/Template.php:286 2.7592 44988384 29. Mage_Core_Block_Template->fetchView() /app/code/core/Mage/Core/Block/Template.php:272 2.7594 45092488 30. include('/app/design/frontend/anatomical/default/template/checkout/cart/cartheader.phtml') /app/code/core/Mage/Core/Block/Template.php:241 2.7629 46209000 31. Mage_Checkout_Block_Cart_Sidebar->getSubtotal() /app/design/frontend/anatomical/default/template/checkout/cart/cartheader.phtml:38 2.7629 46209160 32. Mage_Checkout_Block_Cart_Abstract->getTotals() /app/code/core/Mage/Checkout/Block/Cart/Sidebar.php:114 2.7629 46209160 33. Mage_Checkout_Block_Cart_Sidebar->getTotalsCache() /app/code/core/Mage/Checkout/Block/Cart/Abstract.php:179 2.7629 46209520 34. Mage_Sales_Model_Quote->getTotals() /app/code/core/Mage/Checkout/Block/Cart/Sidebar.php:257 2.7662 47298600 35. Mage_Sales_Model_Quote->getShippingAddress() /app/code/core/Mage/Sales/Model/Quote.php:1267

`

3

I don't know if this is the case for you, but I've seen this on a website after an upgrade.
The constants are actually defined in Mage_Customer_Model_Address_Abstract but only in newer versions.
In my case, the previous dev, copied the Mage_Customer_Model_Address_Abstract class to the local folder (for some changes), and after the upgrade, that class was still used and it did not contain the constants TYPE_BILLING and TYPE_SHIPPING.

What I'm trying to say is investigate the local folder for things that might affect the addresses.

  • That was the case for me, too! – Arnie Feb 4 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.