Subversion Repositories wpShopGermany4

Rev

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