Subversion Repositories wpShopGermany4

Rev

Rev 7557 | Rev 7680 | 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
 
7557 daniel 84
		<?php $i = 0; foreach ($this->view['arProducts'] as $p) { $oProduct = wpsg_product::getInstance($p['product_key']); $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*/?>
7583 daniel 137
						<?php if ($this->canDisplayPrice()) { ?>
7435 thomas 138
							<?php if ($this->hasMod('wpsg_mod_discount') && $this->get_option('wpsg_mod_discount_productindex') == '1') { ?>
139
 
140
    							<?php $oldPrice = $oProduct->getOldPrice();  ?>
141
 
142
                    			<?php if ($oldPrice !== false && $oldPrice != $oProduct->getPrice($this->view['data']['product_key'])) { ?>
143
                    				<span class="wpsg_mod_productview_newprice wpsg_mod_productview_price wpsg_mod_productview_current"><?php echo wpsg_ff($oProduct->getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?></span><br />
144
                    				<span class="wpsg_mod_productview_oldprice"><?php echo wpsg_ff($oldPrice, $this->get_option('wpsg_currency')); ?></span>
145
                    			<?php } else { ?>
146
                    				<span class="wpsg_mod_productview_price"><?php echo wpsg_ff($oProduct->getPrice($this->view['data']['product_key']), $this->get_option('wpsg_currency')); ?></span>
147
                    			<?php } ?>
148
 
149
							<?php }else{?>
5548 thomas 150
							<div class="wpsg_mod_productindex_price">
151
								<?php if ($p['min_preis'] == $p['max_preis']) { ?>
152
									<?php echo wpsg_ff($p['preis'], $this->get_option('wpsg_currency')); ?>
153
								<?php } else { ?>
154
									<?php echo wpsg_translate(__('ab #1#', 'wpsg'), wpsg_ff($p['min_preis'], $this->get_option('wpsg_currency'))); ?>
155
								<?php } ?>
156
							</div>
7435 thomas 157
							<?php } ?>
6341 hartmut 158
							<?php if ($this->get_option('wpsg_kleinunternehmer')) { /* Kleinunternehmerregelung aktiviert START */ ?>
5548 thomas 159
							<div class="wpsg_produkt_preishinweis">
160
								<?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>'); ?>
161
							</div>
6341 hartmut 162
							<?php } else { /* Kleinunternehmerregelung aktiviert ENDE */ ?>
163
							<div class="wpsg_produkt_preishinweis">
5548 thomas 164
								<?php if ($this->getFrontendTaxview() == WPSG_NETTO) { /* Frontend = NETTO Preise */ ?>
165
								<?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>'); ?>
166
								<?php } else { /* Frontend = BRUTTO Preise */ ?>
167
								<?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>'); ?>
168
								<?php } ?>
6341 hartmut 169
							</div>
1902 daniel 170
							<?php } ?>
5548 thomas 171
						<?php }else{?>
172
								<?php echo wpsg_translate(__('Preise nur für eingeloggte Benutzer', 'wpsg')); ?>
6341 hartmut 173
						<?php } /* Abfrage Preisanzeige nur für eingeloggte Benutzer ENDE */?>
174
 
2735 daniel 175
						<div class="wpsg_mod_productindex_button">
6341 hartmut 176
 
6286 hartmut 177
							<?php //if ($this->hasMod('wpsg_mod_stock') && $this->callMod('wpsg_mod_stock', 'checkBestand', array($this->getProduktID($p['id']), 1)) === false) { ?>
178
							<?php if (false) { ?>
2735 daniel 179
							<span class="wpsg_produkt_soldout"><?php echo __('Produkt ausverkauft', 'wpsg'); ?></span>
6341 hartmut 180
							<?php } else { ?>
2735 daniel 181
							<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 182
							<?php } ?>
6341 hartmut 183
 
7435 thomas 184
						</div>
1902 daniel 185
					</div>
2735 daniel 186
					<div class="wpsg_clear"></div>
6341 hartmut 187
				</div>
188
			</div>
189
 
2735 daniel 190
			<?php if (($i - 1) % $col == ($col - 1)) { ?><div class="wpsg_clear"></div></div><?php } ?>
6341 hartmut 191
 
1902 daniel 192
		<?php } ?>
6341 hartmut 193
 
1902 daniel 194
		<?php if (($i - 1) % $col != ($col - 1)) { ?><div class="wpsg_clear"></div></div><?php } ?>
6341 hartmut 195
 
1902 daniel 196
	<?php } else { ?>
197
	<div class="wpsg_mod_productindex_empty"><?php echo __('Keine passenden Produkte gefunden.', 'wpsg'); ?></div>
198
	<?php } ?>
6341 hartmut 199
 
1902 daniel 200
	<div class="wpsg_mod_productindex_toolbar wpsg_mod_productindex_toolbar_bottom">
6341 hartmut 201
 
