home *** CD-ROM | disk | FTP | other *** search
- <!-- sb2buy2 Order page functions -->
- <!-- (c) Copyright 2001 GS Software -->
- <!-- -->
- <SCRIPT LANGUAGE="JavaScript">
-
-
- function showItems()
- {
- var tablerowcolor = '#F0F0F0';
-
- totprice = 0;
- totvat = 0;
- document.writeln('<TABLE class="basket" width=100% BORDER=0 CELLPADDING="2">');
- document.writeln('<TR BGCOLOR="#C0C0C0"><TD class="basket"><b>'+parent.Loc_Article+'</b></TD><TD class="basket" align="right"><b>'+parent.Loc_Quantity+'</b></TD><TD class="basket" align="right"><b>'+parent.Loc_PriceEach+'</b></TD><td class="basket" align="right"><b>'+parent.Loc_PriceTotal+'</b></td></TR>');
- document.writeln('<TR BGCOLOR="F8F8F8"><TD class="basket" colspan="4"><HR></TD></TR>');
-
- for (var i = 1; i < parent.theBasket.length; i++)
- {
- with(parent.theBasket[i])
- {
- theitem=Item;
- thequantity =Quantity;
- itemtotal = 0;
-
- if ((parseFloat(Price2)>0) && (parseInt(Quantity) >= parseInt(Quantity2)))
- theprice=Price2
- else
- if ((parseFloat(Price1)>0) && (parseInt(Quantity) >= parseInt(Quantity1)))
- theprice=Price1
- else
- theprice = Price;
-
- itemtotal = (eval(theprice*thequantity));
- temptotal = itemtotal * 100;
- totprice = totprice + itemtotal;
-
- thisvat = (parseFloat(itemtotal*productvatrate)) / (parseFloat(productvatrate)+parseFloat(100));
- thisvat = parseFloat(parent.alterError(thisvat));
- totvat = totvat + thisvat;
-
- if(Attribut1=='') A1=''; else A1=', '+Attribut1;
- if(Attribut2=='') A2=''; else A2=', '+Attribut2;
- if(Attribut3=='') A3=''; else A3=', '+Attribut3;
-
- itemlist=i;
-
- hilf="";
- if (Textin != "") hilf="<BR> "+Textin;
- document.write('<tr BGCOLOR="'+tablerowcolor+'"> <td class="basket">'+theitem+A1+A2+A3+hilf+'</td>');
- document.writeln('<td class="basket" align=right>'+thequantity+'</td><td class="basket" align=right>'+parent.alterError(theprice)+'</td><td class="basket" align=right>'+parent.alterError(itemtotal)+'</td></tr>');
- document.writeln('<INPUT TYPE="hidden" NAME="Artikel'+itemlist+'" VALUE="'+theitem+A1+A2+A3+" "+Textin+'" SIZE="40">');
- document.writeln('<INPUT TYPE="hidden" NAME="Menge'+itemlist+'" VALUE="'+thequantity+'" SIZE="40">');
- document.writeln('<INPUT TYPE="hidden" NAME="Einzelpreis'+itemlist+'" VALUE="'+theprice+'" SIZE="40">');
-
- {IfShowVat}
- document.writeln('<INPUT TYPE="hidden" NAME="'+parent.Loc_ShortVat+itemlist+'" VALUE="'+parent.alterError(thisvat)+' ('+productvatrate+'%)" SIZE="40">');
- {EndIfShowVat}
-
- {ifshowvat}+' inkl. '+productvatrate+'% MwSt'{endifshowvat}
- document.writeln('<INPUT TYPE="hidden" NAME="Gesamtpreis'+itemlist+'" VALUE="'+parent.alterError(itemtotal)+'" SIZE="40">');
-
- if (tablerowcolor == '#F0F0F0')
- tablerowcolor = "#F8F8F8";
- else
- tablerowcolor = "#F0F0F0";
- }
- }
-
-
- var postage=0;
- postage=parseFloat(parent.myshipmentvalue);
- var discount=0;
-
- if ((totprice>={DisAmount1})&({DisCount1} != 0))
- discount={Discount1};
-
- if((totprice>={DisAmount2})&({DisCount2}!=0))
- discount={Discount2};
-
- var discountamount=totprice*discount/100;
- var discountprice=totprice-discountamount;
-
- if ((discountprice>={PAmount1})&({PAmount1}!=0)&(postage>{Postage1}))
- postage={Postage1};
-
- if ((discountprice>={PAmount2})&({PAmount2}!=0)&(postage>{Postage2}))
- postage={Postage2};
-
- document.writeln('<TR BGCOLOR="F8F8F8"><TD class="basket" colspan="4"><HR></TD></TR>');
- document.writeln('<INPUT TYPE="hidden" NAME="pid" VALUE="'+parent.pid+'">');
- var finalprice=discountprice+postage;
-
- document.writeln('<TR BGCOLOR="#C0C0C0"><td class="basket" colspan=3><b>'+parent.Loc_Total+'</b></td><td class="basket" align=right><b>{Currency} '+parent.alterError(totprice)+'</b></td></tr>');
-
- {IfUseCurrency1}
- document.writeln('<TR BGCOLOR="#C0C0C0"><td class="basket" colspan=3>'+parent.Loc_InEuro+' {Currency1} '+parent.alterError(totprice*{CURRENCYCONVERTER1})+'</td><td class="basket" align=right></td></tr>');
- {ElseIfUseCurrency1}
- {EndIfUseCurrency1}
-
- if (discount>0)
- document.writeln('<TR BGCOLOR="#C0C0C0"><td class="basket"><b>'+parent.Loc_Discount+'</b></td><td class="basket" align=right colspan=2><b>'+parent.alterError(discount)+" %"+'</b></td><td class="basket" align=right><b>{Currency} '+parent.alterError(discountamount)+'</b></td></tr>');
-
- document.writeln('<TR BGCOLOR="#C0C0C0"><td class="basket" colspan=3><b>'+parent.Loc_Postage+ '</b> ('+parent.myshipmenttext+')</td><td class="basket" align=right><b>{Currency} '+parent.alterError(postage)+'</b></td></tr>');
-
- document.writeln('<TR BGCOLOR="#C0C0C0"><TD class="basket" colspan="5"></TD></TR>');
-
- document.writeln('<TR BGCOLOR="#C0C0C0"><td class="basket" colspan=3><b>Endpreis</b> (Zahlung per '+parent.mypaymentvalue+')</td><td class="basket" align=right><b>{Currency} '+parent.alterError(finalprice)+'</b></td></tr>');
-
- {IFSHOWVAT}
- var postagevat = postage*{VATRATE}/({VATRATE}+100)
- totvat = totvat + postagevat;
- document.writeln('<tr BGCOLOR="#C0C0C0"><td class="basket" colspan=3>'+parent.Loc_VAT+': {Currency} '+parent.alterError(totvat)+'</td><td class="basket" align=right></td></tr>');
- {ENDIFSHOWVAT}
-
-
-
- document.writeln('<INPUT TYPE="hidden" NAME="Warenwert" VALUE="'+parent.alterError(totprice)+'" SIZE="40">');
-
- if (discount>0)
- document.writeln('<INPUT TYPE="hidden" NAME="Rabatt" VALUE="'+parent.alterError(discountamount)+'" SIZE="40">');
-
- document.writeln('<INPUT TYPE="hidden" NAME="Versandart" VALUE="'+parent.myshipmenttext+'" SIZE="40">');
-
- document.writeln('<INPUT TYPE="hidden" NAME="Versandkosten" VALUE="'+parent.alterError(postage)+'" SIZE="40">');
-
- document.writeln('<INPUT TYPE="hidden" NAME="Zahlungsart" VALUE="'+parent.mypaymentvalue+'" SIZE="40">');
-
- {IFSHOWVAT}
- document.writeln('<INPUT TYPE="hidden" NAME="'+parent.Loc_VAT+'" VALUE="'+parent.alterError(totvat)+'" SIZE="40">');
- {ENDIFSHOWVAT}
-
- <!--{IfPaybox}-->
- if (parent.mypaymentvalue == 'Paybox')
- {
- document.writeln('<INPUT TYPE="hidden" NAME="PayboxOrderNr" VALUE="'+parent.mypayboxnr+'" SIZE="40">');
- }
- <!--{EndIfPaybox}-->
-
-
-
-
- document.writeln('<INPUT TYPE="hidden" NAME="Rechnungsbetrag" VALUE="'+parent.alterError(finalprice)+'" SIZE="40">');
-
-
-
- document.writeln('</TABLE>');
- }
-
- </SCRIPT>
-