Subversion Repositories wpShopGermany4

Rev

Rev 7841 | Details | Compare with Previous | Last modification | View Log | RSS feed

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