summaryrefslogtreecommitdiff
path: root/views/order/backendEdit
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2018-11-19 13:59:10 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2018-11-19 13:59:10 +0000
commita99ad8192db9f8b6be6d100f3b38b59d277badd2 (patch)
tree0743025cf504b2585c17b22bd8a7629bad58277b /views/order/backendEdit
parentdd9cbbaf329efab4984bc6a0daf13f49eead78e2 (diff)
- Bestellverwaltung
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7210 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/order/backendEdit')
-rw-r--r--views/order/backendEdit/addProduct_product_selected.phtml38
1 files changed, 34 insertions, 4 deletions
diff --git a/views/order/backendEdit/addProduct_product_selected.phtml b/views/order/backendEdit/addProduct_product_selected.phtml
index ba13724..93824bd 100644
--- a/views/order/backendEdit/addProduct_product_selected.phtml
+++ b/views/order/backendEdit/addProduct_product_selected.phtml
@@ -39,10 +39,18 @@
<div class="image"><?php echo wp_get_attachment_image($attachment_id, [100, 100]); ?></div>
<?php } ?>
- <?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()))); ?>
+ <?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'))); ?>
<?php echo wpsg_drawForm_Input('add_amount', __('Menge', 'wpsg'), (($oOrderProduct !== false)?$oOrderProduct->getCount():'1')); ?>
-
- <?php if ($this->callMod('wpsg_mod_productvariants', 'isVariantsProduct', [$oProduct->id])) { $arVariants = $this->callMod('wpsg_mod_productvariants', 'getVariants', [$oProduct->id, true, true, true]); ?>
+ <?php echo wpsg_drawForm_Checkbox('add_eu',__('EU-Leistungsortregel anwenden', 'wpsg'),(($oOrderProduct !== false)?$oOrderProduct->euleistungsortregel:'1')) ?>
+
+ <?php if ($this->callMod('wpsg_mod_productvariants', 'isVariantsProduct', [$oProduct->id])) {
+
+ $arVariants = $this->callMod('wpsg_mod_productvariants', 'getVariants', [$oProduct->id, true, true, true]);
+
+ if ($oOrderProduct !== false) $arVariantenInfoArray = $this->callMod('wpsg_mod_productvariants', 'getVariantenInfoArray', [$oOrderProduct->getProductKey()]);
+ else $arVariantenInfoArray = [];
+
+ ?>
<?php if (wpsg_isSizedArray($arVariants)) { ?>
@@ -55,11 +63,33 @@
?>
- <?php echo wpsg_drawForm_Select('wpsg_vp['.$var_id.']', $var_data['name'], $arVariSelect,''); ?>
+ <?php echo wpsg_drawForm_Select('wpsg_vp['.$var_id.']', $var_data['name'], $arVariSelect,$arVariantenInfoArray[$var_data['id']]['vari_id'], ['field_class' => 'varichange']); ?>
<?php } ?>
<?php } ?>
+
+ <script>
+
+ jQuery('.varichange').on('change', function() {
+
+ jQuery('#add_price').val('..');
+
+ jQuery.ajax( {
+ 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; ?>',
+ data: {
+ form_data: jQuery('#wpsg_product_add_form').serialize()
+ },
+ success: function(data) {
+
+ jQuery('#add_price').val(data);
+
+ }
+ } );
+
+ } );
+
+ </script>
<?php } ?>