EmmKey Posted January 20, 2012 Report Share Posted January 20, 2012 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 More sharing options...
EmmKey Posted January 20, 2012 Author Report Share Posted January 20, 2012 Kann mir niemand helfen, es muss doch mehr als nur der Kundenname auszulesen sein.? Link to comment Share on other sites More sharing options...
morrisantik Posted February 27, 2012 Report Share Posted February 27, 2012 Danke für deine Tipps von oben. Habe es nun auch erfolgreich geschafft, den Kundennamen anzugeben. Die Kundennummer wäre auch noch super. Link to comment Share on other sites More sharing options...
GoriBoy Posted February 27, 2012 Report Share Posted February 27, 2012 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 Link to comment Share on other sites More sharing options...
oldbear Posted February 27, 2012 Report Share Posted February 27, 2012 geht auch direkt ohne php per Smarty ( weiss nicht mehr, wer das mal gepostet hat ): {$smarty.session.customer->customer_default_address.customers_firstname} Grüsse Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.