diff options
| author | thomas <noreply@maennchen1.de> | 2018-04-19 07:24:19 +0000 |
|---|---|---|
| committer | thomas <noreply@maennchen1.de> | 2018-04-19 07:24:19 +0000 |
| commit | a9c7ad64290873e167d5d9f226e0b8ca54c532fd (patch) | |
| tree | 2e55c9e3d3c7a68c9a64006a5ffb3f8b4c9bc6ea | |
| parent | bcf53534eb6003ea0a0b897a146f342b021d1e82 (diff) | |
- Füllmenge: Grundpreis wird bei 0 ausgeblendet
- Produktindex: Füllmenge, Gewicht, ... < 0 ausgeblendet
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6995 0d5edaf7-2b12-4e95-93f4-047927463d4b
| -rw-r--r-- | views/mods/mod_productindex/layouts/grid.phtml | 34 | ||||
| -rw-r--r-- | views/mods/mod_productindex/layouts/list.phtml | 31 | ||||
| -rw-r--r-- | views/produkttemplates/standard.phtml | 49 |
3 files changed, 74 insertions, 40 deletions
diff --git a/views/mods/mod_productindex/layouts/grid.phtml b/views/mods/mod_productindex/layouts/grid.phtml index 1d5442a..cb3e6c0 100644 --- a/views/mods/mod_productindex/layouts/grid.phtml +++ b/views/mods/mod_productindex/layouts/grid.phtml @@ -111,28 +111,30 @@ <div class="wpsg_mod_productindex_infos">
<div class="wpsg_mod_productindex_weight">
<?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProductindex') == '1') { ?>
- <?php if ($p['min_weight'] == $p['max_weight']) { ?>
- <?php echo wpsg_translate(__('Gewicht: #1#', 'wpsg'), wpsg_ff($p['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
- <?php } else { ?>
- <?php echo wpsg_translate(__('Gewicht: ab #1#', 'wpsg'), wpsg_ff($p['min_weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
- <?php } ?>
+ <?php if (($p['weight']) > '0') { ?>
+ <?php if ($p['min_weight'] == $p['max_weight']) { ?>
+ <?php echo wpsg_translate(__('Gewicht: #1#', 'wpsg'), wpsg_ff($p['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('Gewicht: ab #1#', 'wpsg'), wpsg_ff($p['min_weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
+ <?php } ?>
+ <?php } ?>
<?php } ?>
</div>
<div class="wpsg_mod_productindex_fmenge">
<?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_fmenge') == '1') { ?>
- <?php echo wpsg_translate(__('Füllmenge: #1#', 'wpsg'), wpsg_ff($p['fmenge'], $p['feinheit'])); ?>
- <?php } ?>
- </div>
-
- <div class="wpsg_mod_productindex_gpreis">
- <?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_grundpreis') == '1') { ?>
- <?php echo wpsg_translate(__('Grundpreis: #1# / #2#', 'wpsg'),
- wpsg_ff($p['fmenge_preis'], $this->get_option('wpsg_currency')),
- wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $p['feinheit'])
- ); ?>
+ <?php if (($p['fmenge']) > '0') { ?>
+ <?php echo wpsg_translate(__('Füllmenge: #1#', 'wpsg'), wpsg_ff($p['fmenge'], $p['feinheit'])); ?>
+ <br />
+ <?php if ($this->get_option('wpsg_mod_fuellmenge_showProductindex_grundpreis') == '1') { ?>
+ <?php echo wpsg_translate(__('Grundpreis: #1# / #2#', 'wpsg'),
+ wpsg_ff($p['fmenge_preis'], $this->get_option('wpsg_currency')),
+ wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $p['feinheit'])
+ ); ?>
+ <?php } ?>
+ <?php } ?>
<?php } ?>
- </div>
+ </div>
</div>
<?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showProductindex') == '1') { ?>
diff --git a/views/mods/mod_productindex/layouts/list.phtml b/views/mods/mod_productindex/layouts/list.phtml index 4fa8528..e8b6f0e 100644 --- a/views/mods/mod_productindex/layouts/list.phtml +++ b/views/mods/mod_productindex/layouts/list.phtml @@ -98,17 +98,28 @@ <div class="wpsg_mod_productindex_infos">
<div class="wpsg_mod_productindex_weight">
<?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProductindex') == '1') { ?>
- <?php if ($p['min_weight'] == $p['max_weight']) { ?>
- <?php echo wpsg_translate(__('Gewicht: #1#', 'wpsg'), wpsg_ff($p['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
- <?php } else { ?>
- <?php echo wpsg_translate(__('Gewicht: ab #1#', 'wpsg'), wpsg_ff($p['min_weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
- <?php } ?>
+ <?php if (($p['weight']) > '0') { ?>
+ <?php if ($p['min_weight'] == $p['max_weight']) { ?>
+ <?php echo wpsg_translate(__('Gewicht: #1#', 'wpsg'), wpsg_ff($p['weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
+ <?php } else { ?>
+ <?php echo wpsg_translate(__('Gewicht: ab #1#', 'wpsg'), wpsg_ff($p['min_weight'], $this->get_option('wpsg_mod_weight_unit'))); ?>
+ <?php } ?>
+ <?php } ?>
<?php } ?>
</div>
<div class="wpsg_mod_productindex_fmenge">
<?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_fmenge') == '1') { ?>
- <?php echo wpsg_translate(__('Füllmenge: #1#', 'wpsg'), wpsg_ff($p['fmenge'], $p['feinheit'])); ?>
+ <?php if (($p['fmenge']) > '0') { ?>
+ <?php echo wpsg_translate(__('Füllmenge: #1#', 'wpsg'), wpsg_ff($p['fmenge'], $p['feinheit'])); ?>
+ <br />
+ <?php if ($this->get_option('wpsg_mod_fuellmenge_showProductindex_grundpreis') == '1') { ?>
+ <?php echo wpsg_translate(__('Grundpreis: #1# / #2#', 'wpsg'),
+ wpsg_ff($p['fmenge_preis'], $this->get_option('wpsg_currency')),
+ wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $p['feinheit'])
+ ); ?>
+ <?php } ?>
+ <?php } ?>
<?php } ?>
</div>
@@ -118,14 +129,6 @@ </div>
<?php } ?>
- <div class="wpsg_mod_productindex_gpreis">
- <?php if ($this->hasMod('wpsg_mod_fuellmenge') && $this->get_option('wpsg_mod_fuellmenge_showProductindex_grundpreis') == '1') { ?>
- <?php echo wpsg_translate(__('Grundpreis: #1# / #2#', 'wpsg'),
- wpsg_ff($p['fmenge_preis'], $this->get_option('wpsg_currency')),
- wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $p['feinheit'])
- ); ?>
- <?php } ?>
- </div>
</div>
<div class="wpsg_mod_productindex_title">
<a title="<?php echo __('Zur Detailseite des Produkts', 'wpsg'); ?>" href="<?php echo wpsg_url($p['url']); ?>"><?php echo $this->getProductName($this->getProduktID($p['id']), true); ?></a>
diff --git a/views/produkttemplates/standard.phtml b/views/produkttemplates/standard.phtml index 0d0d5f1..a80c171 100644 --- a/views/produkttemplates/standard.phtml +++ b/views/produkttemplates/standard.phtml @@ -130,29 +130,53 @@ <?php /* Abfrage Preisanzeige nur für eingeloggte User aktiv und User eingeloggt ENDE */ ?>
<div itemprop="description" class="wpsg_produkt_shortdescription">
+
<span><?php echo $this->view['data']['shortdesc']; ?></span>
+
</div>
<div class="wpsg_clear"></div>
<?php /* Lagerbestand START*/?>
<?php if ($this->hasMod('wpsg_mod_stock') && $this->get_option('wpsg_mod_stock_showProduct') == '1') { ?>
+
<div class="wpsg_mod_produktindex_stock">
- <label><?php echo wpsg_translate(__('#1#','wpsg'), $this->view['data']['stock']); ?></label><?php echo wpsg_translate(__(' Artikel auf Lager', 'wpsg')); ?>
+
+ <?php if (($this->view['data']['stock']) > '0') {?>
+
+ <label><?php echo wpsg_translate(__('#1#','wpsg'), $this->view['data']['stock']); ?></label><?php echo wpsg_translate(__(' Artikel auf Lager', 'wpsg')); ?>
+
+ <?php } else { ?>
+
+ <label><?php echo wpsg_translate(__('', 'wpsg')); ?></label>
+
+ <?php } ?>
+
</div>
<?php } ?>
<?php /* Lagerbestand ENDE*/?>
<?php /* Füllmengenanzeige START */ ?>
<?php if ($this->hasMod('wpsg_mod_fuellmenge')) { ?>
-
+
<div class="wpsg_produkt_fuellmenge">
- <span class="label label_fuellmenge"><?php echo wpsg_translate(__('Füllmenge:', 'wpsg')); ?></span>
- <?php echo wpsg_translate(__('#1# (#2# / #3#)', 'wpsg'),
- '<span class="wpsg_fmenge">'.wpsg_ff($this->view['data']['fmenge'], '', true).'</span> '.$this->view['data']['feinheit'],
- '<span class="fmenge_preis">'.wpsg_ff($this->view['data']['fmenge_preis'], $this->get_option('wpsg_currency')).'</span> ',
- wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $this->view['data']['feinheit'])
- ); ?>
+
+ <?php if (($this->view['data']['fmenge']) > '0') { ?>
+
+ <span class="label label_fuellmenge"><?php echo wpsg_translate(__('Füllmenge:', 'wpsg')); ?></span>
+
+ <?php echo wpsg_translate(__('#1# (#2# / #3#)', 'wpsg'),
+ '<span class="wpsg_fmenge">'.wpsg_ff($this->view['data']['fmenge'], '', true).'</span> '.$this->view['data']['feinheit'],
+ '<span class="fmenge_preis">'.wpsg_ff($this->view['data']['fmenge_preis'], $this->get_option('wpsg_currency')).'</span> ',
+ wpsg_ff($this->get_option('wpsg_mod_fuellmenge_bezug'), $this->view['data']['feinheit'])
+ ); ?>
+
+ <?php } else { ?>
+
+ <label><?php echo wpsg_translate(__('', 'wpsg')); ?></label>
+
+ <?php } ?>
+
</div>
<?php } ?>
@@ -161,8 +185,13 @@ <?php /* Gewichtsanzeige START */ ?>
<?php if ($this->hasMod('wpsg_mod_weight') && $this->get_option('wpsg_mod_weight_showProduct') === '1') { ?>
<div class="wpsg_mod_weight_produkt">
- <span class="label label_weight"><?php echo wpsg_translate(__('Gewicht:', 'wpsg')); ?></span>
- <?php echo wpsg_translate(__('#1# #2#', 'wpsg'), '<span class="wpsg_weight" id="weight_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['weight']).'</span>', $this->get_option('wpsg_mod_weight_unit')); ?>
+
+ <?php if (($this->view['data']['weight']) > '0') { ?>
+ <span class="label label_weight"><?php echo wpsg_translate(__('Gewicht:', 'wpsg')); ?></span>
+ <?php echo wpsg_translate(__('#1# #2#', 'wpsg'), '<span class="wpsg_weight" id="weight_'.$this->view['data']['id'].'">'.wpsg_ff($this->view['data']['weight']).'</span>', $this->get_option('wpsg_mod_weight_unit')); ?>
+ <?php } else { ?>
+ <label><?php wpsg_translate(__('', 'wpsg'))?></label>
+ <?php } ?>
</div>
<?php } ?>
<?php /* Gewichtsanzeige ENDE */ ?>
|
