Jump to content
xt:Commerce Community Forum
Sign in to follow this  
EmmKey

Kundennummer nach Login

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ß

Share this post


Link to post
Share on other sites

bei mir funzt es so..


{php}
$kdnr = $_SESSION['customer']->customer_info[customers_cid];
$kdonline = $_SESSION['customer']->customers_id;
if ($kdonline != '0')
{
echo "Kd.Nr.: $kdnr";
}
{/php}
[/PHP]

gruß

GoriBoy

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...