Magento Warenkorb Daten im Header / Warenkorb auslesen – Magento: get cart data
Den Warenkorb von Magento kann man wie folgt auslesen:
<?php
$_countHelper = $this->helper('checkout/cart')->getSummaryCount(); //get total items in cart
$_totalHelper = $this->helper('checkout/cart')->getQuote()->getGrandTotal(); //get total price
if($count==0)
{
echo $this->__('<a href="/checkout/cart" class="cartgo">(0 ITEMS)</a>',$count);
}
if($count==1)
{
echo $this->__('<a href="/checkout/cart" class="cartgo">(1 ITEM)</a>',$count);
}
if($count>1)
{
echo $this->__('<a href="/checkout/cart" class="cartgo">(%s ITMES)</a>',$count);
}
echo $this->__('', $this->helper('core')->formatPrice($total, false));
?>
Please share this article von facebook & google plus or where you want, thank you!


