From 07b33638c602299f0cd73278b2b520e943cc5252 Mon Sep 17 00:00:00 2001 From: OpenXE <> Date: Fri, 28 Feb 2025 16:13:35 +0100 Subject: [PATCH] ShopexportFunctionCall to allow shop-specific function calls from the onlineshops module into the shopimporter php file --- www/pages/onlineshops.php | 17 +++++++++++++++++ www/widgets/widget.shopexport.php | 3 +++ 2 files changed, 20 insertions(+) diff --git a/www/pages/onlineshops.php b/www/pages/onlineshops.php index 877379f5..59c304f2 100644 --- a/www/pages/onlineshops.php +++ b/www/pages/onlineshops.php @@ -264,6 +264,8 @@ INNER JOIN shopexport s ON $this->app->ActionHandler('artikellist', 'ShopexportArtikelList'); + $this->app->ActionHandler('functioncall', 'ShopexportFunctionCall'); + $this->app->erp->Headlines('Shopexport'); $this->app->ActionHandlerListen($app); } @@ -4994,4 +4996,19 @@ INNER JOIN shopexport s ON $this->logger->Log($level, 'Onlineshops (Shop '.$shopid.') '.$message, (array) $dump); } + public function ShopexportFunctionCall() + { + $id = (int)$this->app->Secure->GetGET('id'); + $function = $this->app->Secure->GetGET('function'); + $result = $this->app->remote->RemoteCommand($id, $function); + $action = $this->app->Secure->GetGET('redirect'); + $action = preg_replace('/[^a-z]/', '', $action); + if (!empty($result['message'])) { + if (empty($result['messageclass'])) { + $result['messageclass'] = 'info'; + } + $msg = '&msg='.$this->app->erp->base64_url_encode('
'.$result['message'].'
'); + } + $this->app->Location->execute('index.php?module=onlineshops&id='.$id.'&action='.$action.$msg); + } } diff --git a/www/widgets/widget.shopexport.php b/www/widgets/widget.shopexport.php index d731358f..a9df21c4 100644 --- a/www/widgets/widget.shopexport.php +++ b/www/widgets/widget.shopexport.php @@ -883,6 +883,9 @@ class WidgetShopexport extends WidgetGenShopexport } } break; + case 'hyperlink': + $aktcol .= ''.$val['name'].''; + break; case 'info': $aktcol .= $val['text']; break;