1902 daniel 202
		<?php if ($this->view['hideOrder'] != '1') { ?>
203
		<div class="wpsg_mod_productindex_order">
204
			<span><?php echo __('Sortierung:', 'wpsg'); ?></span>
205
			<select name="wpsg_mod_productindex[filter][order]" class="wpsg_mod_productindex_filter_order">
206
				<option value="price_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'price_asc')?'selected="selected"':''); ?>><?php echo __('Preis (Kleinster zuerst)', 'wpsg'); ?></option>
207
				<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>
208
				<option value="name_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'name_asc')?'selected="selected"':''); ?>><?php echo __('Name Aufsteigend', 'wpsg'); ?></option>
209
				<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 210
				<option value="pos_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'pos_asc')?'selected="selected"':''); ?>><?php echo __('Position Aufsteigend', 'wpsg'); ?></option>
211
				<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 212
				<option value="cdate_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'cdate_asc')?'selected="selected"':''); ?>><?php echo __('Erstellungsdatum (Älteste zuerst)', 'wpsg'); ?></option>
213
				<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 214
				<option value="anr_asc" <?php echo (($this->view['wpsg_mod_productindex']['filter']['order'] == 'anr_asc')?'selected="selected"':''); ?>><?php echo __('Artikelnummer Aufsteigend', 'wpsg'); ?></option>
215
				<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 216
			</select>
217
		</div>
218
		<?php } ?>
6341 hartmut 219
 
1902 daniel 220
		<?php if ($this->view['wpsg_mod_productindex']['filter']['pages'] > 1) { ?>
221
		<div class="wpsg_mod_productindex_pager">
222
			<span><?php echo __('Seite:', 'wpsg'); ?></span>
223
			<ul>
224
				<?php for ($i = 1; $i <= $this->view['wpsg_mod_productindex']['filter']['pages']; $i ++) { ?>
225
				<li>
6341 hartmut 226
					<?php if ($i == $this->view['wpsg_mod_productindex']['filter']['page']) { ?>
4891 daniel 227
					<span><?php echo $i; ?></span>
6341 hartmut 228
					<?php } else { ?>
1902 daniel 229
					<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>
230
					<?php } ?>
231
				</li>
232
				<?php } ?>
233
			</ul>
234
		</div>
235
		<?php } ?>
6341 hartmut 236
 
1903 daniel 237
		<?php if ($this->view['hideViewSelect'] != '1') { ?>
238
		<div class="wpsg_mod_productindex_viewselect">
239
			<a href="#" onclick="return wpsg_mod_productindex_viewselect('list.phtml');" title="<?php echo __('Zur Listansicht wechseln.', 'wpsg'); ?>">
240
				<img src="<?php echo $this->getRessourceURL('mods/mod_productindex/gfx/icon_list.png'); ?>" alt="<?php echo __('Zur Listansicht wechseln.', 'wpsg'); ?>" />
241
			</a>
242
		</div>
243
		<?php } ?>
6341 hartmut 244
 
1902 daniel 245
		<div class="wpsg_clear"></div>
6341 hartmut 246
 
1902 daniel 247
	</div>
248
 
249
	<?php if ($this->get_option('wpsg_kleinunternehmer')) { ?>
250
	<a name="kkhint"></a>
2699 david 251
	<div class="wpsg_mod_productindex_kuhint"><?php echo $this->get_option('wpsg_kleinunternehmer_text'); ?></div>
1902 daniel 252
	<?php } ?>
253
 
254
</div>
255
 
256
<script type="text/javascript">/* <![CDATA[ */
257
 
258
	function wpsg_mod_productindex_goPage(page)
259
	{
260
 
261
		jQuery('#wpsg_mod_productindex_filter_page').val(page);
262
		jQuery('#wpsg_mod_productindex_form').submit();
263
 
264
		return false;
6341 hartmut 265
 
1902 daniel 266
	} // function wpsg_mod_productindex_goPage(page)
267
 
1903 daniel 268
	function wpsg_mod_productindex_viewselect(template)
269
	{
270
 
271
		jQuery('#wpsg_mod_productindex_template').val(template);
272
		jQuery('#wpsg_mod_productindex_form').submit();
273
 
274
		return false;
6341 hartmut 275
 
1903 daniel 276
	} // function wpsg_mod_productindex_viewselect(template)
6341 hartmut 277
 
1902 daniel 278
	jQuery(document).ready(function() {
279
 
280
		jQuery('.wpsg_mod_productindex_filter_order').bind('change', function() {
6341 hartmut 281
 
1902 daniel 282
			jQuery('#wpsg_mod_productindex_filter_order').val(jQuery(this).find('option:selected').attr('value'));
283
			jQuery('#wpsg_mod_productindex_filter_page').val('1');
6341 hartmut 284
			jQuery('#wpsg_mod_productindex_form').submit();
285
 
1902 daniel 286
		} );
6341 hartmut 287
 
6451 thomas 288
	} );
289
 
1902 daniel 290
/* ]]> */</script>