Subversion Repositories wpShopGermany4

Rev

Rev 6995 | Rev 7261 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1902 daniel 1
<?php
2
 
3
	/**
4
	 * Template für die Produktübersichtsseite (Gitteransicht)
6341 hartmut 5
	 */
1902 daniel 6
 
3348 daniel 7
	/* Modus für das Vorschaubild */
1902 daniel 8
	$bPicMode = 'c';
9
 
10
	/* Höhe und Breite für das Vorschaubild (CSS Layout muss entsprechend angepasst werden) */
11
	$nPicWidth = 140;
12
	$nPicHeight = 140;
6341 hartmut 13
 
1902 daniel 14
	/* Wenn es auf false gesetzt wird, wird das erste Bild als Vorschaubild verwendet */
15
	$nPicRand = true;
6341 hartmut 16
 
1902 daniel 17
	$col = 4;
6341 hartmut 18
 
1902 daniel 19
?>
20
 
2703 daniel 21
<?php
22
 
23
	remove_filter('the_content', array($GLOBALS['wpsg_sc'], 'content_filter'));
24
	the_content();
6341 hartmut 25
	add_filter('the_content', array($GLOBALS['wpsg_sc'], 'content_filter'));
26
 
2703 daniel 27
?>
28
 
1906 daniel 29
<div class="wpsg_mod_productindex wpsg_mod_productindex_grid">
6341 hartmut 30
 
3340 daniel 31
	<form method="get" id="wpsg_mod_productindex_form" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
6341 hartmut 32
 
3540 daniel 33
 		<?php parse_str($_SERVER['QUERY_STRING'], $arGET); if (wpsg_isSizedArray($arGET)) { foreach ($arGET as $key => $value) { if (!wpsg_isSizedArray($value)) { ?>
6812 daniel 34
 		<input type="hidden" name="<?php echo $key; ?>" value="<?php echo htmlspecialchars($value); ?>" />
3540 daniel 35
 		<?php } } } ?>
6341 hartmut 36
 
1902 daniel 37
		<input type="hidden" id="wpsg_mod_productindex_filter_page" name="wpsg_mod_productindex[filter][page]" value="<?php echo $this->view['wpsg_mod_productindex']['filter']['page']; ?>" />
6341 hartmut 38
		<input type="hidden" id="wpsg_mod_productindex_filter_order" name="wpsg_mod_productindex[filter][order]" value="<?php echo $this->view['wpsg_mod_productindex']['filter']['order']; ?>" />
1903 daniel 39
		<input type="hidden" id="wpsg_mod_productindex_template" name="wpsg_mod_productindex[template]" value="<?php echo $this->view['wpsg_mod_productindex']['template']; ?>" />
6341 hartmut 40
 
1902 daniel 41
	</form>
6341 hartmut 42
 
1902 daniel 43
	<div class="wpsg_mod_productindex_toolbar wpsg_mod_productindex_toolbar_top">
6341 hartmut 44
 
1902 daniel 45
		<?php if ($this->view['hideOrder'] != '1') { ?>
6341 hartmut 46
		<div class="wpsg_mod_productindex_order">
1902 daniel 47
			<span><?php echo __('Sortierung:', 'wpsg'); ?></span>
48
			<select name="wpsg_mod_productindex[filter][order]" class="wpsg_mod_productindex_filter_order">
49
				<option value="price_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_asc')?'selected="selected"':''); ?>><?php echo __('Preis (Kleinster zuerst)', 'wpsg'); ?></option>
50
				<option value="price_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_desc')?'selected="selected"':''); ?>><?php echo __('Preis (Größter zuerst)', 'wpsg'); ?></option>
51
				<option value="name_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_asc')?'selected="selected"':''); ?>><?php echo __('Name Aufsteigend', 'wpsg'); ?></option>
52
				<option value="name_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_desc')?'selected="selected"':''); ?>><?php echo __('Name Absteigend', 'wpsg'); ?></option>
6342 hartmut 53
				<option value="pos_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'pos_asc')?'selected="selected"':''); ?>><?php echo __('Position Aufsteigend', 'wpsg'); ?></option>
54
				<option value="pos_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'pos_desc')?'selected="selected"':''); ?>><?php echo __('Position Absteigend', 'wpsg'); ?></option>				<option value="cdate_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_asc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Älteste zuerst)', 'wpsg'); ?></option>
