1

My currency switcher works fine up till I add a product in my cart. After adding a product in my cart if I change the currency the website crashes and gives me a fatal error of memory:

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 523800 bytes) in /home/ubuntu/domains/magento/app/code/core/Mage/Core/Model/Config.php on line 1328
emmanuel
  • 9,607
  • 10
  • 25
  • 38
Curious Programmer
  • 127
  • 1
  • 2
  • 13

1 Answers1

3

This error can occure when you have observer for events sales_quote_collect_totals_before or sales_quote_collect_totals_after and in methods for this observers you try to get quote object e.g by Mage::getSingleton('checkout/session')->getQuote(). Solution for this is to get quote like this:

public function observerMethod(Varien_Event_Observer $observer)
{ $quote = $observer->getEvent()->getQuote(); }

Maciej Bozek
  • 66
  • 1
  • 3