Jump to content
xt:Commerce Community Forum

Kundennummer nach Login


EmmKey

Recommended Posts

Hallo Zusammen,

nachdem ich es mit Hilfe des Forums geschaft habe, nach einem Login den Namen des Angemeldeten Users anzuzeigen, verzweifel ich an der Kundennummer.

In meinen Emailbestätigungen an den Kunden nach einer Bestellung wird diese über

"<td colspan="2" width="360" style="font-size:11px;">Kundennummer: <b>{$order_data.customers_cid}</b></td>" hin.

Wie bekomme ich das aber jetut in meiner box_loginbox.html angezeigt.

Mein code ist der folgende:

<h2 class="boxheader">{txt key=TEXT_BOX_TITLE_LOGIN}</h2>
<div class="boxbody">
{if $status == 1}


<p>Sie sind angemeldet als:<br><b>
{php}
$vorname = $_SESSION['customer']->customer_default_address['customers_firstname'];
$Nachname = $_SESSION['customer']->customer_default_address['customers_lastname'];
$Anrede = $_SESSION['customer']->customer_default_address['customers_gender'];

if($Anrede = m){
$Anrede="Herr";
}
if($Anrede == f){
$Anrede="Frau";
}
if($Anrede == c){
$Anrede="Firma";
}
if(empty($Nachname)){
echo "<span style=\"font-size:11px\">Willkommen Gast<br />";
} else {
echo "$Anrede $vorname $Nachname<br />";
}
{/php}


{$kundenvorname}
{$kundennachname}</b>
{if $customer_data.account_type == 0}

{else}
Sie sind als Gast eingeloggt.
{/if}<br />
<br/>
<a href="{link page='customer' paction='logoff' conn=SSL}">{button text=$smarty.const.TEXT_LOGOFF file='logoff4.gif'}</a></p>

{else}
{form type=form name=create_account action='customer' paction='login' link_params=getParams method=post conn=SSL}
{form type=hidden name=action value=login}
{form type=hidden name=link_target value=index}

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>{txt key=text_email}:</td>
</tr>
<tr>
<td>{form type=text name=email maxlength='50' style='width:170px;'}</td>
</tr>
<tr>
<td>{txt key=text_password}:</td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>{form type=password name=password maxlength='30' style='width:80px;'}</td>
<td>{button text=$smarty.const.BUTTON_LOGIN file='login.gif' type='form'}</td>
</tr>
</table></td>
</tr>
<tr>
<td ><div class="hr"></div><a href="{link page='customer' paction='password_reset' conn=SSL}">{txt key=text_link_lostpassword}</a></td>
</tr>
</table>

{form type=formend}
{/if}
</div>
[/PHP]

Ich habe es so versucht.....

[PHP]<h2 class="boxheader">{txt key=TEXT_BOX_TITLE_LOGIN}</h2>
<div class="boxbody">
{if $status == 1}


<p>Sie sind angemeldet als:<br><b>
{php}
$vorname = $_SESSION['customer']->customer_default_address['customers_firstname'];
$Nachname = $_SESSION['customer']->customer_default_address['customers_lastname'];
$Anrede = $_SESSION['customer']->customer_default_address['customers_gender'];
$kundennr = $_SESSION['customer']->customer_default_address['customers_cid'];
if($Anrede = m){
$Anrede="Herr";
}
if($Anrede == f){
$Anrede="Frau";
}
if($Anrede == c){
$Anrede="Firma";
}
if(empty($Nachname)){
echo "<span style=\"font-size:11px\">Willkommen Gast<br />";
} else {
echo "$Anrede $vorname $Nachname<br /> $kundennr";
}
{/php}


{$kundenvorname}
{$kundennachname}</b>
{if $customer_data.account_type == 0}

{else}
Sie sind als Gast eingeloggt.
{/if}<br />
<br/>
<a href="{link page='customer' paction='logoff' conn=SSL}">{button text=$smarty.const.TEXT_LOGOFF file='logoff4.gif'}</a></p>

{else}
{form type=form name=create_account action='customer' paction='login' link_params=getParams method=post conn=SSL}
{form type=hidden name=action value=login}
{form type=hidden name=link_target value=index}

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>{txt key=text_email}:</td>
</tr>
<tr>
<td>{form type=text name=email maxlength='50' style='width:170px;'}</td>
</tr>
<tr>
<td>{txt key=text_password}:</td>
</tr>
<tr>
<td><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td>{form type=password name=password maxlength='30' style='width:80px;'}</td>
<td>{button text=$smarty.const.BUTTON_LOGIN file='login.gif' type='form'}</td>
</tr>
</table></td>
</tr>
<tr>
<td ><div class="hr"></div><a href="{link page='customer' paction='password_reset' conn=SSL}">{txt key=text_link_lostpassword}</a></td>
</tr>
</table>

{form type=formend}
{/if}
</div>
[/PHP]

Kann mir jemand sagen was ich falsch mache?

Gruß

Link to comment
Share on other sites

  • 1 month later...

Archived

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

×
  • Create New...