summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhartmut <noreply@maennchen1.de>2017-06-16 08:30:29 +0000
committerhartmut <noreply@maennchen1.de>2017-06-16 08:30:29 +0000
commit9e3f0c863ebf51d9f4b7304b2bd1224eb0a7e3cd (patch)
tree1e84714dd96f0c20c9a96a4a134a162a73ffcb45
parent4c306ebdbef57cd127c7b885ede530310e1d81d4 (diff)
Lagerbestand an Variantenbestand koppeln
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6333 0d5edaf7-2b12-4e95-93f4-047927463d4b
-rw-r--r--views/mods/mod_stock/product_addedit_content.phtml15
1 files changed, 12 insertions, 3 deletions
diff --git a/views/mods/mod_stock/product_addedit_content.phtml b/views/mods/mod_stock/product_addedit_content.phtml
index c797d7d..5dccce2 100644
--- a/views/mods/mod_stock/product_addedit_content.phtml
+++ b/views/mods/mod_stock/product_addedit_content.phtml
@@ -8,17 +8,26 @@
<?php echo wpsg_drawForm_AdminboxStart(__('Lagerbestand', 'wpsg')); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_stock_stock', __('Lagerbestand', 'wpsg'), wpsg_getStr($this->view['data']['stock'], '0')); ?>
+ <?php
+ // $this->view['oProduct']['loadedData']['id/product_key']
+ $key = $this->view['oProduct']->id;
+
+ if ($this->callMod('wpsg_mod_productvariants', 'isVariantsProduct', array($key)) == true) {
+ echo wpsg_drawForm_Input('wpsg_mod_stock_stock', __('Lagerbestand', 'wpsg'), wpsg_getStr($this->view['data']['stock']), array('readonly' => true));
+ } else {
+ echo wpsg_drawForm_Input('wpsg_mod_stock_stock', __('Lagerbestand', 'wpsg'), wpsg_getStr($this->view['data']['stock']), array());
+ }
+ ?>
<?php echo wpsg_drawForm_Checkbox('wpsg_mod_stock_stock_count', __('Lagerbestand zählen', 'wpsg'), wpsg_getStr($this->view['data']['stock_count'], '0')); ?>
<br />
<div class="info"><?php echo __('Lagerbestand = Bestand(Variante 1) + Bestand(Variante 2) + Bestand(Variante X)','wpsg'); ?></div>
-
+
<?php /* Mailbenachrichtigung beim Erreichen des Minimalbestandes des Produktes */ ?>
<?php if ($this->get_option('wpsg_mod_stock_minstockproduct') == '1') { ?>
<?php echo wpsg_drawForm_Input('wpsg_mod_minstockproduct', __('Mindestlagerbestand', 'wpsg'), wpsg_getStr($this->view['data']['minstockproduct_count'])); ?>
- <?php echo wpsg_drawForm_Input('wpsg_mod_stock_minstockproduct_mail', __('Benachrichtigung an', 'wpsg'), wpsg_getStr($this->view['data']['minstockproduct_mail'])); ?>
+ <?php echo wpsg_drawForm_Input('wpsg_mod_stock_minstockproduct_mail', __('Benachrichtigung an', 'wpsg'), wpsg_getStr($this->view['data']['minstockproduct_mail'])); ?>
<?php }?>
<br />