add configparamater for shop based order fields
This commit is contained in:
parent
63b26c1231
commit
8504264fcd
@ -24,7 +24,11 @@ $aLang = array(
|
|||||||
'charset' => 'UTF-8',
|
'charset' => 'UTF-8',
|
||||||
'SHOP_MODULE_GROUP_d3xrechnung' => 'Einstellungen',
|
'SHOP_MODULE_GROUP_d3xrechnung' => 'Einstellungen',
|
||||||
'SHOP_MODULE_d3xrechnung_PATH_GENERATOR' => 'URL Generator xRechnung',
|
'SHOP_MODULE_d3xrechnung_PATH_GENERATOR' => 'URL Generator xRechnung',
|
||||||
|
'HELP_SHOP_MODULE_d3xrechnung_PATH_GENERATOR' => 'Beispiel: https://xrechnung.DOMAIN.TLD/xrechnung.php',
|
||||||
'SHOP_MODULE_d3xrechnung_HTACCESS_USER' => '.htaccess - User',
|
'SHOP_MODULE_d3xrechnung_HTACCESS_USER' => '.htaccess - User',
|
||||||
'SHOP_MODULE_d3xrechnung_HTACCESS_PASSWORD' => '.htaccess - Password',
|
'SHOP_MODULE_d3xrechnung_HTACCESS_PASSWORD' => '.htaccess - Password',
|
||||||
'SHOP_MODULE_d3xrechnung_EXPORT_FOLDER' => 'Order für Export, Beispiel: export/xml (eventuell Unterordner anlegen und beschreibbar machen!)',
|
'SHOP_MODULE_d3xrechnung_EXPORT_FOLDER' => 'Order für Export',
|
||||||
|
'HELP_SHOP_MODULE_d3xrechnung_EXPORT_FOLDER' => 'Beispiel: export/xml<br><strong>eventuell Unterordner anlegen und beschreibbar machen!</strong>',
|
||||||
|
'SHOP_MODULE_d3xrechnung_BT_ORDERFIELDS' => 'Zuordnung Felder aus oxorder zu bestimmten BT-Felder',
|
||||||
|
'HELP_SHOP_MODULE_d3xrechnung_BT_ORDERFIELDS' => 'Beispiel: BT13 => oxremark',
|
||||||
);
|
);
|
@ -74,6 +74,12 @@ Der Pfad und Zugangsschutz zum Generator wird in der Konfiguration des Moduls hi
|
|||||||
'type' => 'str',
|
'type' => 'str',
|
||||||
'value' => 'export/xml'
|
'value' => 'export/xml'
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
'group' => 'd3xrechnung',
|
||||||
|
'name' => 'd3xrechnung_BT_ORDERFIELDS',
|
||||||
|
'type' => 'aarr',
|
||||||
|
'value' => ''
|
||||||
|
],
|
||||||
],
|
],
|
||||||
'blocks' => array(
|
'blocks' => array(
|
||||||
array(
|
array(
|
||||||
|
@ -97,10 +97,25 @@ MSQL;
|
|||||||
$OXID = $aParameter['OXID'];
|
$OXID = $aParameter['OXID'];
|
||||||
$sTable = Registry::get(TableViewNameGenerator::class)->getViewName('oxorder');
|
$sTable = Registry::get(TableViewNameGenerator::class)->getViewName('oxorder');
|
||||||
$Db = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC);
|
$Db = DatabaseProvider::getDb(DatabaseProvider::FETCH_MODE_ASSOC);
|
||||||
$sQuery = "SELECT * FROM ".$sTable." WHERE OXID= ?";
|
$sSqlAdd = $this->getAddOrderFieldsSql();
|
||||||
|
$sQuery = "SELECT * {$sSqlAdd} FROM ".$sTable." WHERE OXID= ?";
|
||||||
|
|
||||||
return $Db->getRow($sQuery,[$OXID]);
|
return $Db->getRow($sQuery,[$OXID]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getAddOrderFieldsSql()
|
||||||
|
{
|
||||||
|
$myConfig = Registry::getConfig();
|
||||||
|
$aFields = $myConfig->getConfigParam("d3xrechnung_BT_ORDERFIELDS");
|
||||||
|
$sFields = '';
|
||||||
|
foreach ($aFields as $Key => $Field)
|
||||||
|
{
|
||||||
|
$sFields .=', '.$Field. ' AS '.strtoupper($Key);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $sFields;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param array $aParameter
|
* @param array $aParameter
|
||||||
|
Loading…
x
Reference in New Issue
Block a user