summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Schmitzer <noreply@maennchen1.de>2017-03-09 15:35:57 +0000
committerDaniel Schmitzer <noreply@maennchen1.de>2017-03-09 15:35:57 +0000
commitea5a18c80886d82519151dc866789ea057d919c5 (patch)
tree282ec2d501d23993c0afba6f0206a5692251e61b
parent7c5fc67f06930ecdcaa950cda9a6a30c3ed285f2 (diff)
- Zentrale Funktion um zu prüfen ob ein Produkt gekauft werden kann oder ob seine Preise angezeigt werden dürfen
git-svn-id: https://[internal]/wordpress/plugins/wpsg4@6110 0d5edaf7-2b12-4e95-93f4-047927463d4b
-rw-r--r--views/produkttemplates/standard.phtml4
-rw-r--r--views/produkttemplates/standard_ajax.phtml2
-rw-r--r--views/produkttemplates/standard_mt.phtml2
3 files changed, 4 insertions, 4 deletions
diff --git a/views/produkttemplates/standard.phtml b/views/produkttemplates/standard.phtml
index 3f419a5..af3c3e3 100644
--- a/views/produkttemplates/standard.phtml
+++ b/views/produkttemplates/standard.phtml
@@ -197,8 +197,8 @@ if (!function_exists('is_plugin_active'))
<div class="wpsg_clear"></div>
<div class="wpsg_product_buttonarea">
- <div class="wpsg_product_buttons_add_basket">
- <?php if ($this->callMods('productForSale', array($this->view['data']['product_key'])) || ($this->hasMod('wpsg_mod_request') && $this->callMod('wpsg_mod_request', 'isRequestProduct', array($this->view['data']['id'])))) { ?>
+ <div class="wpsg_product_buttons_add_basket">
+ <?php if ($this->view['oProduct']->canOrder()) { ?>
<div class="wpsg_produkt_add_basket_wrapper">
<label class="wpsg_amount_label" for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?>:</label>
diff --git a/views/produkttemplates/standard_ajax.phtml b/views/produkttemplates/standard_ajax.phtml
index 2f73884..51f6065 100644
--- a/views/produkttemplates/standard_ajax.phtml
+++ b/views/produkttemplates/standard_ajax.phtml
@@ -163,7 +163,7 @@
</div>
- <?php if (!$this->hasMod('wpsg_mod_request') || $this->callMod('wpsg_mod_request', 'productForSale', array($this->view['data']['id']))) { ?>
+ <?php if ($this->view['oProduct']->canOrder()) { ?>
<input class="wpsg_button wpsg_add_basket wpsg_add_basket_<?php echo $this->getTemplateIndex(); ?>" type="submit" value="<?php echo __('In den Warenkorb', 'wpsg'); ?>" name="wpsg[submit]" />
<?php } ?>
diff --git a/views/produkttemplates/standard_mt.phtml b/views/produkttemplates/standard_mt.phtml
index 41bff33..632f7e3 100644
--- a/views/produkttemplates/standard_mt.phtml
+++ b/views/produkttemplates/standard_mt.phtml
@@ -212,7 +212,7 @@ if (!function_exists('is_plugin_active'))
<div class="wpsg_product_buttonarea">
<div class="wpsg_product_buttons_add_basket">
- <?php if ($this->callMods('productForSale', array($this->view['data']['product_key'])) || ($this->hasMod('wpsg_mod_request') && $this->callMod('wpsg_mod_request', 'isRequestProduct', array($this->view['data']['id'])))) { ?>
+ <?php if ($this->view['oProduct']->canOrder()) { ?>
<div class="wpsg_produkt_add_basket_wrapper">
<label class="wpsg_amount_label" for="wpsg_menge_<?php echo $this->getTemplateIndex(); ?>"><?php echo __('Anzahl', 'wpsg'); ?>:</label>