_getCart(); if ($cart->getQuote()->getItemsCount()) { $cart->init(); $cart->save(); if (!$this->_getQuote()->validateMinimumAmount()) { $baseCurrencyCode = Mage::app()->getStore()->getBaseCurrencyCode(); $currentCurrencyCode = Mage::app()->getStore()->getCurrentCurrencyCode(); $minAmount = Mage::helper('directory')->currencyConvert(Mage::getStoreConfig('sales/minimum_order/amount'), $baseCurrencyCode, $currentCurrencyCode); $minimumAmount = Mage::app()->getLocale()->currency($currentCurrencyCode) ->toCurrency($minAmount); $warning = Mage::getStoreConfig('sales/minimum_order/description') ? Mage::getStoreConfig('sales/minimum_order/description') : Mage::helper('checkout')->__('Minimum order amount is %s', $minimumAmount); $cart->getCheckoutSession()->addNotice($warning); } } // Compose array of messages to add $messages = array(); foreach ($cart->getQuote()->getMessages() as $message) { if ($message) { // Escape HTML entities in quote message to prevent XSS $message->setCode(Mage::helper('core')->escapeHtml($message->getCode())); $messages[] = $message; } } $cart->getCheckoutSession()->addUniqueMessages($messages); /** * if customer enteres shopping cart we should mark quote * as modified bc he can has checkout page in another window. */ $this->_getSession()->setCartWasUpdated(true); Varien_Profiler::start(__METHOD__ . 'cart_display'); $this ->loadLayout() ->_initLayoutMessages('checkout/session') ->_initLayoutMessages('catalog/session') ->getLayout()->getBlock('head')->setTitle($this->__('Shopping Cart')); $this->renderLayout(); Varien_Profiler::stop(__METHOD__ . 'cart_display'); } }