Also wer es testen will:
Als erstes legst Du in der Datenbank in der Tabelle _bestellen eine neue Spalte an (am Besten ans Ende). Mit den Werten:
Name: track_url
Typ: VARCHAR
Länge: 75
Kollation: utf8_general_ci
Nun gehts in die Dateien.
In includes/functions.versandart.inc.php wird
$SQLString .= TABLE_VERSANDART . ".paket_url, ";
ergänzt, ca. Zeile 510.
- Code: Alles auswählen
$SQLString .= TABLE_VERSANDART_LANGU . ".name, ";
$SQLString .= "table_versandart_langu_standard.name AS standard_name, ";
$SQLString .= TABLE_VERSANDART . ".paket_url, ";
$SQLString .= TABLE_VERSANDARTGEWICHT . ".id AS gewichtstaffelid, ";
$SQLString .= TABLE_VERSANDARTGEWICHT . ".gewicht, ";
In includes/functions.warenkorb.inc.php wird
$WarenkorbDataArray["track_url"] = $VersandartObject->paket_url;
ergänzt, ca. Zeile 961.
- Code: Alles auswählen
if (!$VersandartObject->name) {
$WarenkorbDataArray["versandart_name"] = $VersandartObject->standard_name;
} else {
$WarenkorbDataArray["versandart_name"] = $VersandartObject->name;
}
$WarenkorbDataArray["track_url"] = $VersandartObject->paket_url;
$WarenkorbDataArray["versandart_id"] = $VersandartObject->versandartid;
$WarenkorbDataArray["versandart_gewicht"] = $GesamtGewicht;
In includesfunctions.mod.bestellungen.inc.php wird
$SQLString .= TABLE_BESTELLEN . ".track_url = '" . $WarenkorbDataArray["track_url"] . "', ";
ergänzt, ca. Zeile 570.
- Code: Alles auswählen
$SQLString .= TABLE_BESTELLEN . ".versandart_storno_netto = '" . $WarenkorbDataStorniertArray["versandart_preis_netto"] . "', ";
$SQLString .= TABLE_BESTELLEN . ".versandart_storno_brutto = '" . $WarenkorbDataStorniertArray["versandart_preis_brutto"] . "', ";
$SQLString .= TABLE_BESTELLEN . ".track_url = '" . $WarenkorbDataArray["track_url"] . "', ";
$SQLString .= TABLE_BESTELLEN . ".waehrung = '" . $WaehrungObject->symbol . "', ";
$SQLString .= TABLE_BESTELLEN . ".gewicht = '" . $WarenkorbDataArray["gesamtgewicht"] . "' ";
und in ca. Zeile 2910
$SQLString .= TABLE_BESTELLEN . ".track_url, ";
hinzugefügt.
- Code: Alles auswählen
$SQLString .= TABLE_BESTELLEN . ".zahlungsart_storno_brutto, ";
$SQLString .= TABLE_BESTELLEN . ".versandart_storno_netto, ";
$SQLString .= TABLE_BESTELLEN . ".versandart_storno_brutto, ";
$SQLString .= TABLE_BESTELLEN . ".track_url, ";
$SQLString .= "DATE_FORMAT(" . TABLE_BESTELLEN . ".auftragsbestaetigungdatum, '%d.%m.%Y') AS auftragsbestaetigungdatum_format ";
$SQLString .= "FROM " . TABLE_BESTELLEN . " ";
$SQLString .= "LEFT JOIN " . TABLE_BESTELLEN_STATUS . " ON " . TABLE_BESTELLEN . ".status = " . TABLE_BESTELLEN_STATUS . ".id ";
$SQLString .= "LEFT JOIN " . TABLE_BESTELLEN_STATUS_LANGU . " ON " . TABLE_BESTELLEN_STATUS . ".id = " . TABLE_BESTELLEN_STATUS_LANGU . ".bestellen_status_id";
In admin/bestellungen/bestellung_bearbeiten.php wird
$tpl_track_url = $BestellObject->track_url;
ergänzt, ca. Zeile 323.
- Code: Alles auswählen
$tpl_bestellcomments = $BestellObject->comments;
$tpl_bestelltestorder = $BestellObject->testorder;
$tpl_track_url = $BestellObject->track_url;
$temp_statuswechsel_array = GetBestellStatusFolgeStatusArray($BestellObject->status, $BestellObject->bezahlt != 0);
$temp_Bestellstatus_array = GetBestellStatusDataArray();
und in ca. Zeile 1197 die Paketnummer durch einen Link zum Versandunternehmer ersetzt.
<td><a href="<?php echo $tpl_track_url?><?php echo $tpl_paketnummerstring?>" target="_blank" ><?php echo $tpl_paketnummer?></a></td>
- Code: Alles auswählen
<?php if(RECHNUNGSWESEN) { ?>
<tr>
<td><?php echo $a_bs_paketnummer?>: </td>
<td><a href="<?php echo $tpl_track_url?><?php echo $tpl_paketnummerstring?>" target="_blank" ><?php echo $tpl_paketnummer?></a></td>
</tr>
<?php } ?>
In includes/functions.mail.inc.php wird
$PostArray["tpl_paketnummer"] = $BestellObject->paketnummer;
$PostArray["tpl_track_url"] = $BestellObject->track_url;
hinzugefügt, ca. Zeile 486.
- Code: Alles auswählen
// Versandart
$PostArray["tpl_versandart_name"] = $BestellObject->versandart_name;
$PostArray["tpl_versandart_preis"] = $BestellObject->versandart_preis_format_einfach;
$PostArray["tpl_paketnummer"] = $BestellObject->paketnummer;
$PostArray["tpl_track_url"] = $BestellObject->track_url;
// Rabatt
$PostArray["tpl_rabatt_name"] = $BestellObject->rabatt_name;
Und nun endlich ist der Trackingcode in
templates/standart/mail_html/faktura/versandbestaetigung.php
ca Zeile 3
- Code: Alles auswählen
<h1 class="infoHeadline"><?php echo $_POST["headline"]?></h1>
<p><?php echo $_POST["mailversandtext"]?><br>
Die Sendung ist mit <a href="<?php echo $_POST["tpl_track_url"]?><?php echo $_POST["tpl_paketnummer"]?>"><?php echo $_POST["tpl_versandart_name"]?></a> verschickt worden.</p>
<h1><?php echo $_POST["bestellinfo"]?></h1>
Hoffe die Beschreibung ist verständlich.
Gruß
manuengel