diff options
| author | thomas <noreply@maennchen1.de> | 2016-06-14 13:30:15 +0000 |
|---|---|---|
| committer | thomas <noreply@maennchen1.de> | 2016-06-14 13:30:15 +0000 |
| commit | ac3b2263a4a985f40a1d16805816185c7cd00984 (patch) | |
| tree | b7a5946cef03ac526603dc5f8ba48ab853defd95 /views/mods/mod_varianten | |
| parent | f4ff207672485b56a72df1d1a74300225260f5a2 (diff) | |
- optionale Produktanzeige für eingeloggte Benutzer
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@5548 0d5edaf7-2b12-4e95-93f4-047927463d4b
Diffstat (limited to 'views/mods/mod_varianten')
| -rw-r--r-- | views/mods/mod_varianten/produkt.phtml | 52 |
1 files changed, 40 insertions, 12 deletions
diff --git a/views/mods/mod_varianten/produkt.phtml b/views/mods/mod_varianten/produkt.phtml index bf5b276..8525ef9 100644 --- a/views/mods/mod_varianten/produkt.phtml +++ b/views/mods/mod_varianten/produkt.phtml @@ -32,7 +32,8 @@ <?php } ?>
<div class="wpsg_vp_field_typ_<?php echo $var['typ']; ?>">
-
+
+ <?php /* Select-Boxen*/ ?>
<?php if ($var['typ'] == "select") { ?>
<label>
<select onchange="wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>);" name="wpsg_vp[<?php echo $k; ?>]" id="wpsg_vpfield_<?php echo $this->getProduktId($this->view['data']['id']); ?>_<?php echo $k; ?>">
@@ -41,9 +42,16 @@ <?php if (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0) { ?>
<option value="<?php echo $kv; ?>" <?php echo (($this->view['wpsg_mod_varianten']['set'][$k] == $kv)?'selected="selected"':''); ?>>
<?php echo $vari['name']; ?>
- <?php if ($this->callMod('wpsg_mod_varianten', 'showVariPrice', array($vari['preis']))) { ?>
- (<?php echo wpsg_ff($vari['preis'], $this->get_option('wpsg_currency')); ?>)
- <?php } ?>
+
+ <?php /* Abfrage Preisanzeige nur für eingeloggte Benutzer START */?>
+ <?php if (($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn') && ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '1')) || ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '0')) { ?>
+ <?php if ($this->callMod('wpsg_mod_varianten', 'showVariPrice', array($vari['preis']))) { ?>
+ (<?php echo wpsg_ff($vari['preis'], $this->get_option('wpsg_currency')); ?>)
+ <?php } ?>
+ <?php }else{?>
+ <?php echo wpsg_translate(__('(Preise nur für eingeloggte Benutzer)', 'wpsg')); ?>
+ <?php } ?>
+ <?php /* Abfrage ENDE */ ?>
</option>
<?php /* Lagerbestand der Variante=0 - wird angezeigt, ist aber nicht auswählbar */ ?>
@@ -83,6 +91,7 @@ </label>
<?php } ?>
+ <?php /* Grafikenauswahl */ ?>
<?php if ($var['typ'] == 'image' && $this->hasMod('wpsg_mod_produktbilder')) { ?>
<div class="wpsg_mod_varianten_imageselect wpsg_mod_varianten_imageselect_<?php echo $k; ?>">
<input type="hidden" name="wpsg_vp[<?php echo $k; ?>]" value="<?php echo $this->view['wpsg_mod_varianten']['set'][$k]; ?>" />
@@ -97,6 +106,7 @@ </div>
<?php } ?>
+ <?php /* Radio-Buttons */ ?>
<?php if ($var['typ'] == "radio") { ?>
<?php $j = 0; foreach ($var['vari'] as $kv => $vari) { if ($vari['aktiv'] == "1") { $j ++; ?>
<?php if (!$this->hasMod('wpsg_mod_stock') || $vari['stock'] > 0 || $this->get_option('wpsg_mod_vp_showProduct') === '1') { ?>
@@ -109,11 +119,18 @@ <?php } else { ?>
<input disabled="disabled" <?php echo (($this->view['wpsg_mod_varianten']['set'][$k] == $kv)?'checked="checked"':''); ?> id="wpsg_vpfield_<?php echo $this->getProduktId($this->view['data']['id']); ?>_<?php echo $k; ?>_<?php echo $j; ?>" onclick="wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>);" type="radio" name="wpsg_vp[<?php echo $k; ?>]" value="<?php echo $kv; ?>" /> <?php echo $vari['name']; ?>
<?php } ?>
-
- <?php if ($this->callMod('wpsg_mod_varianten', 'showVariPrice', array($vari['preis']))) { ?>
- <span class="wpsg_vp_vari_preisinfo">(<?php echo wpsg_ff($vari['preis'], $this->get_option('wpsg_currency')); ?>)</span>
+ <?php /* Abfrage Preisanzeige nur für eingeloggte Benutzer START */?>
+ <?php if (($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn') && ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '1')) || ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '0')) { ?>
+
+ <?php if ($this->callMod('wpsg_mod_varianten', 'showVariPrice', array($vari['preis']))) { ?>
+ <span class="wpsg_vp_vari_preisinfo">(<?php echo wpsg_ff($vari['preis'], $this->get_option('wpsg_currency')); ?>)</span>
+ <?php } ?>
+
+ <?php }else{?>
+ <?php echo wpsg_translate(__('(Preise nur für eingeloggte Benutzer)', 'wpsg')); ?>
<?php } ?>
-
+ <?php /* Abfrage ENDE */ ?>
+
<?php if ($this->get_option("wpsg_vp_showpic") == "1" && isset($vari['showpic']) && $vari['showpic'] != false) { ?>
<span class="wpsg_vp_field_image">
@@ -136,15 +153,26 @@ <?php } // if Kein lager oder lager oder ausverkaufte anzeigen ?>
<?php } // if aktiv ?>
<?php } // for ?>
- <?php } // if radio ?>
+ <?php } // if radio ?>
+ <?php /* Checkboxen */ ?>
<?php if ($var['typ'] == "checkbox" && $var['aktiv'] == 1) { ?>
<label>
<input onchange="wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>);" type="hidden" value="0" name="wpsg_vp[<?php echo $k; ?>]" />
<input <?php echo (($this->view['wpsg_mod_varianten']['set'][$k] == '1')?'checked="checked"':''); ?> onchange="wpsg_vp_switch(<?php echo $this->getProduktId($this->view['data']['id']); ?>, <?php echo $this->view['product_index']; ?>);" type="checkbox" value="1" name="wpsg_vp[<?php echo $k; ?>]" />
- <?php if ($this->callMod('wpsg_mod_varianten', 'showVariPrice', array($var['preis']))) { ?>
- <span class="wpsg_vp_vari_preisinfo">(<?php echo wpsg_ff($var['preis'], $this->get_option('wpsg_currency')); ?>)</span>
+ <?php /* Abfrage Preisanzeige nur für eingeloggte Benutzer START */?>
+ <?php if (($this->callMod('wpsg_mod_kundenverwaltung', 'isLoggedIn') && ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '1')) || ($this->get_option('wpsg_mod_kundenverwaltung_preisAnzeige') == '0')) { ?>
+
+ <?php if ($this->callMod('wpsg_mod_varianten', 'showVariPrice', array($var['preis']))) { ?>
+ <span class="wpsg_vp_vari_preisinfo">(<?php echo wpsg_ff($var['preis'], $this->get_option('wpsg_currency')); ?>)</span>
+ <?php } ?>
+
+ <?php } else {?>
+ <?php echo wpsg_translate(__('(Preise nur für eingeloggte Benutzer)', 'wpsg')); ?>
<?php } ?>
+ <?php /* Abfrage ENDE */ ?>
+
+ <?php }?>
<?php if ($this->get_option("wpsg_vp_showpic") == "1" && $var['showpic'] != false) { ?>
<span class="wpsg_vp_field_image">
@@ -170,6 +198,6 @@ </div>
- <?php } } ?>
+ <?php } ?>
<?php } ?>
\ No newline at end of file |
