thiswebshoprules

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

pending.html (1962B)


      1 $def with (pending_key,pendingform,pendinginfo,bag,productname,db,getprice,eur_to_sat,ordertype)
      2 $ totsats = 0
      3 $ toteuro = 0
      4 <div id="container">
      5 <div id="default">
      6 <a href="/checkout">Go back!</a>
      7 <br>
      8 <h2>Checkout</h2>
      9 
     10 in your order:<br> 
     11 $for i in bag: 
     12     $ goodies = db.query("SELECT * FROM soundlink WHERE id='" +i.product+"';")
     13     $code:
     14         price = getprice(i.product)
     15         quantity = i.quantity
     16         p_totsats=i.quantity*price[0]
     17         p_toteuro=i.quantity*price[1]
     18     $i.quantity x $productname(i.product)
     19     <a href="/dropitem/$i.product">X</a> $p_totsats $p_toteuro&euro;<br>
     20     $for g in goodies:
     21         $if g.soundname[-5:] == '.jpeg' or g.soundname[-4:] == '.png':
     22             <img src="/static/img/thumb/$g.soundname" style="width:120px"><br>
     23     $code:
     24         totsats += p_totsats
     25         toteuro += p_toteuro
     26 $if totsats > 0:
     27     <br>
     28     total: $totsats Satoshi or $toteuro &euro;
     29 
     30 <br>
     31 Order is only reserved once paid.
     32 <br>
     33 $if ordertype() == 'digital':
     34     <h2>Digital goods will be shipped to your email once invoice paid..</h2>
     35 $else:
     36     $ shippinginfo = db.select('shipping', where="country='" + pendinginfo.country + "'", what='price, days')[0]
     37     Shipping cost to $pendinginfo.country is $eur_to_sat(shippinginfo.price) Satoshi $(shippinginfo.price/100)&euro; <br>
     38     Shipping estimate is $shippinginfo.days days<br>
     39     $code:
     40         totsats += eur_to_sat(shippinginfo.price)
     41         toteuro += shippinginfo.price/100
     42     <pre>
     43     First Name: $pendinginfo.firstname
     44     Last Name: $pendinginfo.lastname
     45     Country: $pendinginfo.country
     46     Address: $pendinginfo.address
     47     Town: $pendinginfo.town
     48     Postalcode: $pendinginfo.postalcode
     49     Email: $pendinginfo.email
     50     </pre>
     51 
     52 <br>
     53 <p>
     54 $if totsats > 0:
     55     total: $totsats Satoshi $(toteuro)&euro;
     56 <p>
     57 <br>
     58 <a href="/checkout">Go back!</a>
     59 <div id="addevent">
     60 <form method="POST">
     61 $:pendingform.render()
     62 </form>
     63 </div>
     64 <b><p></p></b>
     65 </div>
     66 </div>
     67 </div>