summaryrefslogtreecommitdiff
path: root/views/mods/mod_productview/productview.phtml
blob: 2175f487dfeadab4db564c5ba07290fe2a003441 (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
<?php

	/**
	 * Template für die Anzeige der Produkte
	 * Es sollte nur Inhalt unter dem Div der Klasse wpsg_productview geändert werden, da dieses mittels AJAX ausgetauscht wird 
	 */

?>
<div class="wpsg_productview" id="wpsg_productview_<?php echo $this->view['wpsg_mod_productview']['index']; ?>">
	
	<div class="wpsg_productview_head row">
	
		<h2 class="wpsg_productview_title col-lg-3"><?php echo wpsg_hspc($this->view['wpsg_mod_productview']['title']); ?></h2>
		
		<?php if (wpsg_isSizedArray($this->view['wpsg_mod_productview']['products'])) { ?>
		<div class="col-lg-3 wpsg_mod_productview-order">
			asd
		</div>
		
		<div class="col-lg-6 wpsg_mod_productview-info">
			<strong><?php echo wpsg_translate(__('Anzeige #1# - #2#', 'wpsg'), ($this->view['wpsg_mod_productview']['page'] - 1) * $this->view['wpsg_mod_productview']['per_page'] + 1, $this->view['wpsg_mod_productview']['page'] * $this->view['wpsg_mod_productview']['per_page']); ?></strong>
			<?php echo wpsg_translate(__('von #1# Ergebnissen', 'wpsg'), $this->view['wpsg_mod_productview']['count']); ?>
		</div>
		<?php } ?>
				
	</div>
	
	<div class="wpsg_productview_content row">
	
		<?php if (wpsg_isSizedArray($this->view['wpsg_mod_productview']['products'])) { ?>
		
			<?php $i = 0; foreach ($this->view['wpsg_mod_productview']['products'] as $oProduct) { $i ++; ?>
			<a title="<?php echo wpsg_translate(__('Zum Produkt "#1#"', 'wpsg'), $oProduct->getProductName()); ?>" href="<?php echo $oProduct->getProductURL(); ?>" class="wpsg_productview_product wpsg_productview_product_<?php echo $oProduct->id; ?> col-lg-3">
				
				<?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
				<?php $image_url = $this->callMod('wpsg_mod_produktbilder', 'getProductImage', array($oProduct->id, 520, 520, 'sz')); ?>
				<?php if (wpsg_isSizedString($image_url)) { ?>
				<div class="wpsg_mod_productview_image">
					<img src="<?php echo $image_url; ?>" alt="" />
				</div>
				<?php } } ?>
				
				<div class="wpsg_mod_productview_bottom">
				
					<div class="wpsg_mod_productview_name">				
						<h2><?php echo $oProduct->getProductName(); ?></h2>				
					</div>
					
					<div class="wpsg_mod_productview_price_wrap">
					
						<?php $oldPrice = $oProduct->getOldPrice(); ?>
						<?php if ($oldPrice !== false) { ?>
						<div class="wpsg_mod_productview_oldprice"><?php echo wpsg_ff($oldPrice, $this->get_option('wpsg_currency')); ?></div>
						<?php } ?>
						
						<?php if ($oProduct->getMinPrice() != $oProduct->getPrice()) { ?>
						<div class="<?php echo (($oldPrice !== false)?'wpsg_mod_productview_pricehiglight':''); ?> wpsg_mod_productview_price wpsg_mod_productview_minprice"><?php echo wpsg_translate(__('Ab #1#', 'wpsg'), wpsg_ff($oProduct->getMinPrice(), $this->get_option('wpsg_currency'))); ?></div>
						<?php } else { ?>
						<div class="<?php echo (($oldPrice !== false)?'wpsg_mod_productview_pricehiglight':''); ?> wpsg_mod_productview_price"><?php echo wpsg_ff($oProduct->getPrice(), $this->get_option('wpsg_currency')); ?></div>
						<?php } ?>
					
					</div>
					
				</div>
				
				<input type="hidden" name="atts" value="<?php echo @wpsg_hspc(serialize($this->view['wpsg_mod_productview']['atts'])); ?>" />
				
				<div class="wpsg_mod_productview_go"><span class="glyphicon glyphicon-eye-open"></span></div>
				
			</a>
			
			<?php if ($i % 4 === 0) { ?>
			<div class="clearfix visible-lg-block"></div>
			<?php } ?>
			
			<?php } ?>
			
		<?php } else { ?>
		<?php echo __('Keine Produkte in dieser Ansicht.', 'wpsg'); ?>
		<?php } ?>
		
		<div class="clearfix"></div>
		
		<?php if (wpsg_isSizedInt($this->view['wpsg_mod_productview']['pages']) && $this->view['wpsg_mod_productview']['pages'] > 1) { ?>
		<div class="wpsg_productview_pager">
			<div class="wpsg_productview_pager_wrap">
				<?php if ($this->view['wpsg_mod_productview']['page'] > 1) { ?>			
				<a href="#" title="<?php echo wpsg_translate(__('Eine Seite zurück und die vorherigen #1# Produkte anzeigen', 'wpsg'), $this->view['wpsg_mod_productview']['per_page']); ?>" onclick="return wpsg_switchProductview(<?php echo $this->view['wpsg_mod_productview']['index']; ?>, <?php echo $this->view['wpsg_mod_productview']['page'] - 1; ?>);"><span class="glyphicon glyphicon-arrow-left"></span></a>
				<?php } ?>
				<?php for ($i = 1; $i <= $this->view['wpsg_mod_productview']['pages']; $i ++) { ?>
					<?php if ($i == $this->view['wpsg_mod_productview']['page']) { ?>
					<span><?php echo $i; ?></span>
					<?php } else { ?>
					<a onclick="return wpsg_switchProductview(<?php echo $this->view['wpsg_mod_productview']['index']; ?>, <?php echo $i; ?>); " href="#"><?php echo $i; ?></a>
					<?php } ?>
				<?php } ?>
				<?php if ($this->view['wpsg_mod_productview']['page'] < $this->view['wpsg_mod_productview']['pages']) { ?>			
				<a href="#" title="<?php echo wpsg_translate(__('Eine Seite vor und die nächsten #1# Produkte anzeigen', 'wpsg'), $this->view['wpsg_mod_productview']['per_page']); ?>" onclick="return wpsg_switchProductview(<?php echo $this->view['wpsg_mod_productview']['index']; ?>, <?php echo $this->view['wpsg_mod_productview']['page'] + 1; ?>); "><span class="glyphicon glyphicon-arrow-right"></span></a>
				<?php } ?>
			</div>
		</div>
		<?php } ?>
	
	</div>

</div>