<?php

	/*
	 * Template für das Produkt im Frontend
	 */

	//Ausgabe der verfügbaren Variablen
	//wpsg_debug($_SESSION);
	//wpsg_debug($this->view['data']['stock']);

	// Damit keine Zubehörprodukte ausgegeben werden
	//$this->noReleatedProducts = true; 

?>
<div class="wpsg_produkt_wrapper">
	<div itemscope itemtype="http://schema.org/Product" class="wpsg_produkt wpsg_produkt_<?php echo $this->view['data']['id']; ?>">
				
		<div class="wpsg_product_afterimage">
	
			<h2 itemprop="name" class="wpsg_producttitle"><?php echo wpsg_hspc($this->view['data']['name']); ?></h2>
	
			<?php /* Block für die Produktbilder START */ ?>
			<?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>	
			<div class="wpsg_produkt_produktbilder">
				<?php if (sizeof($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])))) { ?>
				<?php $i = 0; foreach ($this->callMod('wpsg_mod_produktbilder', 'getProduktBilder', array($this->view['data']['id'])) as $b) { $i ++; ?>
				<?php if ($i == 1) { ?>
				<div class="wpsg_produkt_preview wpsg_pb_pic">		
					<?php echo $this->callMod('wpsg_mod_produktbilder', 'genBild', array($this->view['data']['id'], $i, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'), 'pimage')); ?>
					<?php /*<img itemprop="image" id="wpsg_mainimage_<?php echo $this->getTemplateIndex(); ?>" src="<?php echo $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($this->view['data']['id'], $b, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'))); ?>" alt="" />*/?>				
				</div>
				<?php } else { ?>
				<div class="wpsg_pb_pic" style="display:none;">
					<?php echo $this->callMod('wpsg_mod_produktbilder', 'genBild', array($this->view['data']['id'], $i, $this->get_option('wpsg_mod_produktbilder_width'), $this->get_option('wpsg_mod_produktbilder_height'), $this->get_option('wpsg_mod_produktbilder_mode'), 'pimage')); ?>
				</div>
				<?php } ?>
				<?php } ?>
				<?php } ?>
				<div class="wpsg_clear"></div>
			</div>
			<?php } ?>
			<?php /* Block für die Produktbilder ENDE */ ?>
			
			<?php if ($this->get_option('wpsg_showArticelnumber') == '1') { ?>
			<div class="wpsg_artikelnummer"> 
				<?php echo __('Artikelnummer', 'wpsg'); ?>: <span class="wpsg_anr"><?php echo wpsg_hspc($this->view['data']['anr']); ?></span>
			</div>
			<?php } ?>
		
			<div itemprop="offers" itemscope itemtype="http://schema.org/Offer" class="wpsg_produkt_preis">
				<?php echo __('Stückpreis:', 'wpsg'); ?>
				<meta itemprop="priceCurrency" content="<?php echo $this->get_option('wpsg_currency'); ?>" />
				<span itemprop="price" class="preis_<?php echo $this->view['data']['id']; ?>" id="preis_<?php echo $this->view['data']['id']; ?>"><?php echo wpsg_ff($this->view['data']['preis']); ?></span> <?php echo $this->get_option('wpsg_currency'); ?><?php if (wpsg_isSizedString($this->view['data']['price_info'])) { echo '<div class="wpsg_priceinfo">'.wpsg_hspc($this->view['data']['price_info']).'</div>'; } ?>
			</div>		
			
			<?php if ($this->get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?>		
			
				<div class="wpsg_produkt_preishinweis">
					<?php echo wpsg_translate(__('#2# zzgl. #1#', 'wpsg'), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>', '<a href="#kkhint" title="'.wpsg_hspc($this->get_option('wpsg_kleinunternehmer_text')).'">Endpreis</a>'); ?>
				</div>
			
			<?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>	
	
				<div class="wpsg_produkt_preishinweis">		
					<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { /* Frontend = NETTO Preise */ ?>
					<?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($this->view['data']['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
					<?php } else { /* Frontend = BRUTTO Preise */ ?>
					<?php echo wpsg_translate(__('(inkl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($this->view['data']['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
					<?php } ?>
				</div>
				
			<?php } ?>
			
			<?php /* Füllmengenanzeige START */ ?>
			<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
			
				<div class="wpsg_produkt_fuellmenge">
				<?php echo wpsg_translate(__('Füllmenge: #1# (#2# / #3#)', 'wpsg'), 
					'<span id="fmenge_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['fmenge'], '', true).'</span> '.$this->view['data']['feinheit'],
					'<span id="fmenge_gpreis_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['fmenge_preis']).'</span> '. $this->get_option('wpsg_currency'),
					wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $this->view['data']['feinheit'])
				); ?>
				</div>
								
			<?php } ?>		
			<?php /* Füllmengenanzeige ENDE */ ?>
						
			<?php /* Lieferzeit Anzeige START */ ?>
			<?php if ($this->hasMod('wpsg_mod_deliverytime') && $this->get_option('wpsg_mod_deliverytime_show_product') == '1') { ?>
				
				<div class="wpsg_mod_deliverytime">
					<?php echo wpsg_translate(__('Lieferzeit: #1#', 'wpsg'), $this->callMod('wpsg_mod_deliverytime', 'getProductDeliveryTime', array($this->view['data']['id']))); ?>					
				</div>
				
			<?php } ?>
			<?php /* Lieferzeit Anzeige ENDE */ ?> 
			
			<?php /* Gewichtsanzeige START */ ?>
			<?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProduct') === '1') { ?>
			<div class="wpsg_mod_weight_produkt">
				<?php echo wpsg_translate(__('Gewicht: #1# #2#', 'wpsg'), '<span id="weight_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['weight']).'</span>', $this->get_option('wpsg_mod_weight_unit')); ?>
			</div>
			<?php } ?>
			<?php /* Gewichtsanzeige ENDE */ ?>
			
			<?php /* Varianten START */ ?>
			<div class="wpsg_produkt_varianten"><?php 
			 
				// Damit sind werden die zusätzlichen Varianten ins View geladen, die Ausgabe erfolgt aber direkt hier im Template
				$this->callMod('wpsg_mod_varianten', 'renderTemplate', array($this->view['data']['id']));

				$arVarianten = @unserialize($this->view['data']['mod_varianten']);
				
			?>
			<script type="text/javascript">/* <![CDATA[ */

				<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
				var wpsg_mod_fuellmenge_reference = <?php echo ((wpsg_isSizedInt($this->get_option('wpsg_mod_fuellmenge_bezug')))?$this->get_option('wpsg_mod_fuellmenge_bezug'):'0'); ?>;
				<?php } ?>
			
				<?php if (wpsg_isSizedArray($arVarianten)) { ?>
			
				var arVarianten<?php echo $this->view['data']['id']; ?> = jQuery.parseJSON('<?php echo json_encode($arVarianten); ?>');
				
				jQuery(document).ready(function() {
						
					jQuery('.wpsg_vp_field_<?php echo $this->view['data']['id']; ?> select').bind('change', function() {
						
						var var_id = jQuery(this).attr("name").replace(/wpsg_vp\[/, '').replace(/\]/, '');
									
						jQuery('.wpsg_produkt_<?php echo $this->view['data']['id']; ?> .wpsg_anr').text(arVarianten<?php echo $this->view['data']['id']; ?>[var_id]['vari'][jQuery(this).val()]['artnr']);
						
					} );
			
					jQuery('.wpsg_vp_field_<?php echo $this->view['data']['id']; ?> input[type="radio"]').bind('click', function() {
						
						var var_id = jQuery(this).attr("name").replace(/wpsg_vp\[/, '').replace(/\]/, '');
									
						jQuery('.wpsg_produkt_<?php echo $this->view['data']['id']; ?> .wpsg_anr').text(arVarianten<?php echo $this->view['data']['id']; ?>[var_id]['vari'][jQuery(this).val()]['artnr']);
						
					} );
			
					//jQuery('.wpsg_vp_field_<?php echo $this->view['data']['id']; ?> input[type="radio"]:checked').click();
					
				} ); 
				
				<?php } ?>
			
				wpsg_vp[<?php echo $this->view['data']['id']; ?>] = new Array();
				wpsg_vp_gp[<?php echo $this->view['data']['id']; ?>] = <?php echo $this->view['data']['preis']; ?>;	
				wpsg_vp_vari[<?php echo $this->view['data']['id']; ?>] = new Array();
				
				<?php if (isset($this->view['data']['preis_original'])) { /* Rabattierter Originalpreis */ ?>
				wpsg_vp_original[<?php echo $this->view['data']['id']; ?>] = new Array();
				wpsg_vp_gp_original[<?php echo $this->view['data']['id']; ?>] = <?php echo $this->view['data']['preis_original']; ?>;
				<?php } ?>
			
				<?php if ($this->hasMod('wpsg_mod_weight')) { ?>
				wpsg_wg[<?php echo $this->view['data']['id']; ?>] = new Array();
				wpsg_vp_gw[<?php echo $this->view['data']['id']; ?>] = <?php echo (($this->view['data']['weight'] != "")?$this->view['data']['weight']:'0'); ?>;
				<?php } ?>
			
				<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
				wpsg_fmenge[<?php echo $this->view['data']['id']; ?>] = new Array();
				wpsg_vp_fmenge[<?php echo $this->view['data']['id']; ?>] = <?php echo (($this->view['data']['fmenge'] != "")?wpsg_tf($this->view['data']['fmenge']):'0'); ?>;
				<?php } ?>
				 
			/* ]]> */</script>
			
			<?php $vAktiv = false; if (is_array($this->view['data']['vp_data']) && sizeof($this->view['data']['vp_data']) > 0) { ?>
				<?php foreach ($this->view['data']['vp_data'] as $k => $var) { if ($var['aktiv'] == "1") { $vAktiv = true; ?>
				
				<div class="wpsg_vp_field wpsg_vp_field_<?php echo $this->view['data']['id']; ?>">
					
					<script type="text/javascript">
			
						wpsg_vp_vari[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = "<?php echo $var['typ']; ?>";			
						wpsg_vp[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = new Array();
			
						<?php if (isset($this->view['data']['preis_original'])) { ?>
						wpsg_vp_original[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = new Array();
						<?php } ?>
						
						<?php if ($this->hasMod('wpsg_mod_weight')) { ?>
						wpsg_wg[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = new Array();
						<?php } ?>
			
						<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
						wpsg_fmenge[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = new Array();
						<?php } ?>
						
					</script>
					
					<?php if ($var['typ'] != 'radio') { ?>
					<label class="wpsg_vp_field_label" for="wpsg_vpfield_<?php echo $this->view['data']['id']; ?>_<?php echo $k; ?>">
						<?php echo $var['name']; ?>
					</label>
					<?php } else { ?>
					<!-- <span class="wpsg_vp_field"><?php echo $var['name']; ?>:</span>-->
					<?php } ?>
					
					<div class="wpsg_vp_field_typ_<?php echo $var['typ']; ?>">
					
						<?php if ($var['typ'] == "select") { ?>
						<label>
						
							<script type="text/javascript">
								<?php foreach ($var['vari'] as $kv => $vari) { if ($vari['aktiv'] == "1") { ?>
									wpsg_vp[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['preis'] != "")?$vari['preis']:'0'); ?>;
				
									<?php if (isset($vari['preis_original'])) { ?>							
									wpsg_vp_original[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['preis_original'] != "")?$vari['preis_original']:'0'); ?>;
									<?php } ?>
									
									<?php if ($this->hasMod('wpsg_mod_weight')) { ?>
									wpsg_wg[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['weight'] != "")?$vari['weight']:'0'); ?>;
									<?php } ?>
			
									<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
									wpsg_fmenge[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['fmenge'] != "")?wpsg_tf($vari['fmenge']):'0'); ?>;
									<?php } ?>					
								<?php } } ?>
							</script>
						
							<select onchange="wpsg_vp_switch(<?php echo $this->view['data']['id']; ?>); wpsg_showpic_switch(this);" name="wpsg_vp[<?php echo $k; ?>]" id="wpsg_vpfield_<?php echo $this->view['data']['id']?>_<?php echo $k; ?>">
								<?php foreach ($var['vari'] as $kv => $vari) { if ($vari['aktiv'] == "1" && (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0)) { ?>
								<option value="<?php echo $kv; ?>">						
									<?php echo $vari['name']; ?>
									<?php if ($this->callMod('wpsg_mod_varianten', 'showVariPrice', array($vari['preis']))) { ?>
									(<?php echo wpsg_ff($vari['preis'], $this->get_option('wpsg_currency')); ?>)
									<?php } ?>
								</option>
								<?php } } ?>
							</select> 
							<?php if ($this->get_option("wpsg_vp_showpic") == "1") { ?>
							<span class="wpsg_vp_field_image">
								<?php $first = true; foreach ($var['vari'] as $kv => $vari) { if ($vari['aktiv'] == "1" && isset($vari['showpic'])) { ?>
								<span class="wpsg_vp_image wpsg_vp_image_<?php echo $kv; ?>" style="display:<?php echo (($first)?'block':'none'); ?>;">
									<?php echo $this->callMod('wpsg_mod_produktbilder', 'genBild', array($this->view['data']['id'], $vari['showpic'], $this->get_option("wpsg_vp_showpic_width"), $this->get_option("wpsg_vp_showpic_height"), 's')); ?>
								</span>
								<?php $first = false; } } ?>
							</span>
							<?php } ?>		
						</label>
						<?php } ?>
						
						<?php if ($var['typ'] == "radio") { ?>
						<?php $j = 0; foreach ($var['vari'] as $kv => $vari) { if ($vari['aktiv'] == "1" && (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0)) { $j ++; ?>
						<script type="text/javascript">
			
							wpsg_vp[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['preis'] != "")?$vari['preis']:'0'); ?>;
			
							<?php if (isset($vari['preis_original'])) { ?>
							wpsg_vp_original[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['preis_original'] != "")?$vari['preis_original']:'0'); ?>;
							<?php } ?>
							
							<?php if ($this->hasMod('wpsg_mod_weight')) { ?>
							wpsg_wg[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['weight'] != "")?$vari['weight']:'0'); ?>;
							<?php } ?>
			
							<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
							wpsg_fmenge[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['fmenge'] != "")?wpsg_tf($vari['fmenge']):'0'); ?>;
							<?php } ?>
							
						</script>
						<?php } } ?>
						<?php $arVariGroup = array(); $j = 0; foreach ($var['vari'] as $kv => $vari) { if ($vari['aktiv'] == "1" && (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0)) { $j ++; ?>
						<?php 
							
							// Gruppieren
							$variCode = wpsg_trim(explode('|', $vari['name']));
							
							if (sizeof($variCode) == 2)
							{
								
								$arVariGroup[$variCode[0]][] = array('kv' => $kv, 'j' => $j, 'name' => $variCode[1], 'vari' => $vari);
								
							}
							else
							{
								
								$arVariGroup[0][] = array('kv' => $kv, 'j' => $j, 'name' => $variCode[0], 'vari' => $vari);
								
							}
							
						?>
						<?php } } ?>	
								
						<?php foreach ($arVariGroup as $vg_name => $vg) { ?>
						<div class="vari_group" style="clear:both;">
							<?php if (wpsg_isSizedString($vg_name)) { ?>		
							<div class="vari_groupname"><?php echo __($vg_name, 'wpsg'); ?></div>
							<?php } else { ?>
							<br />
							<?php } ?>
							<div class="vari_group_select">								
								<?php foreach ($vg as $group_vari) { $vari = $group_vari['vari']; ?>
								<label>
									<input id="wpsg_vpfield_<?php echo $this->view['data']['id']; ?>_<?php echo $k; ?>_<?php echo $group_vari['j']; ?>" <?php echo (($group_vari['j'] == 1)?'checked="checked"':''); ?> onclick="wpsg_vp_switch(<?php echo $this->view['data']['id']; ?>);" type="radio" name="wpsg_vp[<?php echo $k; ?>]" value="<?php echo $group_vari['kv']; ?>" />&nbsp;<?php echo $group_vari['name']; ?>
									<?php if ($this->callMod('wpsg_mod_varianten', 'showVariPrice', array($vari['preis']))) { ?>
									<span class="wpsg_vp_vari_preisinfo">(<?php echo wpsg_ff($vari['preis'], $this->get_option('wpsg_currency')); ?>)</span>
									<?php } ?>
									<?php if ($this->get_option("wpsg_vp_showpic") == "1" && $vari['showpic'] != false) { ?>
									<span class="wpsg_vp_field_image">
										<?php echo $this->callMod('wpsg_mod_produktbilder', 'genBild', array($this->view['data']['id'], $vari['showpic'], $this->get_option("wpsg_vp_showpic_width"), $this->get_option("wpsg_vp_showpic_height"), 's')); ?>
									</span>
									<?php } ?>		
								</label>
								<?php } ?>
							</div>
						</div>
						<?php } ?>
								
						<?php } ?>
						
						<?php if ($var['typ'] == "checkbox" && $var['aktiv'] == 1 && (!$this->hasMod('wpsg_mod_stock') || $var['stock'] > 0)) { ?>
						<script type="text/javascript">
						
							wpsg_vp[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = <?php echo (($var['preis'] != "")?$var['preis']:'0'); ?>;
			
							<?php if (isset($vari['preis_original'])) { ?>
							wpsg_vp_original[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>][<?php echo $kv; ?>] = <?php echo (($vari['preis_original'] != "")?$vari['preis_original']:'0'); ?>;
							<?php } ?>
							
							<?php if ($this->hasMod('wpsg_mod_weight')) { ?>
							wpsg_wg[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = <?php echo (($var['weight'] != "")?$var['weight']:'0'); ?>;
							<?php } ?>
			
							<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
							wpsg_fmenge[<?php echo $this->view['data']['id']; ?>][<?php echo $k; ?>] = <?php echo (($var['fmenge'] != "")?wpsg_tf($var['fmenge']):'0'); ?>;
							<?php } ?>
							
						</script>
						<label>
							<input onchange="wpsg_vp_switch(<?php echo $this->view['data']['id']; ?>);" type="hidden" value="0" name="wpsg_vp[<?php echo $k; ?>]" />
							<input onchange="wpsg_vp_switch(<?php echo $this->view['data']['id']; ?>);" type="checkbox" value="1" name="wpsg_vp[<?php echo $k; ?>]" />
							<?php if ($this->callMod('wpsg_mod_varianten', 'showVariPrice', array($var['preis']))) { ?>
							<span class="wpsg_vp_vari_preisinfo">(<?php echo wpsg_ff($var['preis'], $this->get_option('wpsg_currency')); ?>)</span>
							<?php } ?>
							<?php if ($this->get_option("wpsg_vp_showpic") == "1" && $var['showpic'] != false) { ?>
							<span class="wpsg_vp_field_image">
								<?php echo $this->callMod('wpsg_mod_produktbilder', 'genBild', array($this->view['data']['id'], $var['showpic'], $this->get_option("wpsg_vp_showpic_width"), $this->get_option("wpsg_vp_showpic_height"), 's')); ?>
							</span>
							<?php } ?>
						</label>
						<?php } ?>
												
					</div>
					 	
					<div style="clear:both;"></div>
				
				</div>
				
				<?php } } ?>
				
				<script type="text/javascript">
			
					jQuery(document).ready(function() {
			
						<?php if ($vAktiv) { ?>
						wpsg_vp_switch(<?php echo $this->view['data']['id']; ?>);
						<?php } ?>
						//jQuery('.wpsg_vp_field select').change();
			
					} );
				
				</script>
				
			<?php } ?>
			</div>
			<?php /* Varianten ENDE */ ?>
					
			<div class="wpsg_produkt_add_basket_wrapper">	
				
				<label class="wpsg_amount_label" for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?>:</label>
				
				<input type="text" value="1" name="wpsg[menge]" class="wpsg_menge" id="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>" />	
							
				<?php if ($this->get_option('wpsg_afterinsert') == '2') { ?>
				<script type="text/javascript">
	
					jQuery(document).ready(function() { 
						
						jQuery('.wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>').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]': '1'					
								},
								success: function(data) 
								{
									tb_show('<?php echo __('Ihr Warenkorb', 'wpsg'); ?>', '<?php echo $this->getURL(wpsg_ShopController::URL_BASKET_AJAX); ?>&height=500');
								}
							} );	
							
							return false;
							
						} );
	
					} );
				 
				</script>
				<?php } ?>
				
			</div>
					
			<input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
			
			<div class="wpsg_clear"></div>
					 	
			<?php /* Facebook und Co Integration aus dem Produktartikel Modul */ ?>
			<?php echo $this->callMod('wpsg_mod_produktartikel', 'socialIntegration', array($this->view['data']['id'])); ?>
			<?php /* Facebook und Co Integration ENDE */ ?>
			
		</div> 
		
	</div>
	
	<?php if (strlen(trim($this->view['data']['beschreibung'])) > 0) { ?>
	<div class="wpsg_produkt_additional_information">
	
		<div itemprop="description" class="wpsg_produkt_beschreibung">
			<?php echo $this->view['data']['beschreibung']; ?>
		</div>
				
	</div>
	<?php } ?>
	
	<?php $this->callMods('product_bottom', array(&$this->view['data']['id'], $this->getTemplateIndex())); ?>
	
</div> 