Subversion Repositories wpShopGermany4

Rev

Rev 5261 | Rev 5825 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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>
13
    </ul>
14
    <div class="tab-content">
15
        <div role="tabpanel" class="tab-pane active" id="tab1">
3808 daniel 16
 
5792 daniel 17
            <?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')); ?>
18
			<?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')); ?>
19
 
20
            <div class="wpsg_form_field" id="wpsg_mod_discount_universal_layer">
21
                <?php echo wpsg_drawForm_TextStart(); ?>
22
 
23
                    <?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)); ?>
24
                    <?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)); ?>
25
                    <?php echo wpsg_drawForm_Input('wpsg_mod_discount_universal_value', __('Rabatt', 'wpsg'), $this->get_option('wpsg_mod_discount_universal_value'), array()); ?>
26
 
27
                <?php echo wpsg_drawForm_TextEnd('', array('noP' => true)); ?>
28
            </div>
29
 
30
            <?php if ($this->hasMod('wpsg_mod_productgroups')) { ?>
31
                <?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')); ?>
32
            <?php } ?>
33
 
34
            <?php if ($this->hasMod('wpsg_mod_customergroup')) { ?>
35
                <?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')); ?>
36
            <?php } ?>
37
 
38
            <?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')); ?>
39
 
40
            <br />
41
            <?php echo wpsg_drawForm_TextStart(); ?>
42
            <ul class="wpsg_mod_discount_hirarchieorder">
43
                <?php foreach ($this->view['wpsg_mod_discount']['hierarchie'] as $discount_typ) { ?>
44
                <li class="<?php echo $discount_typ; ?>">
45
                    <input type="hidden" name="wpsg_mod_discount_hierarchie[]" value="<?php echo $discount_typ; ?>" />
46
                    <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[]" />
47
                    <?php echo $this->callMod('wpsg_mod_discount', 'getNameFromType', array($discount_typ)); ?>
48
                </li>
49
                <?php } ?>
50
            </ul>
51
            <p class="info"><?php echo __('Reihenfolge kann mittels Drag&Drop verändert werden.', 'wpsg'); ?></p>
52
            <a href="#" onclick="return wpsg_mod_discount_restoredefaulthierarchie();"><?php echo __('Standard wiederherstellen', 'wpsg'); ?></a>
53
 
54
            <?php echo wpsg_drawForm_TextEnd(__('Rabattreihenfolge (für Berechnung)', 'wpsg'), array('noP' => true)); ?>
55
 
56
            <br />
57
 
58
            <?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_stopRabatt', __('Nur ersten Rabatt berücksichtigen', 'wpsg'), $this->get_option('wpsg_mod_discount_stopRabatt'), array('label' => __('Optionen', 'wpsg'))); ?>
59
            <?php echo wpsg_drawForm_Checkbox('wpsg_mod_discount_showBasket', __('Nächste Staffelung im Warenkorb anpreisen', 'wpsg'), $this->get_option('wpsg_mod_discount_showBasket')); ?>
60
 
61
        </div>
62
        <div role="tabpanel" class="tab-pane" id="tab2">
63
 
64
            <?php echo wpsg_drawForm_TextStart(); ?>
65
                    <div class="wpsg_mod_discount_seriescol"><strong><?php echo __('Bestellwert', 'wpsg'); ?></strong></div>
66
                    <div class="wpsg_mod_discount_seriescol"><strong><?php echo __('Rabatt', 'wpsg'); ?></strong></div>
67
                    <div class="wpsg_clear"></div>
68
 
69
                    <div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg').' '.wpsg_ff(0, $this->get_option('wpsg_currency')); ?></div>
70
                    <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>
71
                    <div class="wpsg_clear"></div>
72
 
73
                    <?php foreach ($this->view['data'] as $k => $v) { if ($k > 0) { ?>
74
                    <div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg').' '.wpsg_ff($v['value'], $this->get_option('wpsg_currency')); ?></div>
75
                    <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>
76
                    <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>
77
                    <input type="hidden" name="value[<?php echo $k; ?>][value]" value="<?php echo $v['value']; ?>" /><div class="wpsg_clear"></div>
78
                    <?php } } ?>
79
 
80
                    <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>
81
                    <div class="wpsg_mod_discount_seriescol"><input type="text" name="neu[rabatt]" value="" /></div>
82
                    <div class="wpsg_clear"></div>
83
            <?php echo wpsg_drawForm_TextEnd(__('Staffelung', 'wpsg'), array('noP' => true)); ?>
84
 
85
 
86
        </div>
87
    </div>
1324 daniel 88
</div>
89
 
3808 daniel 90
<script type="text/javascript">/* <![CDATA[ */
91
 
92
	jQuery(document).ready(function() {
93
 
5792 daniel 94
		jQuery("ul.wpsg_mod_discount_hirarchieorder").sortable().disableSelection();
3808 daniel 95
 
96
		jQuery('#wpsg_mod_discount_universal').bind('change', function() {
97
			wpsg_switchUniversalDiscount();
98
		} );
99
 
100
		wpsg_switchUniversalDiscount();
1324 daniel 101
 
3808 daniel 102
	} );
103
 
104
	function wpsg_mod_discount_restoredefaulthierarchie()
105
	{
106
 
107
		jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .general'));
108
		jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .product'));
109
		jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .productgroup'));
110
		jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .customer'));
1324 daniel 111
 
3808 daniel 112
		return false;
1324 daniel 113
 
3808 daniel 114
	}
115
 
1324 daniel 116
	function wpsg_switchUniversalDiscount()
117
	{
118
 
119
		if (jQuery('#wpsg_mod_discount_universal').attr("checked") == "checked")
120
		{
121
			jQuery('#wpsg_mod_discount_universal_layer').show();
122
		}
123
		else
124
		{
125
			jQuery('#wpsg_mod_discount_universal_layer').hide();
126
		}
127
 
128
	}
129
 
3808 daniel 130
/* ]]> */</script>