Subversion Repositories wpShopGermany4

Rev

Rev 5825 | Rev 6548 | 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>
6457 thomas 67
                    <div class="wpsg_mod_discount_seriescol"><strong><?php echo __('Löschen', 'wpsg'); ?></strong></div>
5792 daniel 68
                    <div class="wpsg_clear"></div>
69
 
70
                    <div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg').' '.wpsg_ff(0, $this->get_option('wpsg_currency')); ?></div>
5825 daniel 71
                    <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 72
                    <div class="wpsg_clear"></div>
73
 
74
                    <?php foreach ($this->view['data'] as $k => $v) { if ($k > 0) { ?>
75
                    <div class="wpsg_mod_discount_seriescol"><?php echo __('ab', 'wpsg').' '.wpsg_ff($v['value'], $this->get_option('wpsg_currency')); ?></div>
76
                    <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 77
                    <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 78
                    <input type="hidden" name="value[<?php echo $k; ?>][value]" value="<?php echo $v['value']; ?>" /><div class="wpsg_clear"></div>
79
                    <?php } } ?>
80
 
81
                    <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>
82
                    <div class="wpsg_mod_discount_seriescol"><input type="text" name="neu[rabatt]" value="" /></div>
83
                    <div class="wpsg_clear"></div>
84
            <?php echo wpsg_drawForm_TextEnd(__('Staffelung', 'wpsg'), array('noP' => true)); ?>
85
 
86
 
87
        </div>
88
    </div>
1324 daniel 89
</div>
90
 
3808 daniel 91
<script type="text/javascript">/* <![CDATA[ */
92
 
93
	jQuery(document).ready(function() {
94
 
5792 daniel 95
		jQuery("ul.wpsg_mod_discount_hirarchieorder").sortable().disableSelection();
3808 daniel 96
 
97
		jQuery('#wpsg_mod_discount_universal').bind('change', function() {
98
			wpsg_switchUniversalDiscount();
99
		} );
100
 
101
		wpsg_switchUniversalDiscount();
1324 daniel 102
 
3808 daniel 103
	} );
104
 
105
	function wpsg_mod_discount_restoredefaulthierarchie()
106
	{
107
 
108
		jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .general'));
109
		jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .product'));
110
		jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .productgroup'));
111
		jQuery('#wpsg_mod_discount_hierarchie ul').append(jQuery('#wpsg_mod_discount_hierarchie .customer'));
1324 daniel 112
 
3808 daniel 113
		return false;
1324 daniel 114
 
3808 daniel 115
	}
116
 
1324 daniel 117
	function wpsg_switchUniversalDiscount()
118
	{
119
 
120
		if (jQuery('#wpsg_mod_discount_universal').attr("checked") == "checked")
121
		{
122
			jQuery('#wpsg_mod_discount_universal_layer').show();
123
		}
124
		else
125
		{
126
			jQuery('#wpsg_mod_discount_universal_layer').hide();
127
		}
128
 
129
	}
130
 
3808 daniel 131
/* ]]> */</script>