Magento Warenkorb Daten im Header / Warenkorb auslesen – Magento: get cart data

6. Januar 2015 at 14:58
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!

GD Star Rating
loading...
GD Star Rating
loading...
Magento Warenkorb Daten im Header / Warenkorb auslesen - Magento: get cart data, 10.0 out of 10 based on 2 ratings