templates/TEMPLATE/mail/english/contact_mail.txt
templates/TEMPLATE/mail/german/contact_mail.txt
templates/TEMPLATE/module/contact_us.html
templates/TEMPLATE/module/popup_name_help.html
templates/TEMPLATE/module/popup_number_help.html
templates/TEMPLATE/module/popup_serial_help.html
includes/filenames.php
Am Ende (vor dem ?>) einfügen
define('FILENAME_POPUP_CONTACT_HELP', 'popup_contact_help.php');
lang/english/english.php
Am Ende (vor dem ?>) einfügen und an die eigenen Bedürfnisse anpassen
define('ERROR_EMPTY_FIELDS', 'Please fill all fields marked with *!'); define('DEVICE_1', 'Device type 1'); define('DEVICE_2', 'Device type 2'); define('DEVICE_3', 'Device type 3');
lang/english/lang_english.conf
ca. Zeile 207
[contact_us] text_name = 'Your name:' text_email = 'Your e-mail addrese:' text_message = 'Your message:' text_success = 'Your enquiry has been submitted sucessfully.'danach einfügen
text_phone = 'Your phone number:' text_device_type = 'Device type:' text_device_name = 'Device name:' text_device_number = 'Device number:' text_device_serial = 'Device serial:' text_which_part = 'Which part:' text_common = 'Common request' text_part = 'Part request' text_personal = 'Personal offer' text_help = 'Help!' text_company = 'Company:' text_street1 = 'Street:' text_street2 = 'Additional address:' text_city = 'Postcode + city:' text_country = 'Country:' text_sec_code1 = 'SPAM-Protection' text_sec_code2 = 'Please type in all signs shown in the picture.'Am Ende einfügen und an die eigenen Bedürfnisse anpassen
[popup_name_help] title_help = 'Here can you find products name' text_help = 'Hier ihre Beschreibung einfügen' text_close = 'Close window [x]' [popup_number_help] title_help = 'Here can you find products number' text_help = 'Hier ihre Beschreibung einfügen' text_close = 'Close window [x]' [popup_serial_help] title_help = 'Here can you find products serial' text_help = 'Hier ihre Beschreibung einfügen' text_close = 'Close window [x]'
lang/german/german.php
Am Ende (vor dem ?>) einfügen und an die eigenen Bedürfnisse anpassen
define('ERROR_EMPTY_FIELDS', 'Bitte füllen sie alle mit * markierten Felder aus!'); define('DEVICE_1', 'Gerätetyp 1'); define('DEVICE_2', 'Gerätetyp 2'); define('DEVICE_3', 'Gerätetyp 3');
lang/german/lang_german.conf
ca. Zeile 210
[contact_us] text_name = 'Ihr Name:' text_email = 'Ihre Email-Adresse:' text_message = 'Ihre Nachricht:' text_success = 'Ihre Anfrage wurde erfolgreich zu uns gesendet.'danach einfügen
text_phone = 'Ihre Telefonnummer:' text_device_type = 'Geräteart/-typ:' text_device_name = 'Gerätebezeichnung:' text_device_number = 'Geräteteile-Nr:' text_device_serial = 'Werk-/Seriennummer:' text_which_part = 'Welches Ersatzteil:' text_common = 'Allgemeine Frage' text_part = 'Ersatzteilanfrage' text_personal = 'Persönliches Angebot' text_help = 'Hilfe!' text_company = 'Firma:' text_street1 = 'Strasse + Hausnummer:' text_street2 = 'Adresszusatz:' text_city = 'PLZ + Ort:' text_country = 'Land:' text_sec_code1 = 'SPAM-Schutz' text_sec_code2 = 'Bitte die Zeichen aus der Grafik hier eintragen'Am Ende einfügen und an die eigenen Bedürfnisse anpassen
[popup_name_help] title_help = 'So finden sie den Produktnamen' text_help = 'Hier ihre Beschreibung einfügen' text_close = 'Fenster schliessen [x]' [popup_number_help] title_help = 'So finden sie die Produktnummer' text_help = 'Hier ihre Beschreibung einfügen' text_close = 'Fenster schliessen [x]' [popup_serial_help] title_help = 'So finden sie die Seriennummer' text_help = 'Hier ihre Beschreibung einfügen' text_close = 'Fenster schliessen [x]'
templates/TEMPLATE/stylesheet.css
Am Ende einfügen und den Wert background auf die Hintergrundfarbe der Seite anpassen
.contact2 {border: 0px none; background: #FFF;} .hidden { visibility: hidden; display: none; }
shop_content.php
Wenn die Datei bisher nicht modifiziert wurde, kann die dem Archiv beiliegende shop_content.php verwendet werden!
ca. Zeile 19
require ('includes/application_top.php');danach einfügen
require_once (DIR_FS_INC.'xtc_render_vvcode.inc.php');
ca. Zeile 56
$error = false; if (isset ($_GET['action']) && ($_GET['action'] == 'send')) { if (xtc_validate_email(trim($_POST['email']))) { xtc_php_mail($_POST['email'], $_POST['name'], CONTACT_US_EMAIL_ADDRESS, CONTACT_US_NAME, CONTACT_US_FORWARDING_STRING, $_POST['email'], $_POST['name'], '', '', CONTACT_US_EMAIL_SUBJECT, nl2br($_POST['message_body']), $_POST['message_body']);ersetzen durch
$list = array(array("id" => 1, "text" => DEVICE_1), array("id" => 2, "text" => DEVICE_2), array("id" => 3, "text" => DEVICE_3)); $error = false; if (isset ($_GET['action']) && ($_GET['action'] == 'send')) { if ($_POST['name']=='' || $_POST['email']=='' || $_POST['phone']=='' || ($_POST['question']=='part' && ($_POST['device_name']=='' || $_POST['device_number']=='' || $_POST['device_serial']=='' || $_POST['device_part']==''))) { $smarty->assign('error_message', ERROR_EMPTY_FIELDS); $error = true; } else { if ($_POST['vvcode']!='') { exit; } if (xtc_validate_email(trim($_POST['email'])) && $_POST['address'] == $_SESSION['vvcode']) { $absender = preg_replace( "/[^a-z0-9 !?:;,.\/_\-=+@#$&\*\(\)]/im", "", $_POST['email'] ); $absender = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $absender ); $nachricht = preg_replace( "/(content-type:|bcc:|cc:|to:|from:)/im", "", $_POST['message_body'] ); $smarty->assign('QUESTION', $_POST['question']); $smarty->assign('NAME', $_POST['name']); $smarty->assign('EMAIL', $_POST['email']); $smarty->assign('PHONE', $_POST['phone']); $smarty->assign('TEXT', $nachricht); $smarty->assign('COMPANY', $_POST['company']); $smarty->assign('STREET1', $_POST['street1']); $smarty->assign('STREET2', $_POST['street2']); $smarty->assign('CITY', $_POST['city']); $smarty->assign('COUNTRY', $_POST['country']); if ($_POST['question']=='part') { $smarty->assign('DEVICE_TYPE', $list[$_POST['device_type']-1]['text']); $smarty->assign('DEVICE_NAME', $_POST['device_name']); $smarty->assign('DEVICE_NUMBER', $_POST['device_number']); $smarty->assign('DEVICE_SERIAL', $_POST['device_serial']); $smarty->assign('WHICH_PART', $_POST['device_part']); } $smarty->caching = 0; $txt_mail = $smarty->fetch(CURRENT_TEMPLATE.'/mail/'.$_SESSION['language'].'/contact_mail.txt'); xtc_php_mail($absender, $_POST['name'], CONTACT_US_EMAIL_ADDRESS, CONTACT_US_NAME, CONTACT_US_FORWARDING_STRING, $_POST['email'], $_POST['name'], '', '', CONTACT_US_EMAIL_SUBJECT, nl2br($txt_mail), $txt_mail);
ca. Zeile 106
$smarty->assign('CONTACT_HEADING', $shop_content_data['content_title']);davor einfügen
}
ca. Zeile 127
$smarty->assign('FORM_ACTION', xtc_draw_form('contact_us', xtc_href_link(FILENAME_CONTENT, 'action=send&coID='.(int) $_GET['coID']))); $smarty->assign('INPUT_NAME', xtc_draw_input_field('name', ($error ? $_POST['name'] : $first_name))); $smarty->assign('INPUT_EMAIL', xtc_draw_input_field('email', ($error ? $_POST['email'] : $email_address))); $smarty->assign('INPUT_TEXT', xtc_draw_textarea_field('message_body', 'soft', 50, 15, $_POST[''])); $smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE)); $smarty->assign('FORM_END', '</form>');ersetzen durch
$smarty->assign('SELECT_DEVICE_TYPE', xtc_draw_pull_down_menu('device_type', $list)); $smarty->assign('JAVASCRIPT', "function toggleBox(szDivID) { var radio = document.forms['contact_us'].question[0].checked; if (document.layers) { // NN4+ if (!radio) { document.layers[szDivID].visibility = 'hide'; document.layers[szDivID].display = 'none'; document.layers[szDivID+'SD'].fontWeight = 'normal'; } else { document.layers[szDivID].visibility = 'show'; document.layers[szDivID].display = 'inline'; } } else if (document.getElementById) { // gecko(NN6) + IE 5+ var obj = document.getElementById(szDivID); if (!radio) { obj.style.visibility = 'hidden'; obj.style.display = 'none'; } else { obj.style.visibility = 'visible'; obj.style.display = 'inline'; } } else if (document.all) { // IE 4 if (!radio) { document.all[szDivID].style.visibility = 'hidden'; document.all[szDivID].style.display = 'none'; } else { document.all[szDivID].style.visibility = 'visible'; document.all[szDivID].style.display = 'inline'; } } } function popupWindow(url) { window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=450,height=280,screenX=150,screenY=150,top=150,left=150') } "); if ($_SESSION['customer_id']) { $customerQuery = xtc_db_query("SELECT customers_email_address, customers_telephone FROM " . TABLE_CUSTOMERS . " WHERE customers_id=" . $_SESSION['customer_id']); $customer = xtc_db_fetch_array($customerQuery); } $smarty->assign('FORM_ACTION', xtc_draw_form('contact_us', xtc_href_link(FILENAME_CONTENT, 'action=send&coID='.(int) $_GET['coID']))); $smarty->assign('COMMON_QUESTION', xtc_draw_radio_field('question', 'common', $_POST['question']=='common', 'onclick="javascript:toggleBox(\'parts\');"')); $smarty->assign('PART_QUESTION', xtc_draw_radio_field('question', 'part', (!isset($_POST['question']) || $_POST['question']=='part'), 'id="qpart" onclick="javascript:toggleBox(\'parts\');"')); $smarty->assign('PERSONAL_QUESTION', xtc_draw_radio_field('question', 'personal', $_POST['question']=='personal', 'onclick="javascript:toggleBox(\'parts\');"')); $smarty->assign('INPUT_NAME', xtc_draw_input_fieldNote(array('name' => 'name', 'text' => ' <span class="inputRequirement">*</span>'), ($error ? $_POST['name'] : $_SESSION['customer_first_name'] . " " . $_SESSION['customer_last_name']))); $smarty->assign('INPUT_EMAIL', xtc_draw_input_fieldNote(array('name' => 'email', 'text' => ' <span class="inputRequirement">*</span>'), ($error ? $_POST['email'] : $customer['customers_email_address']))); $smarty->assign('INPUT_PHONE', xtc_draw_input_fieldNote(array('name' => 'phone', 'text' => ' <span class="inputRequirement">*</span>'), ($error ? $_POST['phone'] : $customer['customers_telephone']))); $smarty->assign('INPUT_DEVICE_NAME', xtc_draw_input_fieldNote(array('name' => 'device_name', 'text' => ' <span class="inputRequirement">*</span>'), ($error ? $_POST['device_name'] : ''))); $smarty->assign('INPUT_DEVICE_NUMBER', xtc_draw_input_fieldNote(array('name' => 'device_number', 'text' => ' <span class="inputRequirement">*</span>'), ($error ? $_POST['device_number'] : ''))); $smarty->assign('INPUT_DEVICE_SERIAL', xtc_draw_input_fieldNote(array('name' => 'device_serial', 'text' => ' <span class="inputRequirement">*</span>'), ($error ? $_POST['device_serial'] : ''))); $smarty->assign('INPUT_DEVICE_PART', xtc_draw_input_fieldNote(array('name' => 'device_part', 'text' => ' <span class="inputRequirement">*</span>'), ($error ? $_POST['device_part'] : ''))); $smarty->assign('INPUT_TEXT', xtc_draw_textarea_field('message_body', 'soft', 50, 15, $_POST[''])); $smarty->assign('INPUT_COMPANY', xtc_draw_input_field('company', ($error ? $_POST['company'] : ''))); $smarty->assign('INPUT_STREET1', xtc_draw_input_field('street1', ($error ? $_POST['street1'] : ''))); $smarty->assign('INPUT_STREET2', xtc_draw_input_field('street2', ($error ? $_POST['street2'] : ''))); $smarty->assign('INPUT_CITY', xtc_draw_input_field('city', ($error ? $_POST['city'] : ''))); $smarty->assign('INPUT_COUNTRY', xtc_draw_input_field('country', ($error ? $_POST['country'] : ''))); $smarty->assign('BUTTON_SUBMIT', xtc_image_submit('button_continue.gif', IMAGE_BUTTON_CONTINUE)); $smarty->assign('FORM_END', '</form>'); $smarty->assign('HELP_LINK_NUMBER', 'javascript:popupWindow(\''.xtc_href_link(FILENAME_POPUP_CONTACT_HELP, 'help=number').'\')'); $smarty->assign('HELP_LINK_SERIAL', 'javascript:popupWindow(\''.xtc_href_link(FILENAME_POPUP_CONTACT_HELP, 'help=serial').'\')'); $smarty->assign('HELP_LINK_NAME', 'javascript:popupWindow(\''.xtc_href_link(FILENAME_POPUP_CONTACT_HELP, 'help=name').'\')'); $smarty->assign('VVIMG', '<img src="'.xtc_href_link(FILENAME_DISPLAY_VVCODES).'" alt="" />'); $smarty->assign('INPUT_CODE', xtc_draw_input_fieldNote(array('name' => 'address', 'text' => ' <span class="inputRequirement">*</span>'), '', 'size="6" maxlength="6"', 'text', false)); $smarty->assign('INPUT_CODE2', xtc_draw_input_field('vvcode', '', 'size="6" maxlength="6" class="contact2"', 'text', false));
Um das Dropdown anzupassen, muss in der shop_content.php, ca. Zeile 56 das Array $list angepasst bzw. erweitert werden sowie die hinzugefügten Sprachdefinitionen ergänzt werden.