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 /views/mods/mod_productindex/layouts | |
| 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
Diffstat (limited to 'views/mods/mod_productindex/layouts')
| -rw-r--r-- | views/mods/mod_productindex/layouts/grid.phtml | 34 | ||||
| -rw-r--r-- | views/mods/mod_productindex/layouts/list.phtml | 31 |
2 files changed, 35 insertions, 30 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>
|
