Blame | Letzte Änderung | Log anzeigen | RSS feed
<?function showBasket( $templateRoot ){$template = loadTemplates( $templateRoot );$buffer = array();$content = array();$basketItems = getBasketItems();if ( $basketItems == array() ){echo templateContent( array(), $template["basketEmpty"] );}else{foreach ( $basketItems as $basketItemID => $elem ){if ( $elem["Father"] == -3 ){$elem["preis"] = $elem["preis1"];$elem["basketItemSumme"] = number_Format( $elem["preis1"], 2, ',', '.' ) ." €";}else{$addonItems = array();foreach ( getAddOnItems($elem["ID"]) as $addonItem ){templateContent( $addOnItem, $template["addOnItemImage"] );}$elem[MengeAdd] = $elem[Menge] + 1;$elem[MengeSub] = $elem[Menge] - 1;$elem["del"] = "/?basketItemRemove=" . $basketItemID;$elem['basketItemID'] = $basketItemID;$elem['optionen'] = basketItemOptions($elem);}$buffer[] = templateContent( $elem, $template["basketItem"] );}//$summe = getBasketSumme();//$summe = sprintf("%01.2f", $summe);$content["basketItems"] = implode( "", $buffer );// Gesamtsumme ausgeben$content["mwstGesamt"] = sprintf( $_SESSION['INI']['basket']['summe_infos'],numberFormat(getBasketSummeMWST()) );$content["basketSumme"] = templateContent( array("title" => numberFormat(getBasketSummeMWST()), "summe" => numberFormat(getBasketSumme(), 2, '.') . $_SESSION['INI']['basket']['euro'],"mwstGesamt" => $content["mwstGesamt"]), $template["basketWert"] );unset( $msg );// Versandoptionen lesen und ausgeben$versandarten = array();foreach ( $GLOBALS['Weban_Shop']->getVersandItems() as $vItem ){$vItem_Beschreibung = $vItem['beschr'];$vItem[preis] = numberFormat( $vItem['preis'] ) . $_SESSION['INI']['basket']['euro'];$versandarten[] = templateContent( $vItem, $template['versandItem'] );}if ( $_SESSION[SHOP][Lieferadresse] == "true" ){$Land = $_SESSION[SHOP][buy][Persdata][liefer_Land];}else{$Land = $_SESSION[SHOP][buy][Persdata][Land];}$msg[title] = "Mögliche Versandarten für " . getCountryByID( $Land ) ." (inkl. " . $_SESSION['INI']['mwst'] . "% MwSt.):<br>";$msg[Versand] = "<ul>" . implode( "", $versandarten ) . "</ul>";if ( count($versandarten) == 1 ){$msg[Versand] .= "<p>" . $vItem_Beschreibung . "</p>";}$content["basketVersand"] = templateContent( $msg, $template["msg"] );unset( $msg );echo templateContent( $content, $template["basketContainer"] );}}?>