Hallo Sonho-do-Brasil
Vorschlag:
Für Shopversionen 1.x:In includes/contact_us.php
suche (ca. Zeile 16)
//included by shop_content.php
füge danach folgenden Code ein
define('DISPLAY_PRIVACY_CHECK','true'); suche (ca. Zeile 29)
if (trim($_POST['message_body']) == '') $err_msg .= ERROR_MSG_BODY
; füge danach folgenden Code ein
if (DISPLAY_PRIVACY_CHECK == 'true' && $_POST['privacy'] != 'privacy') $err_msg .= ENTRY_PRIVACY_ERROR;
suche (ca. Zeile 195)
$smarty->assign('INPUT_FAX', xtc_draw_input_field('fax', ($error ? $_POST['fax'] : $fax), 'size="30"'));
füge danach folgenden Code ein
if (DISPLAY_PRIVACY_CHECK == 'true') {
$smarty->assign('PRIVACY_CHECKBOX', xtc_draw_checkbox_field('privacy', 'privacy', $_POST['privacy']));
$smarty->assign('PRIVACY_LINK', $main->getContentLink(2, MORE_INFO, $request_type));
}
In templates/xtc5/module/contact_us.html
suche (ca. Zeilen ab 50)
<tr>
<td valign="top">{#text_message#}*</td>
<td width="59%">{$INPUT_TEXT}</td>
</tr>
füge danach folgenden Code ein
{if $PRIVACY_CHECKBOX}
<tr>
<td colspan="2">{$PRIVACY_CHECKBOX} <strong>{#text_privacy_accept#}</strong> {$PRIVACY_LINK}</td>
</tr>
{/if}
In lang/german/lang_german.conf
suche
[contact_us]
füge danach folgenden Code ein
text_privacy_accept = 'Ich akzeptiere Ihre Datenschutzrichtlinien.'
In lang/english/lang_english.conf
suche
[contact_us]
füge danach folgenden Code ein
text_privacy_accept = 'I accept your user agreement and privacy policy.'
Für Shopversionen 2.x zusätzlich bearbeiten:Die Idee von Hanspeter für Modified 2.0:
es muss dabei eine Änderung erfolgen:
in der contact_us.php nach ca. Zeile 46
if (trim($_POST['message_body']) == '') { $err_msg .= ERROR_MSG_BODY
; $error = true; } einfügen:
if (DISPLAY_PRIVACY_CHECK == 'true' && $_POST['privacy'] != 'privacy') {
$err_msg .= ENTRY_PRIVACY_ERROR;
$error = true;
}
Alles andere kann so bleiben und funktioniert..
Gruss
Hanspeter
[
EDIT Tomcraft 26.07.2016: Modul in
Beitrag 1 verlinkt.]
[
EDIT Tomcraft 27.07.2016: Erweiterung für Shopversion 2.x
eingefügt.]