}
//store in cart
if($storeincart){
+ //get cart
$cartid=WebCart::getCart();
if($cartid==""){
$p=$twig->loadTemplate("carterror.html");
return $p->render($basevars);
}
+ //get customer data
$cart=WTcart::getFromDB($cartid);
$cart->customerid=$ct->customerid;
$cart->update();
+ //get address if there is none yet
+ if($cart->deliveryaddress==false){
+ $addrs=WTaddress::selectFromDB("customerid=".$ct->customerid,"ORDER BY lastused DESC");
+ if(count($addrs)>0){
+ $cart->deliveryaddress=$addrs[0]->addressid;
+ $cart->update();
+ }
+ }
}
//store in session
$sess=WOWebSession::getOrCreateWebSession();
<li><a href="{{script.tickets|raw}}">Ticket Shop</a></li>
<li><a href="{{script.vouchers|raw}}">Voucher Shop</a></li>
<li><a href="{{script.shop|raw}}">Merchandising</a></li>
-<li><a href="{{script.mycart|raw}}">My Shoping Cart</a></li>
+<li><a href="{{script.mycart|raw}}">My Shopping Cart</a></li>
</ul>
{% endblock page %}