- WKE-Flow (Warenkorb empfangen): Sonepar-Integration komplett funktionsfähig inkl. PriceBasis-Handling, Namespace-Stripping, OCI-Unterstützung - WKS-Flow (Warenkorb senden): Lieferantenbestellung → Shop mit vorausgefüllten Artikeln, IDS Connect 2.0 XML-Format - Callback v2.0: NOLOGIN-Seite statt Redirect, 7 Datenquellen, Debug-Daten - URL-Handling: user_base_url-Tracking für Cross-Domain-Szenarien - Sicherheit: CSRF, HMAC-SHA256 Tokens, XXE-Schutz, PIN für WKS - Mock-Server für lokale Tests - Dokumentation mit Roadmap (fehlende Features, Möglichkeiten) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
94 lines
2.3 KiB
PHP
Executable file
94 lines
2.3 KiB
PHP
Executable file
<?php
|
|
/* Copyright (C) 2026 Eduard Wisch <data@data-it-solution.de>
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*/
|
|
|
|
/**
|
|
* \file idsconnect/lib/idsconnect.lib.php
|
|
* \ingroup idsconnect
|
|
* \brief Bibliotheksfunktionen für IDS Connect
|
|
*/
|
|
|
|
/**
|
|
* Admin-Tabs vorbereiten
|
|
*
|
|
* @return array
|
|
*/
|
|
function idsconnectAdminPrepareHead()
|
|
{
|
|
global $langs, $conf;
|
|
|
|
$langs->load("idsconnect@idsconnect");
|
|
|
|
$h = 0;
|
|
$head = array();
|
|
|
|
$head[$h][0] = dol_buildpath("/idsconnect/admin/setup.php", 1);
|
|
$head[$h][1] = $langs->trans("Settings");
|
|
$head[$h][2] = 'settings';
|
|
$h++;
|
|
|
|
$head[$h][0] = dol_buildpath("/idsconnect/admin/about.php", 1);
|
|
$head[$h][1] = $langs->trans("About");
|
|
$head[$h][2] = 'about';
|
|
$h++;
|
|
|
|
complete_head_from_modules($conf, $langs, null, $head, $h, 'idsconnect@idsconnect');
|
|
complete_head_from_modules($conf, $langs, null, $head, $h, 'idsconnect@idsconnect', 'remove');
|
|
|
|
return $head;
|
|
}
|
|
|
|
/**
|
|
* Großhändler-Karte Tabs vorbereiten
|
|
*
|
|
* @param object $object Großhändler-Objekt
|
|
* @return array
|
|
*/
|
|
function idsconnectSupplierPrepareHead($object)
|
|
{
|
|
global $langs, $conf;
|
|
|
|
$langs->load("idsconnect@idsconnect");
|
|
|
|
$h = 0;
|
|
$head = array();
|
|
|
|
$head[$h][0] = dol_buildpath("/idsconnect/supplier_card.php", 1).'?id='.$object->id;
|
|
$head[$h][1] = $langs->trans("IdsconnectSupplierCard");
|
|
$head[$h][2] = 'supplier';
|
|
$h++;
|
|
|
|
$head[$h][0] = dol_buildpath("/idsconnect/log_list.php", 1).'?supplier_id='.$object->id;
|
|
$head[$h][1] = $langs->trans("IdsconnectLog");
|
|
$head[$h][2] = 'log';
|
|
$h++;
|
|
|
|
return $head;
|
|
}
|
|
|
|
/**
|
|
* Testmodus-Banner ausgeben
|
|
*
|
|
* @return void
|
|
*/
|
|
function idsconnectShowTestModeBanner()
|
|
{
|
|
global $langs;
|
|
$langs->load("idsconnect@idsconnect");
|
|
|
|
if (getDolGlobalInt('IDSCONNECT_TESTMODE')) {
|
|
print '<div class="idsconnect-testmode-banner">';
|
|
print '<strong>'.$langs->trans("IdsconnectTestModeActive").'</strong> - ';
|
|
print $langs->trans("IdsconnectTestModeInfo");
|
|
print '</div>';
|
|
} else {
|
|
print '<div class="idsconnect-livemode-banner">';
|
|
print '<strong>'.$langs->trans("IdsconnectLiveModeWarning").'</strong>';
|
|
print '</div>';
|
|
}
|
|
}
|