From 24cc55213fa39bd2c2e3215943f22bef731e58fb Mon Sep 17 00:00:00 2001 From: Daniel Schmitzer Date: Wed, 21 Sep 2016 10:55:51 +0000 Subject: - Select im Editable zeigt gesetzten Wert - Varianten im Frontend angezeigt und schalten Produkt um - Warnungen raus git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5767 0d5edaf7-2b12-4e95-93f4-047927463d4b --- views/mods/mod_productvariants/frontend.js | 25 ++++++++++++++ .../mods/mod_productvariants/productTemplate.phtml | 38 ++++++++++++++++++++-- 2 files changed, 60 insertions(+), 3 deletions(-) (limited to 'views/mods') diff --git a/views/mods/mod_productvariants/frontend.js b/views/mods/mod_productvariants/frontend.js index e69de29..a6d62fa 100644 --- a/views/mods/mod_productvariants/frontend.js +++ b/views/mods/mod_productvariants/frontend.js @@ -0,0 +1,25 @@ + + function wpsg_mod_productvariants_reload(event) + { + + var product_index = jQuery(event.target).parents('.wpsg_mod_productvariants_product_wrap').attr('wpsg-productindex'); + + //jQuery('#wpsg_produktform_' + product_index).append('
' + wpsg_ajax.label_pleasewait + '
'); + + jQuery.ajax( { + 'url': wpsg_ajax.ajaxurl, + 'method': 'get', + 'data': { + 'action': 'wpsg_productvariants_switch', + 'wpsg_post_id': jQuery('#wpsg_produktform_' + product_index + ' input[name="wpsg_post_id"]').val(), + 'form_data': jQuery('#wpsg_produktform_' + product_index).serialize(), + 'product_index': product_index + }, + 'success': function(data) { + + jQuery('#wpsg_produktform_' + product_index).replaceWith(data); + + } + } ); + + } // function wpsg_mod_productvariants_reload(event) \ No newline at end of file diff --git a/views/mods/mod_productvariants/productTemplate.phtml b/views/mods/mod_productvariants/productTemplate.phtml index 35f873a..0f472f5 100644 --- a/views/mods/mod_productvariants/productTemplate.phtml +++ b/views/mods/mod_productvariants/productTemplate.phtml @@ -3,17 +3,49 @@ /** * Integration der Variantenauswahl in die Produktverwaltung */ - + ?> -
+
view['wpsg_mod_productvariants']['arVariants'] as $var) { ?> -
+
"> + + + + + + + + + + + + + +
+ + +
-- cgit v1.2.3