summaryrefslogtreecommitdiff
path: root/views/mods/mod_productview/productview.phtml
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2016-06-18 14:01:39 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2016-06-18 14:01:39 +0000
commitef9544e477984efd73405c6847bd938a0a4ccfc8 (patch)
treec46390944c88b5f1221c2d64663f91de18d67bc4 /views/mods/mod_productview/productview.phtml
parent3bce1a992a438e64ae24d18d25f600b097d2210e (diff)
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5558 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_productview/productview.phtml')
-rw-r--r--views/mods/mod_productview/productview.phtml77
1 files changed, 72 insertions, 5 deletions
diff --git a/views/mods/mod_productview/productview.phtml b/views/mods/mod_productview/productview.phtml
index c98b4b3..53c1799 100644
--- a/views/mods/mod_productview/productview.phtml
+++ b/views/mods/mod_productview/productview.phtml
@@ -44,7 +44,12 @@
<?php echo wpsg_translate(__('von #1# Ergebnissen', 'wpsg'), $this->view['wpsg_mod_productview']['count']); ?>
</div>
<?php } ?>
-
+
+ <div class="wpsg_mod_productview_modeswitch">
+ <a href="#" title="<?php echo __('Schaltet die Produktansicht auf die Grid Ansicht um.', 'wpsg'); ?>" class="fa fa-th <?php echo (($this->view['wpsg_mod_productview']['mode'] == 'grid')?'active':''); ?>"></a>
+ <a href="#" title="<?php echo __('Schaltet die Produktansicht auf die List Ansicht um.', 'wpsg'); ?>" class="fa fa-list <?php echo (($this->view['wpsg_mod_productview']['mode'] == 'list')?'active':''); ?>"></a>
+ </div>
+
</div>
<div class="wpsg_productview_content row">
@@ -52,7 +57,67 @@
<?php if (wpsg_isSizedArray($this->view['wpsg_mod_productview']['products'])) { ?>
<?php $i = 0; foreach ($this->view['wpsg_mod_productview']['products'] as $oProduct) { $i ++; ?>
- <div class="wpsg_productview_product wpsg_productview_product_<?php echo $oProduct->id; ?> <?php echo $this->view['wpsg_mod_productview']['col_class']['product']; ?>">
+
+ <div style="<?php echo (($this->view['wpsg_mod_productview']['mode'] == 'list')?'':'display:none;'); ?>" class="wpsg_productview_product wpsg_productview_product_list wpsg_productview_product_<?php echo $oProduct->id; ?> col-md-12">
+
+ <div class="row">
+
+ <?php $bImage = false; 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)) { $bImage = true; ?>
+ <div class="col-md-4 wpsg_mod_productview_image">
+
+ <img src="<?php echo $image_url; ?>" alt="" />
+
+ </div>
+ <?php } ?>
+ <?php } ?>
+
+ <div class="col-md-<?php echo (($bImage)?'8':'12'); ?>">
+
+ <div class="wpsg_mod_productview_name">
+ <h2><?php echo $oProduct->getProductName(); ?></h2>
+ </div>
+
+ <div class="wpsg_star_wrap">
+ <?php $star = rand(0, 5); ?>
+ <?php for ($i = 0; $i < 5; $i ++) { ?><i class="fa fa-star <?php echo (($i >= $star)?'fa-star-active':''); ?>"></i><?php } ?>
+ </div>
+
+ <div class="wpsg_mod_productview_price_wrap">
+ <?php $oldPrice = $oProduct->getOldPrice(); ?>
+ <?php if ($oldPrice !== false && $oldPrice != $oProduct->getPrice()) { ?>
+ <div class="wpsg_mod_productview_current"><?php echo wpsg_ff($oProduct->getPrice(), $this->get_option('wpsg_currency')); ?></div>
+ <div class="wpsg_mod_productview_oldprice"><?php echo wpsg_ff($oldPrice, $this->get_option('wpsg_currency')); ?></div>
+ <?php } else { ?>
+ <div class="wpsg_mod_productview_price"><?php echo wpsg_ff($oProduct->getPrice(), $this->get_option('wpsg_currency')); ?></div>
+ <?php } ?>
+ </div>
+
+ <div class="wpsg_mod_productview_tax_wrap">
+ <?php if ($this->getFrontendTaxview() == WPSG_BRUTTO) { ?>
+ <?php echo wpsg_translate(__('inkl. #1#% MwSt. zzgl. <a href="#2">Versandkosten</a>', 'wpsg'), $oProduct->getFrontendTaxValue(), $this->getUrl(wpsg_ShopController::URL_VERSANDKOSTEN)); ?>
+ <?php } else if ($this->getFrontendTaxview() == WPSG_NETTO) { ?>
+ <?php echo wpsg_translate(__('zzgl. #1#% MwSt. zzgl. <a href="#2">Versandkosten</a>', 'wpsg'), $oProduct->getFrontendTaxValue(), $this->getUrl(wpsg_ShopController::URL_VERSANDKOSTEN)); ?>
+ <?php } ?>
+ </div>
+
+ <?php $shortDescription = $oProduct->getShortDescription(); if (wpsg_isSizedString($shortDescription)) { ?>
+ <div class="wpsg_mod_productview_description theme_color_1">
+ <strong><?php echo __('Produktbeschreibung', 'wpsg'); ?></strong><br />
+ <?php echo wp_trim_words(apply_filters('the_content', $shortDescription), 90); ?>
+ </div>
+ <?php } ?>
+
+ <a class="wpsg_mod_productview_button" href="<?php echo $oProduct->getProductURL(); ?>"><?php echo __('Zum Produkt', 'wpsg'); ?><span class="fa fa-angle-double-right"></span></a>
+
+ </div>
+
+ </div>
+
+ </div>
+
+ <div style="<?php echo (($this->view['wpsg_mod_productview']['mode'] == 'grid')?'':'display:none;'); ?>" class="<?php echo (($this->view['wpsg_mod_productview']['mode'] == 'grid')?'':'hidden'); ?> wpsg_productview_product wpsg_productview_product_grid wpsg_productview_product_<?php echo $oProduct->id; ?> <?php echo $this->view['wpsg_mod_productview']['col_class']['product']; ?>">
<?php if ($this->hasMod('wpsg_mod_produktbilder')) { ?>
<?php $image_url = $this->callMod('wpsg_mod_produktbilder', 'getProductImage', array($oProduct->id, 520, 520, 'sz')); ?>
@@ -62,10 +127,12 @@
<img src="<?php echo $image_url; ?>" alt="" />
<div class="wpsg_mod_productview_go">
+
<div class="wpsg_star_wrap">
- <?php $star = rand(0, 5); ?>
- <?php for ($i = 0; $i < 5; $i ++) { ?><i class="fa fa-star<?php echo (($i >= $star)?'-o':''); ?>"></i><?php } ?>
- </div>
+ <?php $star = rand(0, 5); ?>
+ <?php for ($i = 0; $i < 5; $i ++) { ?><i class="fa fa-star <?php echo (($i >= $star)?'fa-star-active':''); ?>"></i><?php } ?>
+ </div>
+
<div class="wpsg_center">
<div class="wpsg_mod_productview_price_wrap">