Subversion Repositories wpShopGermany4

Rev

Rev 7173 | Rev 7974 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7173 Rev 7210
Line 37... Line 37...
37
    
37
    
38
    <?php if (wpsg_isSizedInt($attachment_id)) { ?>
38
    <?php if (wpsg_isSizedInt($attachment_id)) { ?>
39
    <div class="image"><?php echo wp_get_attachment_image($attachment_id, [100, 100]); ?></div>
39
    <div class="image"><?php echo wp_get_attachment_image($attachment_id, [100, 100]); ?></div>
40
    <?php } ?>
40
    <?php } ?>
41
    
41
    
42
    <?php echo wpsg_drawForm_Input('add_price', __('Produktpreis', 'wpsg').' '.(($this->getBackendTaxView() === WPSG_BRUTTO)?'(BRUTTO)':'(NETTO'), (($oOrderProduct !== false)?$oOrderProduct->getPrice($this->getBackendTaxView()):$oProduct->getPrice($this->getBackendTaxView()))); ?>
42
    <?php echo wpsg_drawForm_Input('add_price', __('Produktpreis', 'wpsg').' '.(($this->getBackendTaxView() === WPSG_BRUTTO)?'(BRUTTO)':'(NETTO'), wpsg_ff((($oOrderProduct !== false)?$oOrderProduct->getPrice($this->getBackendTaxView()):$oProduct->getPrice($this->getBackendTaxView())), $this->get_option('wpsg_currency'))); ?>
43
    <?php echo wpsg_drawForm_Input('add_amount', __('Menge', 'wpsg'), (($oOrderProduct !== false)?$oOrderProduct->getCount():'1')); ?>
43
    <?php echo wpsg_drawForm_Input('add_amount', __('Menge', 'wpsg'), (($oOrderProduct !== false)?$oOrderProduct->getCount():'1')); ?>
-
 
44
    <?php echo wpsg_drawForm_Checkbox('add_eu',__('EU-Leistungsortregel anwenden', 'wpsg'),(($oOrderProduct !== false)?$oOrderProduct->euleistungsortregel:'1')) ?>
44
    
45
	
-
 
46
    <?php if ($this->callMod('wpsg_mod_productvariants', 'isVariantsProduct', [$oProduct->id])) { 
-
 
47
    	
45
    <?php if ($this->callMod('wpsg_mod_productvariants', 'isVariantsProduct', [$oProduct->id])) { $arVariants = $this->callMod('wpsg_mod_productvariants', 'getVariants', [$oProduct->id, true, true, true]); ?> 
48
    	$arVariants = $this->callMod('wpsg_mod_productvariants', 'getVariants', [$oProduct->id, true, true, true]); 
-
 
49
    	
-
 
50
    	if ($oOrderProduct !== false) $arVariantenInfoArray = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', [$oOrderProduct->getProductKey()]);
-
 
51
    	else $arVariantenInfoArray = [];
-
 
52
    	 
-
 
53
    	?> 
46
        
54
        
47
        <?php if (wpsg_isSizedArray($arVariants)) { ?>
55
        <?php if (wpsg_isSizedArray($arVariants)) { ?>
48
                
56
                
49
            <br />
57
            <br />
50
            
58
            
Line 53... Line 61...
53
                    $arVariSelect = [];
61
                    $arVariSelect = [];
54
                    foreach ($var_data['arVariation'] as $vari_id => $vari_data) $arVariSelect[$vari_id] = $vari_data['name'];
62
                    foreach ($var_data['arVariation'] as $vari_id => $vari_data) $arVariSelect[$vari_id] = $vari_data['name'];
55
                
63
                
56
                ?>
64
                ?>
57
            
65
            
58
                <?php echo wpsg_drawForm_Select('wpsg_vp['.$var_id.']', $var_data['name'], $arVariSelect,''); ?>
66
                <?php echo wpsg_drawForm_Select('wpsg_vp['.$var_id.']', $var_data['name'], $arVariSelect,$arVariantenInfoArray[$var_data['id']]['vari_id'], ['field_class' => 'varichange']); ?>
59
                
67
                
60
            <?php } ?>
68
            <?php } ?>
61
        
69
        
62
        <?php } ?>
70
        <?php } ?>
-
 
71
		
-
 
72
		<script>
-
 
73
			
-
 
74
			jQuery('.varichange').on('change', function() {
-
 
75
 
-
 
76
				jQuery('#add_price').val('..');
-
 
77
				
-
 
78
				jQuery.ajax( {
-
 
79
					url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=addProduct&do=updatePrice&noheader=1&product_id=<?php echo $oProduct->id; ?>',
-
 
80
					data: {
-
 
81
						form_data: jQuery('#wpsg_product_add_form').serialize()
-
 
82
					},
-
 
83
					success: function(data) {
-
 
84
 
-
 
85
						jQuery('#add_price').val(data);
-
 
86
 
-
 
87
					}
-
 
88
				} );
-
 
89
				
-
 
90
			} );
-
 
91
			
-
 
92
		</script>
63
        
93
        
64
    <?php } ?> 
94
    <?php } ?> 
65
    
95
    
66
    <script>
96
    <script>
67
 
97