/mods/mod_productgroups/list.phtml |
---|
10,20 → 10,15 |
$showP = 4; |
if (!$this->hasMod("wpsg_mod_produktbilder")) die(__("Dieses Template erfordert das Modul mod_produktbilder.", "wpsg")); |
// Dimension der Bilder |
$picW = 150; |
$picH = 100; |
$picMode = 's'; |
?> |
<?php //wpsg_debug($this->view['data']) ?> |
<?php $c = 0; foreach ((array)$this->view['data'] as $k => $g) { ?> |
<?php //wpsg_debug($g) ?> |
<div class="wpsg_pgruppen_list_row"> |
<div class="wpsg_pgruppen_list_titel"> |
<a href="<?php echo WPSG_URL_WP ?>?page_id=<?php echo get_the_ID(); ?>&show=<?php echo $k ?>"> |
<?php echo $g['pgruppe_name'] ?> |
<h2><?php echo $g['pgruppe_name'] ?></h2> |
</a> |
</div> |
<div class="wpsg_pgruppen_list_produkte"> |
31,10 → 26,11 |
<?php $image = array_rand($g['produkte'][$i]['bilder']); ?> |
<?php if ($image >= 0 && is_int($image)) { ?> |
<div class="wpsg_pgruppen_list_image"> |
<?php $image_path = $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($g['produkte'][$i]['id'], $g['produkte'][$i]['bilder'][$image], $picW, $picH, $picMode)) ?> |
<a href="<?php echo $g['produkte'][$i]['url'] ?>"> |
<img src="<?php echo $image_path; ?>" alt="<?php echo $g['produkte'][$i]['name']; ?>"/> |
<?php echo wp_get_attachment_image($g['produkte'][$i]['bilder'][$image]['post_id'], 'sto_productimage_100', false, array()); ?> |
</a> |
</div> |
<?php } ?> |
<?php } ?> |
/mods/mod_productgroups/show.phtml |
---|
7,31 → 7,17 |
*/ |
if (!$this->hasMod("wpsg_mod_produktbilder")) die(__("Dieses Template erfordert das Modul mod_produktbilder.", "wpsg")); |
// Dimension der Bilder |
$picW = 200; |
$picH = 200; |
$picMode = 'c'; |
//$p['produktattribute'][$index]['name']; Der Name des Attributs |
//$p['produktattribute'][$index]['value']; Der Wert des Attributs |
//$index ist die Nummer des Produktattributs |
//Ausgabemöglichkeit bei aktiviertem Debug Modus |
//wpsg_debug($this->view['data']); |
?> |
<div class="wpsg_pgruppen_single"> |
<div class="wpsg_pgruppen_single_produkte_wrap"> |
<div class="wpsg_pgruppen_single_produkte"> |
<?php foreach ((array)$this->view['data']['produkte'] as $p) { ?> |
<?php //wpsg_debug($p) ?> |
<?php foreach ((array)$this->view['data']['produkte'] as $p) { ?> |
<?php if (sizeof($p['bilder']) > 0) { ?> |
<?php $image = array_rand($p['bilder']); ?> |
<div class="wpsg_pgruppen_single_list_image"> |
<?php $image_path = $this->callMod('wpsg_mod_produktbilder', 'makeTn', array($p['id'], $p['bilder'][$image], $picW, $picH, $picMode)) ?> |
<div class="wpsg_pgruppen_single_list_image"> |
<a href="<?php echo $p['url'] ?>"> |
<img src="<?php echo $image_path; ?>" alt="<?php echo $p['name']; ?>"/> |
<?php echo wp_get_attachment_image($g['bilder'][$image]['post_id'], 'sto_productimage_555', false, array()); ?> |
</a> |
</div> |
<?php } ?> |