summaryrefslogtreecommitdiff
path: root/views/mods/mod_productview/productview.phtml
diff options
context:
space:
mode:
Diffstat (limited to 'views/mods/mod_productview/productview.phtml')
-rw-r--r--views/mods/mod_productview/productview.phtml106
1 files changed, 106 insertions, 0 deletions
diff --git a/views/mods/mod_productview/productview.phtml b/views/mods/mod_productview/productview.phtml
new file mode 100644
index 0000000..2175f48
--- /dev/null
+++ b/views/mods/mod_productview/productview.phtml
@@ -0,0 +1,106 @@
+<?php
+
+ /**
+ * Template für die Anzeige der Produkte
+ * Es sollte nur Inhalt unter dem Div der Klasse wpsg_productview geändert werden, da dieses mittels AJAX ausgetauscht wird
+ */
+
+?>
+<div class="wpsg_productview" id="wpsg_productview_<?php echo $this->view['wpsg_mod_productview']['index']; ?>">
+
+ <div class="wpsg_productview_head row">
+
+ <h2 class="wpsg_productview_title col-lg-3"><?php echo wpsg_hspc($this->view['wpsg_mod_productview']['title']); ?></h2>
+
+ <?php if (wpsg_isSizedArray($this->view['wpsg_mod_productview']['products'])) { ?>
+ <div class="col-lg-3 wpsg_mod_productview-order">
+ asd
+ </div>
+
+ <div class="col-lg-6 wpsg_mod_productview-info">
+ <strong><?php echo wpsg_translate(__('Anzeige #1# - #2#', 'wpsg'), ($this->view['wpsg_mod_productview']['page'] - 1) * $this->view['wpsg_mod_productview']['per_page'] + 1, $this->view['wpsg_mod_productview']['page'] * $this->view['wpsg_mod_productview']['per_page']); ?></strong>
+ <?php echo wpsg_translate(__('von #1# Ergebnissen', 'wpsg'), $this->view['wpsg_mod_productview']['count']); ?>
+ </div>
+ <?php } ?>
+
+ </div>
+
+ <div class="wpsg_productview_content row">
+
+ <?php if (wpsg_isSizedArray($this->view['wpsg_mod_productview']['products'])) { ?>
+
+ <?php $i = 0; foreach ($this->view['wpsg_mod_productview']['products'] as $oProduct) { $i ++; ?>
+ <a title="<?php echo wpsg_translate(__('Zum Produkt "#1#"', 'wpsg'), $oProduct->getProductName()); ?>" href="<?php echo $oProduct->getProductURL(); ?>" class="wpsg_productview_product wpsg_productview_product_<?php echo $oProduct->id; ?> col-lg-3">
+
+ <?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
+ <?php $image_url = $this->callMod('wpsg_mod_produktbilder', 'getProductImage', array($oProduct->id, 520, 520, 'sz')); ?>
+ <?php if (wpsg_isSizedString($image_url)) { ?>
+ <div class="wpsg_mod_productview_image">
+ <img src="<?php echo $image_url; ?>" alt="" />
+ </div>
+ <?php } } ?>
+
+ <div class="wpsg_mod_productview_bottom">
+
+ <div class="wpsg_mod_productview_name">
+ <h2><?php echo $oProduct->getProductName(); ?></h2>
+ </div>
+
+ <div class="wpsg_mod_productview_price_wrap">
+
+ <?php $oldPrice = $oProduct->getOldPrice(); ?>
+ <?php if ($oldPrice !== false) { ?>
+ <div class="wpsg_mod_productview_oldprice"><?php echo wpsg_ff($oldPrice, $this->get_option('wpsg_currency')); ?></div>
+ <?php } ?>
+
+ <?php if ($oProduct->getMinPrice() != $oProduct->getPrice()) { ?>
+ <div class="<?php echo (($oldPrice !== false)?'wpsg_mod_productview_pricehiglight':''); ?> wpsg_mod_productview_price wpsg_mod_productview_minprice"><?php echo wpsg_translate(__('Ab #1#', 'wpsg'), wpsg_ff($oProduct->getMinPrice(), $this->get_option('wpsg_currency'))); ?></div>
+ <?php } else { ?>
+ <div class="<?php echo (($oldPrice !== false)?'wpsg_mod_productview_pricehiglight':''); ?> wpsg_mod_productview_price"><?php echo wpsg_ff($oProduct->getPrice(), $this->get_option('wpsg_currency')); ?></div>
+ <?php } ?>
+
+ </div>
+
+ </div>
+
+ <input type="hidden" name="atts" value="<?php echo @wpsg_hspc(serialize($this->view['wpsg_mod_productview']['atts'])); ?>" />
+
+ <div class="wpsg_mod_productview_go"><span class="glyphicon glyphicon-eye-open"></span></div>
+
+ </a>
+
+ <?php if ($i % 4 === 0) { ?>
+ <div class="clearfix visible-lg-block"></div>
+ <?php } ?>
+
+ <?php } ?>
+
+ <?php } else { ?>
+ <?php echo __('Keine Produkte in dieser Ansicht.', 'wpsg'); ?>
+ <?php } ?>
+
+ <div class="clearfix"></div>
+
+ <?php if (wpsg_isSizedInt($this->view['wpsg_mod_productview']['pages']) && $this->view['wpsg_mod_productview']['pages'] > 1) { ?>
+ <div class="wpsg_productview_pager">
+ <div class="wpsg_productview_pager_wrap">
+ <?php if ($this->view['wpsg_mod_productview']['page'] > 1) { ?>
+ <a href="#" title="<?php echo wpsg_translate(__('Eine Seite zurück und die vorherigen #1# Produkte anzeigen', 'wpsg'), $this->view['wpsg_mod_productview']['per_page']); ?>" onclick="return wpsg_switchProductview(<?php echo $this->view['wpsg_mod_productview']['index']; ?>, <?php echo $this->view['wpsg_mod_productview']['page'] - 1; ?>);"><span class="glyphicon glyphicon-arrow-left"></span></a>
+ <?php } ?>
+ <?php for ($i = 1; $i <= $this->view['wpsg_mod_productview']['pages']; $i ++) { ?>
+ <?php if ($i == $this->view['wpsg_mod_productview']['page']) { ?>
+ <span><?php echo $i; ?></span>
+ <?php } else { ?>
+ <a onclick="return wpsg_switchProductview(<?php echo $this->view['wpsg_mod_productview']['index']; ?>, <?php echo $i; ?>); " href="#"><?php echo $i; ?></a>
+ <?php } ?>
+ <?php } ?>
+ <?php if ($this->view['wpsg_mod_productview']['page'] < $this->view['wpsg_mod_productview']['pages']) { ?>
+ <a href="#" title="<?php echo wpsg_translate(__('Eine Seite vor und die nächsten #1# Produkte anzeigen', 'wpsg'), $this->view['wpsg_mod_productview']['per_page']); ?>" onclick="return wpsg_switchProductview(<?php echo $this->view['wpsg_mod_productview']['index']; ?>, <?php echo $this->view['wpsg_mod_productview']['page'] + 1; ?>); "><span class="glyphicon glyphicon-arrow-right"></span></a>
+ <?php } ?>
+ </div>
+ </div>
+ <?php } ?>
+
+ </div>
+
+</div> \ No newline at end of file