summaryrefslogtreecommitdiff
path: root/views/warenkorb/ajaxDialog.phtml
blob: d029fafc108269df307ca287da263c53812309e8 (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<?php
	
	/**
	 * Template für den Dialog wenn im Backend "Lightbox Meldung" eingestellt ist
	 */
	 
	// $this->view['error'] // Steht auf true wenn ein Fehler produziert und angezeigt werden soll
	// $this->view['product_key'] // Der ProduktSchlüssel des hinzugefügten Produktes
	// $this->view['amount_add'] // So oft wurde das Produkt hinzugefügt
	// $this->view['amount_basket'] // So oft befindet sich das hinzugefügte Produkt im Warenkorb
	// $this->view['product_data'] // Array mit Produktdaten
	// $this->view['product_index'] // Index des Produktes im Warenkorb	 	

?><div id="wpsg_basket_ajax_message">
 	
 	<div class="wpsg_basket_ajax_message_content">
 	 
 		<?php if ($this->view['error'] === true) { ?>

			<h3><?php echo __('Es sind folgende Fehler aufgetreten:', 'wpsg'); ?></h3>

			<?php echo $this->writeFrontendMessage(); ?>
 		 		 
 			<div class="wpsg_button_wrap">
	 			<button class="wpsg_button wpsg_button_continue_shopping" onclick="return wpsg_basket_ajax_message_close();"><?php echo __('Weiter Einkaufen', 'wpsg'); ?></button>	 		
	 		</div>
	 	
	 		<div class="wpsg_clear"></div>
 		
 		<?php } else { ?>
 	
	 		<div class="wpsg_basket_ajax_message_content_left">
	 		<?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?> 
	 			<?php $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->getProduktId($this->view['product_data']['id']))); ?>
	  			<?php if (wpsg_isSizedArray($arBilder)) { ?> 
					<?php $href = wp_get_attachment_image_src($arBilder[0]['post_id'], Array(30, 30)); ?>
					<?php $imgtag = wp_get_attachment_image($arBilder[0]['post_id'], Array(30, 30)); ?>
	  				<img src="<?php echo $href[0]; ?>" width="30" height="30" alt="" />
	  			<?php } ?>
	 		<?php } ?>
	 		</div>
	 		
	 		<div class="wpsg_basket_ajax_message_content_right">
	 		<?php if ($this->view['error'] === true) { echo $this->writeFrontendMessage(); } else { ?>
	 		 
	 		 	<span class="wpsg_basket_ajax_message_content_success">
	 			<?php echo wpsg_translate(
	 				__('Es wurde #1#x "#2#" in den Warenkorb gelegt.', 'wpsg'),
	 				$this->view['amount_add'],
	 				$this->getProductName($this->view['product_data']['id'], true)); ?>
	 			</span>
	 			<?php } ?>
				<div class="wpsg_clear"></div>
	 			
	 			<?php /* Preisanzeige Start */ ?>
	 			<div class=wpsg_ajaxdialog_form>
	 				<?php echo __('Der Preis für das Produkt beträgt:','wpsg')?>
	 				<?php echo wpsg_ff($this->view['product_data']['preis'], $this->get_option('wpsg_currency')); ?>
	 			</div>
	 			<div class="wpsg_clear"></div>
	 			<?php /* Preisanzeige ENDE */ ?>
	
	 			<?php /* Füllmengenanzeige START */ ?>
				<?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showAjaxDialog') === '1') { ?>
					<div class="wpsg_ajaxdialog_form">
					<?php echo wpsg_translate(__('Füllmenge: #1# #2#', 'wpsg'),'<span class="wpsg_fmenge">'.wpsg_ff($this->view['product_data']['fmenge']).'</span>', $this->view['product_data']['feinheit']); ?> 
					</div>	
				<?php } ?>	
				<div class="wpsg_clear"></div>	
				<?php /* Füllmengenanzeige ENDE */ ?>
	 			
	 			<?php /* Gewichtsanzeige Start */ ?>
	 			<?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showAjaxDialog') === '1') { ?>
					<div class="wpsg_ajaxdialog_form">
						<?php echo wpsg_translate(__('Gewicht: #1# #2#', 'wpsg'), '<span class="wpsg_weight"">'.wpsg_ff($this->view['product_data']['weight']).'</span>', $this->view['product_data']['weight_unit']); ?>
					</div>
				<?php } ?>
				<div class="wpsg_clear"></div>
				<?php /* Gewichtsanzeige ENDE */ ?>
				
			</div>
			
			<div class="wpsg_clear"></div>
	 		
	 		<?php /* Zubehörprodukte START */?>
	 		<?php if ($this->hasMod('wpsg_mod_relatedproducts') && $this->get_option('wpsg_mod_relatedproducts_showAjaxDialog') === '1') { ?>
	 			<?php $arRelatedProducts = $this->callMod('wpsg_mod_relatedproducts', 'getRelatedProducts', array($this->getProduktID($this->view['product_key']))); ?>
	 			<?php if (wpsg_isSizedArray($arRelatedProducts)) { ?> 			 
	 				<div class="wpsg_ajaxdialog_relatedproducts">
	 				 	<h3><?php echo __('Das könnte Ihnen auch gefallen:', 'wpsg'); ?></h3>
	 	
	 					<div class="wpsg_clear"></div>
	 					
	 					<?php foreach ($arRelatedProducts as $rp_data) { $product_data = $this->loadProduktArray($rp_data['product_id']); ?>
	 					
	 					<div class="wpsg_ajaxdialog_productrow">
	 						<h4><?php echo $this->getProductName($rp_data['product_id']); ?></h4>
	 						<a href="<?php echo $this->getProduktLink($rp_data['product_id']); ?>">
					 		<?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?> 
					 			<?php $arBilder = $this->callMod('wpsg_mod_produktbilder', 'getProduktBilder_MT', array($this->getProduktId($this->view['product_data']['id']))); ?>
					  			<?php if (wpsg_isSizedArray($arBilder)) { ?> 
									<?php $href = wp_get_attachment_image_src($arBilder[0]['post_id'], Array(30, 30)); ?>
									<?php $imgtag = wp_get_attachment_image($arBilder[0]['post_id'], Array(30, 30)); ?>
					  				<img src="<?php echo $href[0]; ?>" width="30" height="30" alt="" />
					  			<?php } ?>
					 		<?php } ?>
	 						</a>
	 					</div>
	 					
						<?php } ?>
					</div>
	 			<?php }?>	
	 		<?php } ?>	
	 		
	 		<div class="wpsg_clear"></div>
	 		<?php /* Zubehörprodukte ENDE*/?>
	 		
	 		<div class="wpsg_button_wrap">
	 			<button class="wpsg_button wpsg_button_continue_shopping" onclick="return wpsg_basket_ajax_message_close();"><?php echo __('Weiter Einkaufen', 'wpsg'); ?></button>
	 			<a href="<?php echo $this->getUrl(wpsg_ShopController::URL_BASKET); ?>"><button class="wpsg_button wpsg_button_basket"><?php echo __('Zum Warenkorb', 'wpsg'); ?></button></a>
	 			<div class="wpsg_clear"></div>
	 		</div>
	 			 		
	 	<?php } ?>
	 	
	 	<?php $this->clearFrontendMessage(); ?>
 		
 	</div>

</div><div id="wpsg_basket_ajax_layer"></div>

<script type="text/javascript">/* <![CDATA[ */

	function wpsg_basket_ajax_message_close()
	{

		jQuery('#wpsg_basket_ajax_message').remove();
		jQuery('#wpsg_basket_ajax_layer').remove();

		return false;
		
	}
                                    
	jQuery(document).ready(function() { 

		jQuery('#wpsg_basket_ajax_layer').bind('click', function() {

			wpsg_basket_ajax_message_close();
			
		} );
		 
	} );
    
/* ]]> */</script>