Mit {$content_count} kann die Anzahl der Artikel im Warenkorb und mit {$cart_total} die Gesamtsumme ausgegeben werden, dies funktioniert jedoch nur innerhalb der Box {box name=cart}. Mit {box name=cart} wir das Template box_cart.html eingebunden, welches im Templateordner unter /xtCore/boxes zu finden ist.
Auszug aus der box_cart.html mit Anzahl der Artikel.
{if $smarty.const._CUST_STATUS_SHOW_PRICE eq '1'} {if $show_cart_content == true} <h2>{txt key=TEXT_CART} ({$content_count} Artikel)</h2>
Mit Hilfe der $_SESSION kann nun die Anzahl der Artikel und die Gesamtsumme auch außerhalb der Box {box name=cart} ausgegeben werden.
echo $_SESSION['cart']->content_count; echo $_SESSION['cart']->content_total[formated];
5 Antworten auf xt:Commerce VEYTON 4.0 – Anzahl im Warenkorb und Gesamtsumme