diff options
| author | Daniel Schmitzer <noreply@maennchen1.de> | 2018-09-28 07:05:48 +0000 |
|---|---|---|
| committer | Daniel Schmitzer <noreply@maennchen1.de> | 2018-09-28 07:05:48 +0000 |
| commit | b6dd44ae23fe378b9d857ab38a9f1318d0d6274f (patch) | |
| tree | 112bd1d5ed740f01bf9341d5c0ed7db995eb4049 /views/order/backendEdit/addProduct.phtml | |
| parent | 1b94e9e9c54019ee68f12accaac82a6971b555a6 (diff) | |
- Produktbearbeitung Backend
- Neue Calculation für das Backend
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@7173 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/order/backendEdit/addProduct.phtml')
| -rw-r--r-- | views/order/backendEdit/addProduct.phtml | 79 |
1 files changed, 79 insertions, 0 deletions
diff --git a/views/order/backendEdit/addProduct.phtml b/views/order/backendEdit/addProduct.phtml new file mode 100644 index 0000000..afd946b --- /dev/null +++ b/views/order/backendEdit/addProduct.phtml @@ -0,0 +1,79 @@ +<?php
+
+ /**
+ * Template für das hinzufügen von Produkten zur Bestellung
+ */
+
+?>
+
+<style>
+
+ #product_search { width:100%; }
+
+</style>
+
+<form id="wpsg_product_add_form">
+
+ <div class="autocomplete_wrap">
+ <input type="text" id="product_search" name="product_serch" value="" placeholder="<?php echo __('Produktsuche', 'wpsg'); ?>" />
+ </div>
+
+ <hr />
+
+ <div id="wpsg_product_add_target">
+
+ </div>
+
+</form>
+
+<script>
+
+ function wpsg_loadProduct(product_id, order_product_id) {
+
+ jQuery('#wpsg_product_add_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-Order&action=view&subaction=addProduct&do=product&noheader=1&edit_id=<?php $_REQUEST['edit_id']; ?>',
+ data: {
+ product_id: product_id,
+ order_product_id: order_product_id
+ },
+ success: function(data) {
+
+ jQuery('#wpsg_product_add_target').html(data);
+
+ }
+ } );
+
+ } // function wpsg_loadProduct(product_id, order_product_id)
+
+ jQuery(document).ready(function() {
+
+ jQuery('#wpsg_product_add_form').on('submit', function() { return false; } );
+
+ jQuery('#product_search').autocomplete( {
+ source: '<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Order&action=view&subaction=addProduct&do=search&noheader=1&edit_id=<?php echo $_REQUEST['edit_id']; ?>',
+ minLength: 2,
+ appendTo: ".autocomplete_wrap",
+ select: function(event, ui) {
+
+ wpsg_loadProduct(ui.item.id, <?php echo ((wpsg_isSizedInt($_REQUEST['order_product_id']))?$_REQUEST['order_product_id']:0); ?>);
+
+ return false;
+
+ }
+ } );
+
+ <?php if (wpsg_isSizedInt($_REQUEST['order_product_id'])) { ?>
+
+ wpsg_loadProduct(0, <?php echo $_REQUEST['order_product_id']; ?>);
+
+ <?php } else { ?>
+
+ jQuery('#product_search').focus();
+
+ <?php } ?>
+
+ } );
+
+</script>
\ No newline at end of file |
