mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2025-03-03 13:29:24 +01:00
ShopexportFunctionCall to allow shop-specific function calls from the onlineshops module into the shopimporter php file
This commit is contained in:
parent
834588c347
commit
07b33638c6
@ -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('<div class="'.$result['messageclass'].'">'.$result['message'].'</div>');
|
||||
}
|
||||
$this->app->Location->execute('index.php?module=onlineshops&id='.$id.'&action='.$action.$msg);
|
||||
}
|
||||
}
|
||||
|
@ -883,6 +883,9 @@ class WidgetShopexport extends WidgetGenShopexport
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'hyperlink':
|
||||
$aktcol .= '<a class = "button" href="'.$val['href'].'">'.$val['name'].'</a>';
|
||||
break;
|
||||
case 'info':
|
||||
$aktcol .= $val['text'];
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user