summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthomas <noreply@maennchen1.de>2016-11-02 11:58:59 +0000
committerthomas <noreply@maennchen1.de>2016-11-02 11:58:59 +0000
commite6d178d1d27d5c65cc356068a43b4935250baa83 (patch)
treef2dc6cd94852bbfc1207186b51b13d3302fe37f1
parentb7760be020bdd90c4e960fe4ef28bf80fbe7e7d7 (diff)
- Gruppierungen im Produktbackend
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5890 0d5edaf7-2b12-4e95-93f4-047927463d4b
-rw-r--r--views/mods/mod_scaleprice/product_edit_allgemein.phtml204
-rw-r--r--views/mods/mod_stock/produkt_edit_sidebar.phtml4
-rw-r--r--views/mods/mod_topseller/produkt_addedit_allgemein.phtml2
-rw-r--r--views/produkt/addedit_price.phtml9
-rw-r--r--views/produkt/addedit_stock.phtml25
5 files changed, 240 insertions, 4 deletions
diff --git a/views/mods/mod_scaleprice/product_edit_allgemein.phtml b/views/mods/mod_scaleprice/product_edit_allgemein.phtml
new file mode 100644
index 0000000..e03be46
--- /dev/null
+++ b/views/mods/mod_scaleprice/product_edit_allgemein.phtml
@@ -0,0 +1,204 @@
+<?php
+
+ /**
+ * Template für die Integration der Staffelpreise in die Produktverwaltung
+ */
+
+?>
+<script type="text/javascript">/* <![CDATA[ */
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_mod_scaleprice_activ').bind('change', function() {
+
+ if (jQuery(this).attr('checked') == 'checked') jQuery('#wpsg_mod_scaleprice_layer').show();
+ else jQuery('#wpsg_mod_scaleprice_layer').hide();
+
+ } ).change();
+
+ jQuery('#wpsg_mod_scaleprice_typ').bind('change', function() { wpsg_mod_scaleprice_refresh(); } );
+ jQuery('#wpsg_mod_scaleprice_calc').bind('change', function() { wpsg_mod_scaleprice_saveAjax(); } );
+
+ <?php /* echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_downloadprodukte&edit_id=<?php echo $this->view['data']['id'] ?>&noheader=1&cmd=upload_file*/?>
+
+ } );
+
+ function wpsg_mod_scaleprice_add()
+ {
+
+ var wpsg_scale = jQuery('#wpsg_mod_scaleprice_scale').val();
+ var wpsg_value = jQuery('#wpsg_mod_scaleprice_value').val();
+
+ jQuery('#wpsg_mod_scaleprice_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=add',
+ data: {
+ 'scale': wpsg_scale,
+ 'value': wpsg_value
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_mod_scaleprice_target').html(data);
+ wpsg_mod_scaleprice_clearErrorField();
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_scaleprice_add()
+
+ function wpsg_mod_scaleprice_refresh()
+ {
+
+ jQuery('#wpsg_mod_scaleprice_target').html('<img src="<?php echo WPSG_URL; ?>views/gfx/ajax-loader.gif" alt="<?php echo __('Bitte warten ...', 'wpsg'); ?>" />');
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=refresh',
+ data: {
+ typ: jQuery('#wpsg_mod_scaleprice_typ').val(),
+ calc: jQuery('#wpsg_mod_scaleprice_calc').val()
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_mod_scaleprice_target').html(data);
+ wpsg_mod_scaleprice_clearErrorField();
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_scaleprice_refresh()
+
+ function wpsg_mod_scaleprice_saveAjax()
+ {
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=ajaxSave',
+ data: {
+ typ: jQuery('#wpsg_mod_scaleprice_typ').val(),
+ calc: jQuery('#wpsg_mod_scaleprice_calc').val()
+ },
+ success: function(data) {
+
+ wpsg_mod_scaleprice_clearErrorField();
+
+ }
+ } );
+
+ } // function wpsg_mod_scaleprice_saveAjax()
+
+ function wpsg_mod_scaleprice_clearErrorField()
+ {
+
+ var wpsg_product_edit_change_new = Array();
+
+ for (var i = 0; i < wpsg_product_edit_change.length; i++)
+ {
+
+ if (!wpsg_product_edit_change[i].match(/^wpsg_mod_scaleprice/))
+ {
+
+ wpsg_product_edit_change_new.push(wpsg_product_edit_change[i]);
+
+ }
+
+ }
+
+ wpsg_product_edit_change = wpsg_product_edit_change_new;
+
+ }
+
+ function wpsg_mod_scaleprice_change(ev)
+ {
+
+ if (!wpsg_in_array(ev.target.id, wpsg_product_edit_change) && jQuery(ev.target).val() != "")
+ {
+
+ wpsg_product_edit_change.push(ev.target.id);
+
+ }
+ else if (jQuery(ev.target).val() == "" && wpsg_in_array(ev.target.id, wpsg_product_edit_change))
+ {
+
+ for (var i = 0; i < wpsg_product_edit_change.length; i++)
+ {
+
+ if (wpsg_product_edit_change[i] == ev.target.id)
+ {
+
+ wpsg_product_edit_change.splice(i, 1);
+ jQuery('#' + ev.target.id).removeClass('wpsg_change_error');
+
+ }
+
+ }
+
+ }
+
+ } // function wpsg_mod_scaleprice_change(ev)
+
+ function wpsg_mod_scaleprice_remove(scale_id)
+ {
+
+ if (!confirm('<?php echo __('Sind Sie sich sicher, dass sie diese Staffel entfernen möchten?', 'wpsg'); ?>')) return false;
+
+ jQuery.ajax( {
+ url: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Produkt&action=ajax&mod=wpsg_mod_scaleprice&edit_id=<?php echo $this->view['wpsg_mod_scaleprice']['product']['id']; ?>&noheader=1&cmd=remove',
+ data: {
+ scale_id: scale_id
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_mod_scaleprice_row_' + scale_id).remove();
+
+ }
+ } );
+
+ return false;
+
+ } // function wpsg_mod_scaleprice_remove(scale_id)
+
+/* ]]> */</script>
+
+<div class="panel panel-default">
+ <div class="panel-heading clearfix">
+ <h3 class="panel-title">
+ <span><?php echo __('Staffelpreise', 'wpsg'); ?></span>
+ </h3>
+ </div>
+ <div class="panel-body">
+
+ <?php if ($this->view['wpsg_mod_scaleprice']['product']['id'] <= 0) { ?>
+ <p><?php echo __('Staffelpreise können erst nach einmaligem Speichern des Produktes definiert werden.', 'wpsg'); ?>
+ <?php } else { ?>
+
+ <?php echo wpsg_drawForm_Checkbox('wpsg_mod_scaleprice_activ', __('Staffelpreise aktiv', 'wpsg'), $this->view['wpsg_mod_scaleprice']['product']['wpsg_mod_scaleprice_activ']); ?>
+
+ <div id="wpsg_mod_scaleprice_layer">
+
+ <?php if (wpsg_isSizedArray($this->view['wpsg_mod_scaleprice']['arTyp']) && sizeof($this->view['wpsg_mod_scaleprice']['arTyp']) > 0) { ?>
+ <?php echo wpsg_drawForm_Select('wpsg_mod_scaleprice_typ', __('Bezugsgröße', 'wpsg'), array(
+ wpsg_mod_scaleprice::TYP_QUANTITY => __('Menge', 'wpsg'),
+ wpsg_mod_scaleprice::TYP_WEIGHT => __('Gewicht', 'wpsg')
+ ), $this->view['wpsg_mod_scaleprice']['product']['wpsg_mod_scaleprice_typ']); ?>
+ <?php } else { ?>
+ <input type="hidden" name="wpsg_mod_scaleprice_typ" id="wpsg_mod_scaleprice_typ" value="0" />
+ <?php } ?>
+
+ <?php echo wpsg_drawForm_Select('wpsg_mod_scaleprice_calc', __('Berechnung', 'wpsg'), array(
+ wpsg_mod_scaleprice::CALC_REPLACE => __('Ersetzung', 'wpsg'),
+ wpsg_mod_scaleprice::CALC_ADD => __('Addition', 'wpsg')
+ ), $this->view['wpsg_mod_scaleprice']['product']['wpsg_mod_scaleprice_calc']); ?>
+
+ <div id="wpsg_mod_scaleprice_target"><?php echo $this->view['wpsg_mod_scaleprice']['list']; ?></div>
+
+ </div>
+
+ <?php } ?>
+ <br /><br />
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_scaleprice"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Konfiguration der Staffelpreise', 'wpsg'); ?></a>
+ </div>
+</div> \ No newline at end of file
diff --git a/views/mods/mod_stock/produkt_edit_sidebar.phtml b/views/mods/mod_stock/produkt_edit_sidebar.phtml
index 1fcce65..7056f0b 100644
--- a/views/mods/mod_stock/produkt_edit_sidebar.phtml
+++ b/views/mods/mod_stock/produkt_edit_sidebar.phtml
@@ -11,6 +11,6 @@
<?php /* Mailbenachrichtigung beim Erreichen des Minimalbestandes des Produktes */ ?>
<?php if ($this->get_option('wpsg_mod_stock_minstockproduct') == '1') { ?>
-<?php echo wpsg_drawForum_Input('wpsg_mod_minstockproduct', __('Mindestlagerbestand', 'wpsg'), wpsg_getStr($this->view['data']['minstockproduct_count'])); ?>
-<?php echo wpsg_drawForum_Input('wpsg_mod_stock_minstockproduct_mail', __('Benachrichtigung an', 'wpsg'), wpsg_getStr($this->view['data']['minstockproduct_mail'])); ?>
+<?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 }?>
diff --git a/views/mods/mod_topseller/produkt_addedit_allgemein.phtml b/views/mods/mod_topseller/produkt_addedit_allgemein.phtml
index a2fec75..c4968bd 100644
--- a/views/mods/mod_topseller/produkt_addedit_allgemein.phtml
+++ b/views/mods/mod_topseller/produkt_addedit_allgemein.phtml
@@ -8,7 +8,7 @@
<div id="wpsg_fuellmenge" class="panel panel-default">
<div class="panel-heading clearfix">
<h3 class="panel-title">
- <?php echo __('Topseller', 'wpsg'); ?> </span>
+ <span><?php echo __('Topseller', 'wpsg'); ?></span>
</h3>
</div>
<div class="panel-body">
diff --git a/views/produkt/addedit_price.phtml b/views/produkt/addedit_price.phtml
index fa03f32..6ca0f85 100644
--- a/views/produkt/addedit_price.phtml
+++ b/views/produkt/addedit_price.phtml
@@ -1,3 +1,11 @@
+<?php
+
+ /**
+ * Template für die Integration der Preiseinstellungen in die Produktverwaltung
+ */
+
+?>
+
<?php echo wpsg_drawForm_AdminboxStart(__('Preis / Steuer', 'wpsg')); ?>
<?php echo wpsg_drawForm_Select('mwst_key', __('Steuergruppe', 'wpsg'), wpsg_tax_groups(true), @$this->view['data']['mwst_key']); ?>
<?php echo wpsg_drawForm_Input('preis', wpsg_translate(__('Preis (#1#)', 'wpsg'), (($this->getBackendTaxview() === WPSG_NETTO)?'NETTO':'BRUTTO')), wpsg_ff($this->view['data']['preis'])); ?>
@@ -6,4 +14,3 @@
<?php echo wpsg_drawForm_Checkbox('euleistungsortregel', __('Produkt unterliegt den EU-Leistungsortregeln', 'wpsg'), @$this->view['data']['euleistungsortregel'], array('fullrow' => true, 'help' => 'EU-Leistungsortregel')); ?>
<a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&subaction=laender"><span class="glyphicon glyphicon-globe wpsg-glyphicon"></span><?php echo __('Länderverwaltung', 'wpsg'); ?></a>
<?php echo wpsg_drawForm_AdminboxEnd(); ?>
- \ No newline at end of file
diff --git a/views/produkt/addedit_stock.phtml b/views/produkt/addedit_stock.phtml
new file mode 100644
index 0000000..f5a1d95
--- /dev/null
+++ b/views/produkt/addedit_stock.phtml
@@ -0,0 +1,25 @@
+<?php
+
+ /**
+ * Template für den Reiter "Bestandsdaten" der Produktverwaltung
+ */
+
+?>
+<?php /* Lagerbestand */ ?>
+<?php if ($this->hasMod('wpsg_mod_stock') == '1') { ?>
+ <?php echo wpsg_drawForm_AdminboxStart(__('Lagerbestand', 'wpsg')); ?>
+ <?php $this->callMod('wpsg_mod_stock', 'produkt_edit_allgemein', array(&$this->view['data']));?>
+ <br />
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_stock"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Konfiguration des Lagerbestandmoduls', 'wpsg'); ?></a>
+ <?php echo wpsg_drawForm_AdminboxEnd(); ?>
+<?php } ?>
+
+<?php /* Gewicht */ ?>
+<?php if ($this->hasMod('wpsg_mod_weight') == '1') { ?>
+ <?php echo wpsg_drawForm_AdminboxStart(__('Produktgewicht', 'wpsg')); ?>
+ <?php $this->callMod('wpsg_mod_weight', 'produkt_edit_allgemein', array(&$this->view['data']));?>
+ <br />
+ <a href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Admin&action=module&modul=wpsg_mod_weight"><span class="wpsg-glyphicon glyphicon glyphicon-wrench"></span><?php echo __('Zur Konfiguration des Produktgewichtmoduls', 'wpsg'); ?></a>
+ <?php echo wpsg_drawForm_AdminboxEnd(); ?>
+<?php } ?>
+