| 4 |
lars |
1 |
<style>
|
|
|
2 |
.billingAddress:hover{
|
|
|
3 |
cursor:pointer;
|
|
|
4 |
background-color: #fffff!important;
|
|
|
5 |
}
|
|
|
6 |
.shippingAddress:hover{
|
|
|
7 |
cursor:pointer;
|
|
|
8 |
background-color: #fffff!important;
|
|
|
9 |
}
|
|
|
10 |
</style>
|
|
|
11 |
<script>
|
|
|
12 |
$(document).ready(function(){
|
|
|
13 |
{if $bill}
|
|
|
14 |
var change = ".changeBillingAddress";
|
|
|
15 |
var changeDialog = ".changeBillingAddressDialog";
|
|
|
16 |
{else}
|
|
|
17 |
var change = ".changeShippingAddress";
|
|
|
18 |
var changeDialog = ".changeShippingAddressDialog";
|
|
|
19 |
{/if}
|
|
|
20 |
|
|
|
21 |
$(changeDialog).dialog({
|
|
|
22 |
autoOpen: false,
|
|
|
23 |
height: "auto",
|
|
|
24 |
width: "auto",
|
|
|
25 |
modal: true,
|
|
|
26 |
title: "Adresse wechseln",
|
|
|
27 |
buttons: {
|
|
|
28 |
"Beenden": function() {
|
|
|
29 |
$(changeDialog).dialog( "close" );
|
|
|
30 |
}
|
|
|
31 |
},
|
|
|
32 |
close: function() {
|
|
|
33 |
$(changeDialog).dialog( "close" );
|
|
|
34 |
}
|
|
|
35 |
});
|
|
|
36 |
|
|
|
37 |
$(change).click(function(){
|
|
|
38 |
$(changeDialog).dialog("open");
|
|
|
39 |
}).button();
|
|
|
40 |
{if $bill}
|
|
|
41 |
$( "div" ).delegate( ".billingAddress", "click", function() {
|
|
|
42 |
id = $(this).attr("id");
|
|
|
43 |
idsplit = id.split("_");
|
|
|
44 |
addr_id = idsplit[0];
|
|
|
45 |
$(changeDialog).dialog( "close" ).dialog( "destroy" );
|
|
|
46 |
window.location.href = "index.php?buy=true&changeAddress="+addr_id+"&action=changeBillingAddress";
|
|
|
47 |
|
|
|
48 |
});
|
|
|
49 |
{else}
|
|
|
50 |
$( "div" ).delegate( ".shippingAddress", "click", function() {
|
|
|
51 |
id = $(this).attr("id");
|
|
|
52 |
idsplit = id.split("_");
|
|
|
53 |
addr_id = idsplit[0];
|
|
|
54 |
land_id = idsplit[1];
|
|
|
55 |
|
|
|
56 |
$(changeDialog).dialog( "close" ).dialog( "destroy" );
|
|
|
57 |
window.location.href = "index.php?buy=true&changeAddress="+addr_id+"&action=changeShippingAddress";
|
|
|
58 |
|
|
|
59 |
});
|
|
|
60 |
{/if}
|
|
|
61 |
|
|
|
62 |
});
|
|
|
63 |
</script>
|
|
|
64 |
|
|
|
65 |
{if $bill}
|
|
|
66 |
{if $ini.modules.adresssystem == "alt" && !isset($smarty.session.SHOP.buy.Login.defaultRechnungIdAdresse) && !isset($smarty.session.SHOP.buy.Login.defaultLieferIdAdresse)}
|
|
|
67 |
{assign var="adressID" value=0}
|
|
|
68 |
{else}
|
|
|
69 |
{if isset($smarty.get.changeAddress) && ( isset($smarty.get.action) && $smarty.get.action == "changeBillingAddress" )}
|
|
|
70 |
{assign var="adressID" value=$smarty.session.bill_addr_id}
|
|
|
71 |
{else}
|
|
|
72 |
{assign var="adressID" value=$smarty.session.SHOP.buy.Login.defaultRechnungIdAdresse}
|
|
|
73 |
{/if}
|
|
|
74 |
{/if}
|
|
|
75 |
{else}
|
|
|
76 |
{if $ini.modules.adresssystem == "alt" && !isset($smarty.session.SHOP.buy.Login.defaultRechnungIdAdresse) && !isset($smarty.session.SHOP.buy.Login.defaultLieferIdAdresse)}
|
|
|
77 |
{assign var="adressID" value=1}
|
|
|
78 |
{else}
|
|
|
79 |
{if isset($smarty.get.changeAddress) && ( isset($smarty.get.action) && $smarty.get.action == "changeShippingAddress" )}
|
|
|
80 |
{assign var="adressID" value=$smarty.session.ship_addr_id}
|
|
|
81 |
{else}
|
|
|
82 |
{assign var="adressID" value=$smarty.session.SHOP.buy.Login.defaultLieferIdAdresse}
|
|
|
83 |
{/if}
|
|
|
84 |
{/if}
|
|
|
85 |
{/if}
|
|
|
86 |
<table>
|
|
|
87 |
<tr>
|
|
|
88 |
{if $bill}
|
|
|
89 |
<td><h1 style="padding:0!important;">{$langstrings.buy.billing_address}</h1></td>
|
|
|
90 |
{else}
|
|
|
91 |
<td><h1 style="padding:0!important;">{$langstrings.buy.delivery_address}</h1></td>
|
|
|
92 |
{/if}
|
|
|
93 |
</tr>
|
|
|
94 |
<tr>
|
|
|
95 |
<td>
|
|
|
96 |
{foreach $addresses["{$adressID}"] as $bezeichnung => $data}
|
|
|
97 |
{if $bezeichnung == "Name" || $bezeichnung == "strasse" || $bezeichnung == "stadt" || $bezeichnung == "land_name" || $bezeichnung == "email"}
|
|
|
98 |
{$data}
|
|
|
99 |
<br />
|
|
|
100 |
{/if}
|
|
|
101 |
{/foreach}
|
|
|
102 |
</td>
|
|
|
103 |
</tr>
|
|
|
104 |
<tr>
|
|
|
105 |
{if $bill}
|
|
|
106 |
<td><input type="hidden" name="bill_addr_id" value={if $adressID}{$adressID}{else}{$billid}{/if} /></td>
|
|
|
107 |
{else}
|
|
|
108 |
<td><input type="hidden" name="ship_addr_id" value={if $adressID}{$adressID}{else}{$billid}{/if} /></td>
|
|
|
109 |
{/if}
|
|
|
110 |
</tr>
|
|
|
111 |
<tr>
|
|
|
112 |
{if $bill}
|
|
|
113 |
<td class="changeBillingAddress"><a>{$langstrings.buy.change_address_billing}</a></td>
|
|
|
114 |
{else}
|
|
|
115 |
<td class="changeShippingAddress"><a>{$langstrings.buy.change_address_shipping}</a></td>
|
|
|
116 |
{/if}
|
|
|
117 |
</tr>
|
|
|
118 |
</table>
|
|
|
119 |
|
|
|
120 |
{if $bill}
|
|
|
121 |
<div class="changeBillingAddressDialog{if $ini.modules.adresssystem == "alt" && !isset($smarty.session.SHOP.buy.Persdata.defaultRechnungIdAdresse ) && !isset( $smarty.session.SHOP.buy.Persdata.defaultLieferIdAdresse)}Alt{/if}" style="background-color: #f8f8f8f;">
|
|
|
122 |
{include file="adress.tpl" ship=false}
|
|
|
123 |
</div>
|
|
|
124 |
{else}
|
|
|
125 |
<div class="changeShippingAddressDialog{if $ini.modules.adresssystem == "alt" && !isset( $smarty.session.SHOP.buy.Persdata.defaultRechnungIdAdresse ) && !isset( $smarty.session.SHOP.buy.Persdata.defaultLieferIdAdresse )}Alt{/if}" style="background-color: #f8f8f8f;">
|
|
|
126 |
{include file="adress.tpl" ship=true}
|
|
|
127 |
</div>
|
|
|
128 |
{/if}
|