1324 |
daniel |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/**
|
|
|
4 |
* Template für die Einstellungen des Rabatt Moduls
|
|
|
5 |
*/
|
|
|
6 |
|
|
|
7 |
?>
|
|
|
8 |
|
5792 |
daniel |
9 |
<div>
|
|
|
10 |
<ul class="nav nav-tabs" role="tablist">
|
|
|
11 |
<li role="presentation" class="active"><a href="#tab1" aria-controls="home" role="tab" data-toggle="tab"><?php echo __('Produktrabatt', 'wpsg'); ?></a></li>
|
|
|
12 |
<li role="presentation"><a href="#tab2" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Warenkorbrabatt', 'wpsg'); ?></a></li>
|
7186 |
daniel |
13 |
<li role="presentation"><a href="#tab3" aria-controls="profile" role="tab" data-toggle="tab"><?php echo __('Optionen', 'wpsg'); ?></a></li>
|
5792 |
daniel |
14 |
</ul>
|
|
|
15 |
<div class="tab-content">
|
|
|
16 |
<div role="tabpanel" class="tab-pane active" id="tab1">
|
3808 |
daniel |
17 |
|
5792 |
daniel |
18 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_productdiscount', __('Rabatt auf Produkte', 'wpsg'), $this->get_option('wpsg_mod_discount_productdiscount'), array('label' => __('Aktivierte Rabatte', 'wpsg'), 'help' =>'wpsg_mod_discount_productdiscount')); ?>
|
|
|
19 |
<?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')); ?>
|
|
|
20 |
|
|
|
21 |
<div class="wpsg_form_field" id="wpsg_mod_discount_universal_layer">
|
|
|
22 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
23 |
|
|
|
24 |
<?php echo wpsg_drawForm_Input('wpsg_mod_discount_universal_from', __('Von (tt.mm.jjjj)', 'wpsg'), $this->get_option('wpsg_mod_discount_universal_from'), array('datepicker' => true)); ?>
|
|
|
25 |
<?php echo wpsg_drawForm_Input('wpsg_mod_discount_universal_to', __('Bis (tt.mm.jjjj)', 'wpsg'), $this->get_option('wpsg_mod_discount_universal_to'), array('datepicker' => true)); ?>
|
|
|
26 |
<?php echo wpsg_drawForm_Input('wpsg_mod_discount_universal_value', __('Rabatt', 'wpsg'), $this->get_option('wpsg_mod_discount_universal_value'), array()); ?>
|
|
|
27 |
|
|
|
28 |
<?php echo wpsg_drawForm_TextEnd('', array('noP' => true)); ?>
|
|
|
29 |
</div>
|
|
|
30 |
|
|
|
31 |
<?php if ($this->hasMod('wpsg_mod_productgroups')) { ?>
|
|
|
32 |
<?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')); ?>
|
|
|
33 |
<?php } ?>
|
|
|
34 |
|
|
|
35 |
<?php if ($this->hasMod('wpsg_mod_customergroup')) { ?>
|
|
|
36 |
<?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')); ?>
|
|
|
37 |
<?php } ?>
|
|
|
38 |
|
|
|
39 |
<?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')); ?>
|
|
|
40 |
|
|
|
41 |
<br />
|
|
|
42 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
43 |
<ul class="wpsg_mod_discount_hirarchieorder">
|
|
|
44 |
<?php foreach ($this->view['wpsg_mod_discount']['hierarchie'] as $discount_typ) { ?>
|
|
|
45 |
<li class="<?php echo $discount_typ; ?>">
|
|
|
46 |
<input type="hidden" name="wpsg_mod_discount_hierarchie[]" value="<?php echo $discount_typ; ?>" />
|
|
|
47 |
<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[]" />
|
|
|
48 |
<?php echo $this->callMod('wpsg_mod_discount', 'getNameFromType', array($discount_typ)); ?>
|
|
|
49 |
</li>
|
|
|
50 |
<?php } ?>
|
|
|
51 |
</ul>
|
|
|
52 |
<p class="info"><?php echo __('Reihenfolge kann mittels Drag&Drop verändert werden.', 'wpsg'); ?></p>
|
|
|
53 |
<a href="#" onclick="return wpsg_mod_discount_restoredefaulthierarchie();"><?php echo __('Standard wiederherstellen', 'wpsg'); ?></a>
|
|
|
54 |
|
|
|
55 |
<?php echo wpsg_drawForm_TextEnd(__('Rabattreihenfolge (für Berechnung)', 'wpsg'), array('noP' => true)); ?>
|
7181 |
thomas |
56 |
|
5792 |
daniel |
57 |
</div>
|
|
|
58 |
<div role="tabpanel" class="tab-pane" id="tab2">
|
|
|
59 |
|
|
|
60 |
<?php echo wpsg_drawForm_TextStart(); ?>
|
|
|
61 |
<div class="wpsg_mod_discount_seriescol"><strong><?php echo __('Bestellwert', 'wpsg'); ?></strong></div>
|
|
|
62 |
<div class="wpsg_mod_discount_seriescol"><strong><?php echo __('Rabatt', 'wpsg'); ?></strong></div>
|
6457 |
thomas |
63 |
<div class="wpsg_mod_discount_seriescol"><strong><?php echo __('Löschen', 'wpsg'); ?></strong></div>
|
5792 |
daniel |
64 |
<div class="wpsg_clear"></div>
|
|
|
65 |
|
|
|
66 |
<div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg').' '.wpsg_ff(0, $this->get_option('wpsg_currency')); ?></div>
|
5825 |
daniel |
67 |
<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>
|
5792 |
daniel |
68 |
<div class="wpsg_clear"></div>
|
|
|
69 |
|
|
|
70 |
<?php foreach ($this->view['data'] as $k => $v) { if ($k > 0) { ?>
|
|
|
71 |
<div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg').' '.wpsg_ff($v['value'], $this->get_option('wpsg_currency')); ?></div>
|
|
|
72 |
<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>
|
6457 |
thomas |
73 |
<div class="wpsg_mod_discount_seriescol wpsg_mod_discount_seriescol_sub"><input type="checkbox" name="value[<?php echo $k; ?>][del]" value="1" style="width:20px; float:left; margin-left:20px;"/></div>
|
5792 |
daniel |
74 |
<input type="hidden" name="value[<?php echo $k; ?>][value]" value="<?php echo $v['value']; ?>" /><div class="wpsg_clear"></div>
|
|
|
75 |
<?php } } ?>
|
|
|
76 |
|
|
|
77 |
<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>
|
|
|
78 |
<div class="wpsg_mod_discount_seriescol"><input type="text" name="neu[rabatt]" value="" /></div>
|
6548 |
hartmut |
79 |
<a id="wkrimage" style="margin-left:5px;" class="wpsg-glyphicon glyphicon glyphicon-plus" alt="Hinzufügen"></a>
|
5792 |
daniel |
80 |
<div class="wpsg_clear"></div>
|
|
|
81 |
<?php echo wpsg_drawForm_TextEnd(__('Staffelung', 'wpsg'), array('noP' => true)); ?>
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
</div>
|
7186 |
daniel |
85 |
<div role="tabpanel" class="tab-pane" id="tab3">
|
|
|
86 |
|
|
|
87 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_stopRabatt', __('Nur ersten Rabatt berücksichtigen', 'wpsg'), $this->get_option('wpsg_mod_discount_stopRabatt')); ?>
|
|
|
88 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_showBasket', __('Nächste Staffelung im Warenkorb anpreisen', 'wpsg'), $this->get_option('wpsg_mod_discount_showBasket'), array('help' => 'wpsg_mod_discount_showBasket')); ?>
|
|
|
89 |
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_voucher', __('Gutscheine bei aktivem Rabatt nicht zulassen', 'wpsg'), $this->get_option('wpsg_mod_discount_voucher'), array('help' => 'wpsg_mod_discount_voucher')); ?>
|
|
|
90 |
|
|
|
91 |
</div>
|
5792 |
daniel |
92 |
</div>
|
1324 |
daniel |
93 |
</div>
|
|
|
94 |
|
3808 |
daniel |
95 |
<script type="text/javascript">/* <![CDATA[ */
|
|
|
96 |
|
|
|
97 |
jQuery(document).ready(function() {
|
|
|
98 |
|
5792 |
daniel |
99 |
jQuery("ul.wpsg_mod_discount_hirarchieorder").sortable().disableSelection();
|
3808 |
daniel |
100 |
|
|
|
101 |
jQuery('#wpsg_mod_discount_universal').bind('change', function() {
|
|
|
102 |
wpsg_switchUniversalDiscount();
|
|
|
103 |
} );
|
|
|
104 |
|
6548 |
hartmut |
105 |
jQuery('#wkrimage').bind('click', function() {
|
|
|
106 |
jQuery('#submit').trigger('click');
|
|
|
107 |
} );
|
|
|
108 |
|
3808 |
daniel |
109 |
wpsg_switchUniversalDiscount();
|
1324 |
daniel |
110 |
|
3808 |
daniel |
111 |
} );
|
|
|
112 |
|
|
|
113 |
function wpsg_mod_discount_restoredefaulthierarchie()
|
|
|
114 |
{
|
|
|
115 |
|
|
|
116 |
jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .general'));
|
|
|
117 |
jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .product'));
|
|
|
118 |
jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .productgroup'));
|
|
|
119 |
jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .customer'));
|
1324 |
daniel |
120 |
|
3808 |
daniel |
121 |
return false;
|
1324 |
daniel |
122 |
|
3808 |
daniel |
123 |
}
|
|
|
124 |
|
1324 |
daniel |
125 |
function wpsg_switchUniversalDiscount()
|
|
|
126 |
{
|
|
|
127 |
|
|
|
128 |
if (jQuery('#wpsg_mod_discount_universal').attr("checked") == "checked")
|
|
|
129 |
{
|
|
|
130 |
jQuery('#wpsg_mod_discount_universal_layer').show();
|
|
|
131 |
}
|
|
|
132 |
else
|
|
|
133 |
{
|
|
|
134 |
jQuery('#wpsg_mod_discount_universal_layer').hide();
|
|
|
135 |
}
|
|
|
136 |
|
|
|
137 |
}
|
|
|
138 |
|
3808 |
daniel |
139 |
/* ]]> */</script>
|