1324 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Einstellungen des Rabatt Moduls
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
|
|
8 |
|
3808 |
daniel |
9 |
<br />
|
|
|
10 |
<div class="wpsg_mod_discount_settings">
|
|
|
11 |
<div class="wpsg_admin_box" id="wpsg_tab">
|
|
|
12 |
<div class="head">
|
|
|
13 |
<div class="title">
|
|
|
14 |
<div class="tab" id="tab1"><?php echo __('Produktrabatt', 'wpsg'); ?></div>
|
|
|
15 |
<div class="tab" id="tab2"><?php echo __('Warenkorbrabatt', 'wpsg'); ?></div>
|
|
|
16 |
<div class="wpsg_clear"></div>
|
|
|
17 |
</div>
|
1324 |
daniel |
18 |
</div>
|
3808 |
daniel |
19 |
<div class="content" id="wpsg_mwst_list">
|
|
|
20 |
|
|
|
21 |
<div id="tabcontent1" class="tabcontent">
|
|
|
22 |
|
4929 |
thomas |
23 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_productdiscount', __('Rabatt auf Produkte', 'wpsg'), $this->get_option('wpsg_mod_discount_productdiscount'), array('help' =>'wpsg_mod_discount_productdiscount')); ?>
|
3808 |
daniel |
24 |
|
4929 |
thomas |
25 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_universal', __('Rabatt auf alle Produkte', 'wpsg'), $this->get_option('wpsg_mod_discount_universal'), array('help' => 'wpsg_mod_discount_universal')); ?>
|
3808 |
daniel |
26 |
|
|
|
27 |
<div class="wpsg_form_field" id="wpsg_mod_discount_universal_layer">
|
|
|
28 |
<div class="wpsg_form_left"> </div>
|
|
|
29 |
<div class="wpsg_form_right">
|
|
|
30 |
<div class="wpsg_mod_discount_generalcol">
|
|
|
31 |
<strong><?php echo __('Von (tt.mm.jjjj)', 'wpsg'); ?></strong><br />
|
|
|
32 |
<input name="wpsg_mod_discount_universal_from" type="text" value="<?php echo $this->get_option('wpsg_mod_discount_universal_from'); ?>" id="wpsg_mod_discount_universal_from" />
|
|
|
33 |
</div>
|
|
|
34 |
<div class="wpsg_mod_discount_generalcol">
|
|
|
35 |
<strong><?php echo __('Bis (tt.mm.jjjj)', 'wpsg'); ?></strong><br />
|
|
|
36 |
<input name="wpsg_mod_discount_universal_to" type="text" value="<?php echo $this->get_option('wpsg_mod_discount_universal_to'); ?>" id="wpsg_mod_discount_universal_to" />
|
|
|
37 |
</div>
|
|
|
38 |
<div class="wpsg_mod_discount_generalcol">
|
|
|
39 |
<strong><?php echo __('Rabatt', 'wpsg'); ?></strong><br />
|
|
|
40 |
<input name="wpsg_mod_discount_universal_value" type="text" value="<?php echo $this->get_option('wpsg_mod_discount_universal_value'); ?>" id="wpsg_mod_discount_universal_value" />
|
|
|
41 |
</div>
|
|
|
42 |
</div>
|
|
|
43 |
<div class="wpsg_clear"></div><br />
|
|
|
44 |
</div>
|
|
|
45 |
|
|
|
46 |
<?php if ($this->hasMod('wpsg_mod_productgroups')) { ?>
|
4929 |
thomas |
47 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_productgroupdiscount', __('Rabatt auf Produktgruppen', 'wpsg'), $this->get_option('wpsg_mod_discount_productgroupdiscount'), array('help' => 'wpsg_mod_discount_productgroupdiscount')); ?>
|
3808 |
daniel |
48 |
<?php } ?>
|
|
|
49 |
|
|
|
50 |
<?php if ($this->hasMod('wpsg_mod_customergroup')) { ?>
|
4929 |
thomas |
51 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_customergroup', __('Rabatt auf Kundengruppen', 'wpsg'), $this->get_option('wpsg_mod_discount_customergroup'), array('help' => 'wpsg_mod_discount_customergroup')); ?>
|
3808 |
daniel |
52 |
<?php } ?>
|
|
|
53 |
|
5255 |
thomas |
54 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_show', __('Originalpreis im Produkttemplate anzeigen', 'wpsg'), $this->get_option('wpsg_mod_discount_show'), array ('help' => 'wpsg_mod_discount_show')); ?>
|
3808 |
daniel |
55 |
|
|
|
56 |
<div class="wpsg_form_field" id="wpsg_mod_discount_hierarchie">
|
|
|
57 |
<div class="wpsg_form_left">
|
|
|
58 |
<?php echo __('Rabattreihenfolge (für Berechnung):', 'wpsg')?><br />
|
|
|
59 |
<a href="#" onclick="return wpsg_mod_discount_restoredefaulthierarchie();"><?php echo __('Standard wiederherstellen', 'wpsg'); ?></a>
|
|
|
60 |
</div>
|
|
|
61 |
<div class="wpsg_form_right">
|
|
|
62 |
|
|
|
63 |
<ul>
|
|
|
64 |
<?php foreach ($this->view['wpsg_mod_discount']['hierarchie'] as $discount_typ) { ?>
|
|
|
65 |
<li class="<?php echo $discount_typ; ?>">
|
|
|
66 |
<input type="hidden" name="wpsg_mod_discount_hierarchie[]" value="<?php echo $discount_typ; ?>" />
|
|
|
67 |
<input type="checkbox" value="<?php echo $discount_typ; ?>" <?php echo ((in_array($discount_typ, (array)explode(',', $this->get_option('wpsg_mod_discount_hierarchie'))))?'checked="checked"':''); ?> name="wpsg_mod_discount_hierarchie[]" />
|
|
|
68 |
<?php echo $this->callMod('wpsg_mod_discount', 'getNameFromType', array($discount_typ)); ?>
|
|
|
69 |
</li>
|
|
|
70 |
<?php } ?>
|
|
|
71 |
</ul>
|
|
|
72 |
|
|
|
73 |
<p class="wpsg_hinweis"><?php echo __('Reihenfolge kann mittels Drag&Drop verändert werden.', 'wpsg'); ?></p>
|
|
|
74 |
|
|
|
75 |
<input type="hidden" name="wpsg_mod_discount_stopRabatt" value="0" />
|
|
|
76 |
<label>
|
|
|
77 |
<input type="checkbox" name="wpsg_mod_discount_stopRabatt" value="1" <?php echo (($this->get_option('wpsg_mod_discount_stopRabatt') == '1')?'checked="checked"':''); ?> />
|
|
|
78 |
<?php echo __('Nur ersten Rabatt berücksichtigen', 'wpsg'); ?>
|
|
|
79 |
</label>
|
|
|
80 |
|
|
|
81 |
</div>
|
|
|
82 |
<div class="wpsg_clear"></div>
|
|
|
83 |
</div>
|
|
|
84 |
|
|
|
85 |
</div>
|
|
|
86 |
|
|
|
87 |
<div id="tabcontent2" class="tabcontent">
|
|
|
88 |
|
|
|
89 |
<div class="wpsg_form_field">
|
|
|
90 |
<div class="wpsg_form_left"><?php echo __('Staffelung:', 'wpsg'); ?></div>
|
|
|
91 |
<div class="wpsg_form_right">
|
|
|
92 |
|
|
|
93 |
<div class="wpsg_mod_discount_seriescol"><strong><?php echo __('Bestellwert', 'wpsg'); ?></strong></div>
|
|
|
94 |
<div class="wpsg_mod_discount_seriescol"><strong><?php echo __('Rabatt', 'wpsg'); ?></strong></div>
|
|
|
95 |
<div class="wpsg_clear"></div>
|
|
|
96 |
|
|
|
97 |
<div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg').' '.wpsg_ff(0, $this->get_option('wpsg_currency')); ?></div>
|
5051 |
daniel |
98 |
<div class="wpsg_mod_discount_seriescol wpsg_mod_discount_seriescol_sub"><input type="text" name="value[0][rabatt]" value="<?php echo wpsg_ff($this->view['data'][0]['rabatt']); ?>" /></div>
|
3808 |
daniel |
99 |
<div class="wpsg_clear"></div>
|
|
|
100 |
|
|
|
101 |
<?php foreach ($this->view['data'] as $k => $v) { if ($k > 0) { ?>
|
|
|
102 |
<div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg').' '.wpsg_ff($v['value'], $this->get_option('wpsg_currency')); ?></div>
|
5051 |
daniel |
103 |
<div class="wpsg_mod_discount_seriescol wpsg_mod_discount_seriescol_sub"><input type="text" name="value[<?php echo $k; ?>][rabatt]" value="<?php echo wpsg_ff($v['rabatt']); ?>" /></div>
|
|
|
104 |
<div class="wpsg_mod_discount_seriescol wpsg_mod_discount_seriescol_sub"><label><input type="checkbox" name="value[<?php echo $k; ?>][del]" value="1" /> <?php echo __('löschen', 'wpsg'); ?></label></div>
|
3808 |
daniel |
105 |
<input type="hidden" name="value[<?php echo $k; ?>][value]" value="<?php echo $v['value']; ?>" /><div class="wpsg_clear"></div>
|
|
|
106 |
<?php } } ?>
|
|
|
107 |
|
|
|
108 |
<div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg'); ?> <input type="text" name="neu[value]" value="" /> <?php echo $this->get_option('wpsg_currency'); ?></div>
|
|
|
109 |
<div class="wpsg_mod_discount_seriescol"><input type="text" name="neu[rabatt]" value="" /></div>
|
|
|
110 |
<div class="wpsg_clear"></div>
|
|
|
111 |
|
|
|
112 |
</div>
|
|
|
113 |
</div>
|
|
|
114 |
<div class="wpsg_clear"></div>
|
|
|
115 |
|
5022 |
daniel |
116 |
<br />
|
|
|
117 |
|
|
|
118 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_showBasket', __('Nächste Staffelung im Warenkorb anpreisen', 'wpsg'), $this->get_option('wpsg_mod_discount_showBasket')); ?>
|
|
|
119 |
|
3808 |
daniel |
120 |
</div>
|
|
|
121 |
|
1324 |
daniel |
122 |
</div>
|
3808 |
daniel |
123 |
|
1324 |
daniel |
124 |
</div>
|
3808 |
daniel |
125 |
|
1324 |
daniel |
126 |
</div>
|
|
|
127 |
|
3808 |
daniel |
128 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
129 |
|
|
|
130 |
jQuery(document).ready(function() {
|
|
|
131 |
|
|
|
132 |
jQuery("#wpsg_mod_discount_hierarchie ul").sortable().disableSelection();
|
1324 |
daniel |
133 |
|
3808 |
daniel |
134 |
jQuery('#wpsg_tab').wpsg_tab( {
|
|
|
135 |
'cookiename': 'wpsg_mod_discount_tab',
|
|
|
136 |
'tab1': function() {
|
|
|
137 |
jQuery('.tablink').show();
|
|
|
138 |
}
|
|
|
139 |
} );
|
|
|
140 |
|
|
|
141 |
jQuery('#wpsg_mod_discount_universal').bind('change', function() {
|
|
|
142 |
wpsg_switchUniversalDiscount();
|
|
|
143 |
} );
|
|
|
144 |
|
|
|
145 |
wpsg_switchUniversalDiscount();
|
1324 |
daniel |
146 |
|
3808 |
daniel |
147 |
} );
|
|
|
148 |
|
|
|
149 |
function wpsg_mod_discount_restoredefaulthierarchie()
|
|
|
150 |
{
|
|
|
151 |
|
|
|
152 |
jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .general'));
|
|
|
153 |
jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .product'));
|
|
|
154 |
jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .productgroup'));
|
|
|
155 |
jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .customer'));
|
1324 |
daniel |
156 |
|
3808 |
daniel |
157 |
return false;
|
1324 |
daniel |
158 |
|
3808 |
daniel |
159 |
}
|
|
|
160 |
|
1324 |
daniel |
161 |
function wpsg_switchUniversalDiscount()
|
|
|
162 |
{
|
|
|
163 |
|
|
|
164 |
if (jQuery('#wpsg_mod_discount_universal').attr("checked") == "checked")
|
|
|
165 |
{
|
|
|
166 |
jQuery('#wpsg_mod_discount_universal_layer').show();
|
|
|
167 |
}
|
|
|
168 |
else
|
|
|
169 |
{
|
|
|
170 |
jQuery('#wpsg_mod_discount_universal_layer').hide();
|
|
|
171 |
}
|
|
|
172 |
|
|
|
173 |
}
|
|
|
174 |
|
3808 |
daniel |
175 |
/* ]]> */</script>
|