summaryrefslogtreecommitdiff
path: root/views/mods/mod_shippingadress/checkout_inner_prebutton.phtml
blob: c9fbf7f9812404160465b58c3342d6d2a2b0c44b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<div class="wpsg_mod_shippingadress">

	<h2><?php echo __('Gesonderte Lieferadresse', 'wpsg'); ?></h2>
	
	<div class="wpsg_spacer"></div>
	
	<div class="wpsg_inner">
	
		<div class="wpsg_checkoutblock">
			<label for="act_checkout_shippingadress">
				<input id="act_checkout_shippingadress" class="wpsg_checkout formfield_checkbox" type="checkbox" name="wpsg[checkout][diff_shippingadress]" value="" <?php echo ((wpsg_isSizedInt($_SESSION['wpsg']['checkout']['diff_shippingadress']))?'checked="checked"':'') ?> onclick="view_checkout_shippingadresss()" />
				<?php echo __('Gesonderte Lieferadresse abweichend von der Rechnungsadresse verwenden', 'wpsg') ?>
			</label>			
		</div>
		
		<div class="wpsg_clear"></div>
		
		<div class="checkout_shippingadress" style="display:none;"> 
		
			<div class="wpsg_checkoutblock">
				<label for="firma" class="wpsg_checkout"><?php echo __("Firma:", "wpsg"); ?>
					<?php if ($this->view['pflicht']['firma'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
				</label>
				<input class="<?php echo (($this->view['pflicht']['firma'] != '1')?'validate[required]':''); ?> wpsg_checkout <?php echo ((in_array("name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_name" name="wpsg[checkout][shipping_firma]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_firma'])); ?>" />
			</div>
		
			<div class="wpsg_checkoutblock">
				<label for="title" class="wpsg_checkout"><?php echo __("Anrede:", "wpsg"); ?>
					<?php if ($this->view['pflicht']['anrede'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
				</label>
				<select class="<?php echo (($this->view['pflicht']['anrede'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("title", (array)$this->view['error']))?'wpsg_error':''); ?>" type="select" id="shipping_title" name="wpsg[checkout][shipping_title]">
				<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
				<?php $i=0; foreach (explode("|", $this->view['pflicht']['anrede_auswahl']) as $t) { ?>
				<option value="<?php echo $i; /*wpsg_hspc($t);*/ $i++; ?>" <?php echo ((wpsg_isSizedString($this->view['basket']['checkout']['shipping_title'], $t))?'selected="selected"':''); ?>><?php echo $t; ?></option>
				<?php } ?>
				</select>
			</div>
			
			<div class="wpsg_checkoutblock">
				<label for="vname" class="wpsg_checkout"><?php echo __("Vorname:", "wpsg"); ?>
					<?php if ($this->view['pflicht']['vname'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
				</label>
				<input class="<?php echo (($this->view['pflicht']['vname'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_vname", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_vname" name="wpsg[checkout][shipping_vname]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_vname'])); ?>" />
			</div>
				
			<div class="wpsg_checkoutblock">
				<label for="name" class="wpsg_checkout"><?php echo __("Name:", "wpsg"); ?>
					<?php if ($this->view['pflicht']['name'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>:
				</label>
				<input class="<?php echo (($this->view['pflicht']['name'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_name", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_name" name="wpsg[checkout][shipping_name]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_name'])); ?>" />
			</div>
				
			<div class="wpsg_checkoutblock">
				<label for="strasse" class="wpsg_checkout"><?php echo __("Straße, Nr.:", "wpsg"); ?>
					<?php if ($this->view['pflicht']['strasse'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
				</label>
				<input class="<?php echo (($this->view['pflicht']['strasse'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_strasse", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_strasse" name="wpsg[checkout][shipping_strasse]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_strasse'])); ?>" />		
			</div>
			
			<div class="wpsg_checkoutblock">
				<label for="plz" class="wpsg_checkout"><?php echo __("Postleitzahl:", "wpsg"); ?> 
					<?php if ($this->view['pflicht']['plz'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
				</label>
				<input class="<?php echo (($this->view['pflicht']['plz'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_plz", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_plz" name="wpsg[checkout][shipping_plz]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_plz'])); ?>" />
			</div>
				
			<div class="wpsg_checkoutblock">
				<label for="ort" class="wpshopgermany_checkout"><?php echo __("Ort:", "wpsg"); ?> 
					<?php if ($this->view['pflicht']['ort'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
				</label>
				<input class="<?php echo (($this->view['pflicht']['ort'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_ort", (array)$this->view['error']))?'wpsg_error':''); ?>" type="text" id="shipping_ort" name="wpsg[checkout][shipping_ort]" value="<?php echo wpsg_hspc(wpsg_getStr($this->view['basket']['checkout']['shipping_ort'])); ?>" />
			</div>
				
			<div class="wpsg_checkoutblock">
				<label for="wpsg_land" class="wpsg_checkout"><?php echo __("Land:", "wpsg"); ?>
					<?php if ($this->view['pflicht']['land'] != '1') { ?><span class="wpsg_required">*</span><?php } ?>
				</label>					
				<select name="wpsg[checkout][shipping_land]" class="<?php echo (($this->view['pflicht']['land'] != '1')?'validate[required_shipping]':''); ?> wpsg_checkout <?php echo ((in_array("shipping_land", (array)$this->view['error']))?'wpsg_error':''); ?>" id="shipping_land">
					<option value="-1"><?php echo __('Bitte auswählen', 'wpsg'); ?></option>
					<?php foreach ($this->view['laender'] as $l) { ?>
					<option value="<?php echo $l['id']; ?>" <?php echo (($l['id'] == $this->view['basket']['checkout']['shipping_land'])?'selected="selected"':''); ?>><?php echo wpsg_hspc($l['name']); ?></option>
					<?php } ?>
				</select>
			</div>
		 
			<script type="text/javascript">/* <![CDATA[ */
					
				function view_checkout_shippingadresss()
				{
			 
					if (jQuery('#act_checkout_shippingadress').prop('checked') != true)
					{
						
						jQuery('.checkout_shippingadress').attr('style', 'display:none;');
						jQuery('#act_checkout_shippingadress').attr('value', null);

						<?php if ($this->get_option('wpsg_form_validation') == '2') { ?>
						jQuery.validator.removeClassRules('validate[required_shipping]', { cRequired: true } );
						<?php } ?>
						
					}
			
					if (jQuery('#act_checkout_shippingadress').prop('checked') == true)
					{
						
						jQuery('.checkout_shippingadress').attr('style', 'display:display;');
						jQuery('#act_checkout_shippingadress').attr('value', 1);

						<?php if ($this->get_option('wpsg_form_validation') == '2') { ?>
						jQuery.validator.addClassRules('validate[required_shipping]', { cRequired: true } );
						<?php } ?>
						
					}	
					
					return false;
					
				}
		
				jQuery(document).ready(function()
				{	
					
					view_checkout_shippingadresss();
					
				});
				
			/* ]]> */</script>
		</div>
	</div>
</div>