Subversion Repositories wpShopGermany4

Rev

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