4376 daniel 55
				<option value="cdate_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_asc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Älteste zuerst)', 'wpsg'); ?></option>
56
				<option value="cdate_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_desc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Neueste zuerst)', 'wpsg'); ?></option>
3648 daniel 57
				<option value="anr_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_asc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Aufsteigend', 'wpsg'); ?></option>
58
				<option value="anr_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_desc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Absteigend', 'wpsg'); ?></option>
1902 daniel 59
			</select>
60
		</div>
61
		<?php } ?>
6341 hartmut 62
 
1902 daniel 63
		<?php if ($this->view['wpsg_mod_productindex']['filter']['pages'] > 1) { ?>
64
		<div class="wpsg_mod_productindex_pager">
65
			<span><?php echo __('Seite:', 'wpsg'); ?></span>
66
			<ul>
67
				<?php for ($i = 1; $i <= $this->view['wpsg_mod_productindex']['filter']['pages']; $i ++) { ?>
68
				<li>
6341 hartmut 69
					<?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) { ?>
4891 daniel 70
					<span><?php echo $i; ?></span>
6341 hartmut 71
					<?php } else { ?>
1902 daniel 72
					<a title="<?php echo wpsg_translate(__('Zu Seite #1# wechseln', 'wpsg'), $i); ?>" href="#" onclick="return wpsg_mod_productindex_goPage(<?php echo $i; ?>);"><?php echo $i; ?></a>
73
					<?php } ?>
74
				</li>
75
				<?php } ?>
76
			</ul>
77
		</div>
78
		<?php } ?>
6341 hartmut 79
 
1903 daniel 80
		<?php if ($this->view['hideViewSelect'] != '1') { ?>
81
		<div class="wpsg_mod_productindex_viewselect">
82
			<a href="#" onclick="return wpsg_mod_productindex_viewselect('list.phtml');" title="<?php echo __('Zur Listansicht wechseln.', 'wpsg'); ?>">
83
				<img src="<?php echo $this->getRessourceURL('mods/mod_productindex/gfx/icon_list.png'); ?>" alt="<?php echo __('Zur Listansicht wechseln.', 'wpsg'); ?>" />
84
			</a>
85
		</div>
86
		<?php } ?>
6341 hartmut 87
 
1902 daniel 88
		<div class="wpsg_clear"></div>
6341 hartmut 89
 
1902 daniel 90
	</div>
91
 
