,
* Kundengruppen-Freischaltung). Besucher (Gruppe 100) sehen die Gast-Zahlarten, weil sie
* als Gast bestellen; Haendler ihr B2B-Versandgebiet. Bankeinzug/Rechnung nur, wenn der
* angemeldete Kunde dafuer freigeschaltet ist (wie in content_cash_desk_neu.tpl).
*/
private function zahlarten_liste() {
try {
include_once './core/payment_method.class.php';
$group = (int)$this->base_object->customer_group->id;
if ($group <= 0 || $group == 100) {
$group = 103; // Gast
}
$area = ($group == 101) ? 30 : 1; // Deutschland-B2B / Deutschland-B2C
$pm_object = new Payment_method($this->base_object);
$all = $pm_object->getMethodsForGroup($group, -1, $area);
$customer = $this->base_object->customer;
$list = array();
foreach ((array)$all as $pm) {
if (!isset($pm->activeType) || $pm->activeType <= 0) {
continue;
}
if ($pm->helperjoinkey == 'be' && empty($customer->direct_debit_active)) {
continue;
}
if ($pm->helperjoinkey == 'r' && empty($customer->rechnung_active)) {
continue;
}
$list[] = $pm;
}
$this->layout_object->assign('zahlarten', $list);
$this->layout_object->assign('zahlarten_gruppe', $group);
return $this->layout_object->_fetch('content_box_zahlarten.tpl');
} catch (Throwable $e) {
error_log('zahlarten_liste: '.$e->getMessage());
return '';
}
}
private function banner($structure_id, $block) {
$config = array();
eval($block->configuration);
$block->configuration = $config;
$this->layout_object->assign('block', $block);
return $this->layout_object->_fetch('content_box_banner.tpl');
}
private function slider($structure_id, $block) {
// get config
$quantity = (Config::has_key('slider_items') && Config::is_set('slider_items')) ? Config::get_value('slider_items') : 10;
$sort = ($this->base_object->config->shopConfiguration['sort_item_list_by']) ? $this->base_object->config->shopConfiguration['sort_item_list_by'] : 'number_up';
$structure_object = new Structure($this->base_object);
$structure_content = $structure_object->get_by_id($block->content);
$item_object = new Item($this->base_object);
if ($structure_content->item_type) {
$article_list = $item_object->get_item_list_by_type($block->content, $quantity, 1, true, false, $sort);
} else {
$article_list = $item_object->get_item_list_new($block->content, $quantity,1, true, false, $sort);
}
//echo '';print_r($article_list);exit();
$this->layout_object->assign('shopArticles', $article_list);
$this->layout_object->assign('block', $block);
return $this->layout_object->_fetch('content_box_slider.tpl');
}
private function manufacturers($structure_id, $block) {
$this->layout_object->assign('manufacturers', Manufacturer::get_all_active_static());
return $this->layout_object->_fetch('content_box_manufacturers.tpl');
}
}