I would like to get a Cart block outside of Magento. Here is my code.
<?php require_once ( $_SERVER['DOCUMENT_ROOT']."/app/Mage.php" ); umask(0); Mage::app('base','website'); echo Mage::app()->getLocale()->getLocaleCode(); //Solution Mage::getSingleton('core/translate')->setLocale('de_DE')->init('frontend', true); Mage::getSingleton('core/session', array('name'=>'frontend')); $block = Mage::getSingleton('core/layout') ->createBlock("checkout/cart_sidebar", "sidebar") ->setTemplate("checkout/cart/sidebar.phtml"); echo $block->toHtml(); ?>
I only have a problem that the output ist only in English and the translation does not work.
thanks for the help
source share