92
	<?php if (wpsg_isSizedArray($this->view['arProducts'])) { ?>
6341 hartmut 93
 
1902 daniel 94
		<?php $i = 0; foreach ($this->view['arProducts'] as $p) { $i ++; ?>
6341 hartmut 95
 
2735 daniel 96
			<?php if (($i - 1) % $col == 0) { ?><div class="wpsg_mod_productindex_productrow"><?php } ?>
6341 hartmut 97
 
98
			<div class="wpsg_mod_productindex_product <?php echo (($i == sizeof($this->view['arProducts']))?'wpsg_mod_productindex_product_last':''); ?> <?php echo (($i == 1)?'wpsg_mod_productindex_product_first':''); ?>" style="width:<?php echo round((100 / $col), 2) ?>%;">
2735 daniel 99
				<div class="wpsg_mod_productindex_product_inner">
6451 thomas 100
 
7192 thomas 101
					<a title="<?php echo __('Zur Detailseite des Produktes', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>">
6840 thomas 102
						<?php $attachment_id = $this->imagehandler->getAttachmentID($p['product_key']); ?>
103
						<?php echo wp_get_attachment_image($attachment_id, array(800, 600)); ?>
104
					</a>
6451 thomas 105
 
106
 
2735 daniel 107
					<div class="wpsg_mod_productindex_content">
4091 daniel 108
						<div class="wpsg_mod_productindex_title">
4907 thomas 109
							<a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo $this->getProductName($this->getProduktID($p['id']), true); ?></a>
6341 hartmut 110
						</div>
111
						<div class="wpsg_mod_productindex_infos">
2735 daniel 112
							<div class="wpsg_mod_productindex_weight">
113
								<?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProductindex') == '1') { ?>
6995 thomas 114
									<?php if (($p['weight']) > '0') { ?>
115
										<?php if ($p['min_weight'] == $p['max_weight']) { ?>
116
											<?php echo wpsg_translate(__('Gewicht: #1#', 'wpsg'), wpsg_ff($p['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
117
										<?php } else { ?>
118
											<?php echo wpsg_translate(__('Gewicht: ab #1#', 'wpsg'), wpsg_ff($p['min_weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
119
										<?php } ?>
120
									<?php } ?>
2735 daniel 121
								<?php } ?>
122
							</div>
6341 hartmut 123
 
2735 daniel 124
							<div class="wpsg_mod_productindex_fmenge">
125
								<?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_fmenge') == '1') { ?>
6995 thomas 126
									<?php if (($p['fmenge']) > '0') { ?>
127
										<?php echo wpsg_translate(__('Füllmenge: #1#', 'wpsg'), wpsg_ff($p['fmenge'], $p['feinheit'])); ?>
128
										<br />
129
										<?php if ($this->get_option('wpsg_mod_fuellmenge_showProductindex_grundpreis') == '1') { ?>
130
											<?php echo wpsg_translate(__('Grundpreis: #1# / #2#', 'wpsg'),
131
												wpsg_ff($p['fmenge_preis'], $this->get_option('wpsg_currency')),
132
												wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $p['feinheit'])
133
											); ?>
134
										<?php } ?>
135
									<?php } ?>
2735 daniel 136
								<?php } ?>
6995 thomas 137
							</div>
6341 hartmut 138
						</div>
139
 
4910 thomas 140
						<?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showProductindex') == '1') { ?>
141
							<div class="wpsg_mod_produktindex_stock">
6341 hartmut 142
								<?php echo wpsg_translate(__('Lagerbestand: #1#','wpsg'), $p['stock']);  ?>
4910 thomas 143
							</div>
144
						<?php } ?>
6341 hartmut 145
 
5548 thomas 146
						<?php /*Abfrage Preisanzeige nur für eingeloggte Benutzer START*/?>
6341 hartmut 147
						<?php if (($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn') && ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '1')) || ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '0')) { ?>
5548 thomas 148
							<div class="wpsg_mod_productindex_price">
149
								<?php if ($p['min_preis'] == $p['max_preis']) { ?>
150
									<?php echo wpsg_ff($p['preis'], $this->get_option('wpsg_currency')); ?>
151
								<?php } else { ?>
152
									<?php echo wpsg_translate(__('ab #1#', 'wpsg'), wpsg_ff($p['min_preis'], $this->get_option('wpsg_currency'))); ?>
153
								<?php } ?>
154
							</div>
6341 hartmut 155
							<?php if ($this->get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?>
5548 thomas 156
							<div class="wpsg_produkt_preishinweis">
157
								<?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>'); ?>
158
							</div>
6341 hartmut 159
							<?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>
160
							<div class="wpsg_produkt_preishinweis">
5548 thomas 161
								<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { /* Frontend = NETTO Preise */ ?>
162
								<?php echo wpsg_translate(__('(zzgl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($p['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
163
								<?php } else { /* Frontend = BRUTTO Preise */ ?>
164
								<?php echo wpsg_translate(__('(inkl. #1#% MwSt. und zzgl. #2#)', 'wpsg'), wpsg_ff($p['mwst_value']), '<a href="'.$this->getURL(wpsg_ShopController::URL_VERSANDKOSTEN).'">'.__('Versandkosten', 'wpsg').'</a>'); ?>
165
								<?php } ?>
6341 hartmut 166
							</div>
1902 daniel 167
							<?php } ?>
5548 thomas 168
						<?php }else{?>
169
								<?php echo wpsg_translate(__('Preise nur für eingeloggte Benutzer', 'wpsg')); ?>
6341 hartmut 170
						<?php } /* Abfrage Preisanzeige nur für eingeloggte Benutzer ENDE */?>
171
 
2735 daniel 172
						<div class="wpsg_mod_productindex_button">
6341 hartmut 173
 
6286 hartmut 174
							<?php //if ($this->hasMod('wpsg_mod_stock') && $this->callMod('wpsg_mod_stock', 'checkBestand', array($this->getProduktID($p['id']), 1)) === false) { ?>
175
							<?php if (false) { ?>
2735 daniel 176
							<span class="wpsg_produkt_soldout"><?php echo __('Produkt ausverkauft', 'wpsg'); ?></span>
6341 hartmut 177
							<?php } else { ?>
2735 daniel 178
							<a class="wpsg_button" title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo __('Zum Produkt', 'wpsg'); ?></a>
1902 daniel 179
							<?php } ?>
6341 hartmut 180
 
2735 daniel 181
						</div>
6341 hartmut 182
 
1902 daniel 183
					</div>
2735 daniel 184
					<div class="wpsg_clear"></div>
6341 hartmut 185
				</div>
186
			</div>
187
 
2735 daniel 188
			<?php if (($i - 1) % $col == ($col - 1)) { ?><div class="wpsg_clear"></div></div><?php } ?>
6341 hartmut 189
 
1902 daniel 190
		<?php } ?>
6341 hartmut 191
 
1902 daniel 192
		<?php if (($i - 1) % $col != ($col - 1)) { ?><div class="wpsg_clear"></div></div><?php } ?>
6341 hartmut 193
 
1902 daniel 194
	<?php } else { ?>
195
	<div class="wpsg_mod_productindex_empty"><?php echo __('Keine passenden Produkte gefunden.', 'wpsg'); ?></div>
196
	<?php } ?>
6341 hartmut 197
 
1902 daniel 198
	<div class="wpsg_mod_productindex_toolbar wpsg_mod_productindex_toolbar_bottom">
6341 hartmut 199
 
1902 daniel 200
		<?php if ($this->view['hideOrder'] != '1') { ?>
201
		<div class="wpsg_mod_productindex_order">
202
			<span><?php echo __('Sortierung:', 'wpsg'); ?></span>
203
			<select name="wpsg_mod_productindex[filter][order]" class="wpsg_mod_productindex_filter_order">
204
				<option value="price_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_asc')?'selected="selected"':''); ?>><?php echo __('Preis (Kleinster zuerst)', 'wpsg'); ?></option>
205
				<option value="price_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_desc')?'selected="selected"':''); ?>><?php echo __('Preis (Größter zuerst)', 'wpsg'); ?></option>
206
				<option value="name_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_asc')?'selected="selected"':''); ?>><?php echo __('Name Aufsteigend', 'wpsg'); ?></option>
207
				<option value="name_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_desc')?'selected="selected"':''); ?>><?php echo __('Name Absteigend', 'wpsg'); ?></option>
6342 hartmut 208
				<option value="pos_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'pos_asc')?'selected="selected"':''); ?>><?php echo __('Position Aufsteigend', 'wpsg'); ?></option>
209
				<option value="pos_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'pos_desc')?'selected="selected"':''); ?>><?php echo __('Position Absteigend', 'wpsg'); ?></option>				<option value="cdate_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_asc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Älteste zuerst)', 'wpsg'); ?></option>
4376 daniel 210
				<option value="cdate_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_asc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Älteste zuerst)', 'wpsg'); ?></option>
211
				<option value="cdate_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_desc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Neueste zuerst)', 'wpsg'); ?></option>
3648 daniel 212
				<option value="anr_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_asc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Aufsteigend', 'wpsg'); ?></option>
213
				<option value="anr_desc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_desc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Absteigend', 'wpsg'); ?></option>
1902 daniel 214
			</select>
215
		</div>
216
		<?php } ?>
6341 hartmut 217
 
1902 daniel 218
		<?php if ($this->view['wpsg_mod_productindex']['filter']['pages'] > 1) { ?>
219
		<div class="wpsg_mod_productindex_pager">
220
			<span><?php echo __('Seite:', 'wpsg'); ?></span>
221
			<ul>
222
				<?php for ($i = 1; $i <= $this->view['wpsg_mod_productindex']['filter']['pages']; $i ++) { ?>
223
				<li>
6341 hartmut 224
					<?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) { ?>
4891 daniel 225
					<span><?php echo $i; ?></span>
6341 hartmut 226
					<?php } else { ?>
1902 daniel 227
					<a title="<?php echo wpsg_translate(__('Zu Seite #1# wechseln', 'wpsg'), $i); ?>" href="#" onclick="return wpsg_mod_productindex_goPage(<?php echo $i; ?>);"><?php echo $i; ?></a>
228
					<?php } ?>
229
				</li>
230
				<?php } ?>
231
			</ul>
232
		</div>
233
		<?php } ?>
6341 hartmut 234
 
1903 daniel 235
		<?php if ($this->view['hideViewSelect'] != '1') { ?>
236
		<div class="wpsg_mod_productindex_viewselect">
237
			<a href="#" onclick="return wpsg_mod_productindex_viewselect('list.phtml');" title="<?php echo __('Zur Listansicht wechseln.', 'wpsg'); ?>">
238
				<img src="<?php echo $this->getRessourceURL('mods/mod_productindex/gfx/icon_list.png'); ?>" alt="<?php echo __('Zur Listansicht wechseln.', 'wpsg'); ?>" />
239
			</a>
240
		</div>
241
		<?php } ?>
6341 hartmut 242
 
1902 daniel 243
		<div class="wpsg_clear"></div>
6341 hartmut 244
 
1902 daniel 245
	</div>
246
 
247
	<?php if ($this->get_option('wpsg_kleinunternehmer')) { ?>
248
	<a name="kkhint"></a>
2699 david 249
	<div class="wpsg_mod_productindex_kuhint"><?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?></div>
1902 daniel 250
	<?php } ?>
251
 
252
</div>
253
 
254
<script type="text/javascript">/* <![CDATA[ */
255
 
256
	function wpsg_mod_productindex_goPage(page)
257
	{
258
 
259
		jQuery('#wpsg_mod_productindex_filter_page').val(page);
260
		jQuery('#wpsg_mod_productindex_form').submit();
261
 
262
		return false;
6341 hartmut 263
 
1902 daniel 264
	} // function wpsg_mod_productindex_goPage(page)
265
 
1903 daniel 266
	function wpsg_mod_productindex_viewselect(template)
267
	{
268
 
269
		jQuery('#wpsg_mod_productindex_template').val(template);
270
		jQuery('#wpsg_mod_productindex_form').submit();
271
 
272
		return false;
6341 hartmut 273
 
1903 daniel 274
	} // function wpsg_mod_productindex_viewselect(template)
6341 hartmut 275
 
1902 daniel 276
	jQuery(document).ready(function() {
277
 
278
		jQuery('.wpsg_mod_productindex_filter_order').bind('change', function() {
6341 hartmut 279
 
1902 daniel 280
			jQuery('#wpsg_mod_productindex_filter_order').val(jQuery(this).find('option:selected').attr('value'));
281
			jQuery('#wpsg_mod_productindex_filter_page').val('1');
6341 hartmut 282
			jQuery('#wpsg_mod_productindex_form').submit();
283
 
1902 daniel 284
		} );
6341 hartmut 285
 
6451 thomas 286
	} );
287
 
1902 daniel 288
/* ]]> */</script>