summaryrefslogtreecommitdiff
path: root/views/mods/mod_varianten/varianten.js
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2016-12-15 07:50:13 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2016-12-15 07:50:13 +0000
commited6898ed74b8fb954ff12cabbbec7611d3a33ae6 (patch)
tree8555d82b3a4df319e353bd10ad0a2d5edc299583 /views/mods/mod_varianten/varianten.js
parent95e6564917cddd2188fa945dc7102bd470818fbc (diff)
- Altes Variantenmodul nach system/intern verschoben
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5987 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_varianten/varianten.js')
-rw-r--r--views/mods/mod_varianten/varianten.js58
1 files changed, 0 insertions, 58 deletions
diff --git a/views/mods/mod_varianten/varianten.js b/views/mods/mod_varianten/varianten.js
deleted file mode 100644
index f87c626..0000000
--- a/views/mods/mod_varianten/varianten.js
+++ /dev/null
@@ -1,58 +0,0 @@
-
- var wpsg_vp_vari = new Array();
-
- function wpsg_vp_switch(product_id, product_index)
- {
-
- var var_key = 'vp_' + product_id + "/";
-
- for (var i = 0; i < wpsg_vp_vari[product_id].length; i ++)
- {
-
- var_key += i + "_";
-
- if (wpsg_vp_vari[product_id][i] == "select")
- {
- var_key += jQuery('#wpsg_produktform_' + product_index + ' .wpsg_produkt_' + product_id + " #wpsg_vpfield_" + product_id + "_" + i).val();
- }
- else if (wpsg_vp_vari[product_id][i] == "radio")
- {
- var_key += jQuery('#wpsg_produktform_' + product_index + ' .wpsg_produkt_' + product_id + ' input[name="wpsg_vp[' + i + ']"]:checked').val();
- }
- else if (wpsg_vp_vari[product_id][i] == "checkbox")
- {
- var_key += jQuery('#wpsg_produktform_' + product_index + ' .wpsg_produkt_' + product_id + ' input[name="wpsg_vp[' + i + ']"]:checked').length;
- }
- else if (wpsg_vp_vari[product_id][i] == "image")
- {
- var_key += jQuery('#wpsg_produktform_' + product_index + ' .wpsg_produkt_' + product_id + ' .wpsg_mod_varianten_imageselect_' + i + ' .akt').attr("data-wpsg-id");
- }
-
- if (i < (wpsg_vp_vari[product_id].length - 1)) var_key += ":";
-
- }
-
- jQuery('#wpsg_produktform_' + product_index).append('<div class="wpsg_product_layer"><img src="' + wpsg_ajax.img_ajaxloading + '" alt="' + wpsg_ajax.label_pleasewait + '" /></div>');
-
- jQuery.ajax( {
- 'url': wpsg_ajax.ajaxurl,
- 'method': 'get',
- 'data': {
- 'action': 'wpsg_varianten_switch',
- 'wpsg_post_id': jQuery('#wpsg_produktform_' + product_index + ' input[name="wpsg_post_id"]').val(),
- 'quantity': jQuery('#wpsg_menge_' + product_index).val(),
- 'template': jQuery('#wpsg_produktform_' + product_index + ' input[name="wpsg[template]"]').val(),
- 'referer': jQuery('#wpsg_produktform_' + product_index + ' input[name="myReferer"]').val(),
- 'form_data': jQuery('#wpsg_produktform_' + product_index).serialize(),
- 'product_key': var_key,
- 'product_index': product_index
- },
- 'success': function(data) {
-
- jQuery('#wpsg_produktform_' + product_index).replaceWith(data);
-
- }
- } );
-
- } // function wpsg_vp_switch(produkt_id)
- \ No newline at end of file