heartranked

git clone https://git.tarina.org/heartranked
Log | Files | Refs

checkout.html (1130B)


      1 $def with (checkoutform,bag,productname,errormsg,db,getprice)
      2 $ totsats = 0
      3 $ toteuro = 0
      4 <div id="container">
      5 <div id="default">
      6 <br>
      7 ~*~<br>
      8 <h2>Checkout</h2>
      9 in your order:<br> 
     10 $for i in bag: 
     11     $ goodies = db.query("SELECT * FROM soundlink WHERE id='" +i.product+"';")
     12     $code:
     13         price = getprice(i.product)
     14         quantity = i.quantity
     15         p_totsats=i.quantity*price[0]
     16         p_toteuro=i.quantity*price[1]
     17     $i.quantity x $productname(i.product)
     18     <a href="/dropitem/$i.product">X</a> $p_toteuro&euro;<br>
     19     $for g in goodies:
     20         $if g.soundname[-5:] == '.jpeg' or g.soundname[-4:] == '.png':
     21             <br>
     22             <img src="/static/img/thumb/$g.soundname" style="width:120px"><br>
     23             <br>
     24     $code:
     25         totsats += p_totsats
     26         toteuro += p_toteuro
     27 $if totsats > 0:
     28     <br>
     29     total: $toteuro &euro;
     30 <br>
     31 <br>
     32             ~*~<br>
     33 <br>
     34 Order is only reserved once paid.
     35 <br>
     36 <br>
     37 <h2>$errormsg</h2>
     38 <div id="addevent">
     39 <form method="POST">
     40 $:checkoutform.render()
     41 </form>
     42 </div>
     43 <br>
     44 ~*~<br>
     45 <br>
     46 <a href="/shop"><<<<<< back shoppin for more!!</a>
     47 </div>
     48 </div>
     49 </div>