Jump to content
xt:Commerce Community Forum

loginbox ändern wenn eingeloggt


Recommended Posts

Moin,

würde gerne die Loginbox bei nicht eingeloggtem Zustand mit den Inputs füllen und sobal man eingeloggt ist mit der {greeting}-message. (XTC 3.04)

krieg es leider nicht richtig hin und finde den Fehler nicht. Hier mein Code.

{config_load file="$language/lang_$language.conf" section="boxes"}

{$FORM_ACTION}
<table width="262">
{php}
if (isset($_SESSION['customer_id'])) {
{/php}

<tr><td>{$TEXT_LOGGEDIN}</td></tr>

{php}
} else {
{/php}
<tr>
<td align="right">{#text_email#}: </td>
<td>{$FIELD_EMAIL}</td>
</tr>
<tr>
<td align="right">{#text_pwd#}: </td>
<td>{$FIELD_PWD}</td>
</tr>
<tr>
<td align="right"><a href="{$LINK_LOST_PASSWORD}">{#text_password_forgotten#}</a> </td>
<td>{$BUTTON}</td>
</tr>
{php}
}
{/php}
</table>
{$FORM_END}[/HTML]

[PHP]$box_smarty = new smarty;
$box_smarty->assign('tpl_path', 'templates/'.CURRENT_TEMPLATE.'/');
$box_content = '';
require_once (DIR_FS_INC.'xtc_image_submit.inc.php');
require_once (DIR_FS_INC.'xtc_draw_password_field.inc.php');

if (!xtc_session_is_registered('customer_id')) {

$box_smarty->assign('FORM_ACTION', '<form id="loginbox" method="post" action="'.xtc_href_link(FILENAME_LOGIN, 'action=process', 'SSL').'">');
$box_smarty->assign('FIELD_EMAIL', xtc_draw_input_field('email_address', '', 'id="loginBoxInputEmail" size="25" maxlength="50"'));
$box_smarty->assign('FIELD_PWD', xtc_draw_password_field('password', '', 'id="loginBoxInputPassword" size="10" maxlength="30"'));
$box_smarty->assign('BUTTON', xtc_image_submit('button_login_small.gif', IMAGE_BUTTON_LOGIN));
$box_smarty->assign('LINK_LOST_PASSWORD', xtc_href_link(FILENAME_PASSWORD_DOUBLE_OPT, '', 'SSL'));
$box_smarty->assign('FORM_END', '</form>');

$box_smarty->assign('BOX_CONTENT', $loginboxcontent);

$box_smarty->caching = 0;
$box_smarty->assign('language', $_SESSION['language']);
$box_loginbox = $box_smarty->fetch(CURRENT_TEMPLATE.'/boxes/box_login.html');
$smarty->assign('box_LOGIN', $box_loginbox);
} else {
$box_smarty->assign('TEXT_LOGGEDIN', $greeting);
}
?>[/PHP]

Bin mir auch nicht sicher ob ich in der loginbox.php die Variable $greeting zur Verfügung habe, aber selbst jeder beliebig eingesetzter Text wird nicht angezeigt.

Vielleicht kann jemand helfen.

Danke

Gruß

Lars

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...