summaryrefslogtreecommitdiff
path: root/views/mods/mod_request/product_bottom.phtml
blob: 4f0f33886b3a76b92a66436ac808955ff715f3fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php

	/**
	 * Integration des Anfragemoduls in die Produkttemplates
	 * Hier wird nicht der Button eingebunden sondern lediglich der JS Teil für die Anzeige im Fenster
	 * @version 4.6.1
	 */

?>
<?php if ($this->get_option('wpsg_mod_request_afterinsert') == wpsg_mod_request::ACTION_SHOWREQUESTPAGELB) { ?>
<script type="text/javascript">/* <![CDATA[ */

	jQuery(document).ready(function() { 
	
		jQuery('#wpsg_add_requestlist_<?php echo $this->view['wpsg_mod_request']['template_index']; ?>').bind('click', function() {

			jQuery.ajax( {
				url: '<?php echo $this->getURL(wpsg_ShopController::URL_BASKET); ?>',
				data:
				{
					wpsg_form_data: jQuery('#wpsg_produktform_<?php echo $this->getTemplateIndex(); ?>').serialize(),
					'wpsg[ajax]': '1',
					'wpsg[submit_request]': '1'					
				},
				success: function(data) 
				{
					
					if (jQuery('#wpsg_requestdiv').length <= 0) jQuery('body').append('<div id="wpsg_requestdiv" style="display:none;"></div>');							

					jQuery('#wpsg_requestdiv').html(data);
							
					tb_show('<?php echo __('Ihre Anfrageliste', 'wpsg'); ?>', '#TB_inline?inlineId=wpsg_requestdiv&height=500');
					
				}
			} );	
						
			return false;
			
		} );

	} );

/* ]]> */</script>
<?php } ?>