summaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
Diffstat (limited to 'views')
-rw-r--r--views/produkt/index.phtml14
1 files changed, 13 insertions, 1 deletions
diff --git a/views/produkt/index.phtml b/views/produkt/index.phtml
index b544be7..c43490c 100644
--- a/views/produkt/index.phtml
+++ b/views/produkt/index.phtml
@@ -219,7 +219,19 @@
<?php if ($d['stock'] == '0' ) {?>
<div class="wpsg_productview_backend-sold-out"><?php echo __('Ausverkauft', 'wpsg');?></div>
<?php } else { ?>
- <div class="wpsg_productview_backend-available"><?php echo __('Vorrätig', 'wpsg');?></div><div>(<?php echo $d['stock']; ?>)</div>
+ <div class="wpsg_productview_backend-available"><?php echo __('Vorrätig', 'wpsg');?></div>
+ <?php
+ if ($this->get_option('wpsg_mod_stock_minstockproduct') == 1) {
+ $cnts = '('.$d['stock'].'/'.$d['minstockproduct_count'].')';
+ } else {
+ $cnts = '('.$d['stock'].')';
+ }
+ if ($d['stock'] <= wpsg_getInt($d['minstockproduct_count'])) {
+ echo '<div style="color:red;">'.$cnts.'</div>';
+ } else {
+ echo '<div>'.$cnts.'</div>';
+ }
+ ?>
<?php }?>
</div>
<?php if ($this->hasMod('wpsg_mod_productvariants')) $arVarianten = $this->callMod('wpsg_mod_productvariants', 'getVariants', array($d['id'], true, true, true)); if (wpsg_isSizedArray($arVarianten)) { ?>