Subversion Repositories wpShopGermany4

Rev

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

Rev Author Line No. Line
6134 daniel 1
<?php
2
 
3
	/*
4
	 *
5
	 * Template f├╝r die Produktgruppenansicht im Frontend
6
	 *
7
	 */
8
 
9
	// Produkte die neben dem Namen angezeigt werden sollen
10
	$showP = 4;
11
 
12
?>
6320 daniel 13
 
6134 daniel 14
<?php $c = 0; foreach ((array)$this->view['data'] as $k => $g) { ?>
15
<?php //wpsg_debug($g) ?>
16
<div class="wpsg_pgruppen_list_row">
17
	<div class="wpsg_pgruppen_list_titel">
18
		<a href="<?php echo WPSG_URL_WP ?>?page_id=<?php echo get_the_ID(); ?>&show=<?php echo $k ?>">
6320 daniel 19
			<h2><?php echo $g['pgruppe_name'] ?></h2>
6134 daniel 20
		</a>
21
	</div>
22
	<div class="wpsg_pgruppen_list_produkte">
23
		<?php for ($i = 0; $i < $showP && $i < sizeof($g['produkte']); $i ++) { ?>
7841 daniel 24
 
8182 daniel 25
            <?php
7841 daniel 26
 
8182 daniel 27
                if ($this->hasMod('wpsg_mod_stock')) $lagerbestand = $this->callMod('wpsg_mod_stock', 'getBestand', [$g['produkte'][$i]['id']]);
28
                else $lagerbestand = 1;
7841 daniel 29
 
30
            ?>
31
 
32
            <?php if ($lagerbestand <= 0) { ?>
33
 
34
                Ausverkauft ...
35
 
36
            <?php } else { ?>
37
 
38
                <?php $image = array_rand($g['produkte'][$i]['bilder']); ?>
39
                <?php if ($image >= 0 && is_int($image)) { ?>
40
                <div class="wpsg_pgruppen_list_image">
41
 
42
                    <a href="<?php echo $g['produkte'][$i]['url'] ?>">
43
                        <?php echo wp_get_attachment_image($g['produkte'][$i]['bilder'][0], 'thumbnail', false, array()); ?>
44
                    </a>
45
 
46
                </div>
47
                <?php } ?>
48
 
49
            <?php } ?>
50
 
6134 daniel 51
		<?php } ?>
52
		<div style="clear:both;"></div>
53
	</div>
54
</div>
55
<?php $c++ ?>
56
<?php } ?>