diff options
Diffstat (limited to 'views/warenkorb/ajaxDialog.phtml')
| -rw-r--r-- | views/warenkorb/ajaxDialog.phtml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/views/warenkorb/ajaxDialog.phtml b/views/warenkorb/ajaxDialog.phtml index fcb07e4..60043d6 100644 --- a/views/warenkorb/ajaxDialog.phtml +++ b/views/warenkorb/ajaxDialog.phtml @@ -78,6 +78,8 @@ <?php /* Zubehörprodukte START */?>
<?php if ($this->hasMod('wpsg_mod_relatedproducts') && $this->get_option('wpsg_mod_relatedproducts_showAjaxDialog') === '1') { ?>
<?php $arRelatedProducts = $this->callMod('wpsg_mod_relatedproducts', 'getRelatedProducts', array($this->getProduktID($this->view['product_key']))); ?>
+ <?php $limit = intval($this->get_option('wpsg_mod_relatedproducts_showAjaxDialogLimit')); if ($limit > 0 && is_array($arRelatedProducts)) $arRelatedProducts = array_slice($arRelatedProducts, 0, $limit); ?>
+ <?php $ajax_template = strval($this->get_option('wpsg_mod_relatedproducts_showAjaxDialogTemplate')); ?>
<?php if (wpsg_isSizedArray($arRelatedProducts)) { ?>
<div class="wpsg_ajaxdialog_relatedproducts">
<h3><?php echo __('Das könnte Ihnen auch gefallen:', 'wpsg'); ?></h3>
@@ -85,6 +87,9 @@ <div class="wpsg_clear"></div>
<?php foreach ($arRelatedProducts as $rp_data) { $product_data = $this->loadProduktArray($rp_data['product_id']); ?>
+ <?php if (($ajax_template !== '' && $ajax_template !== '0') || !in_array(strval($rp_data['template']??''), ['', '0'], true)) { ?>
+ <?php echo $this->callMod('wpsg_mod_relatedproducts', 'renderRelatedProduct', array(&$rp_data, $ajax_template)); ?>
+ <?php continue; } ?>
<div class="wpsg_ajaxdialog_productrow">
<h4><?php echo $this->getProductName($rp_data['product_id']); ?></h4>
|
