[Skip to main content](#vessel-content)

#   Afficher infos client (login ou email) sur facture

##

- **[jlhosch](/forum/user/2985-jlhosch "View jlhosch's Profile")**
- [![jlhosch's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/2985-jlhosch "View jlhosch's Profile") Topic Author
- [ Offline](/forum/user/2985-jlhosch)

Less More

- Posts: 40
- Thank you received: 0
-
-

15 years 3 weeks ago [\#26359](#26359) by [jlhosch](/forum/user/2985-jlhosch "View jlhosch's Profile")  *[Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#26359 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")* was created by *[jlhosch](/forum/user/2985-jlhosch "View jlhosch's Profile")*

Bonjour,

J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer.
Comment accéder à ces données (notamment à partir de la vue 'order/show' )?

Genev.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 3 weeks ago [\#26369](#26369) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#26369 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Comme cela:

$user =&amp; JFactory::getUser();
echo 'username: '.$user-&gt;username;
echo 'email: '.$user-&gt;email;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jlhosch](/forum/user/2985-jlhosch "View jlhosch's Profile")**
- [![jlhosch's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/2985-jlhosch "View jlhosch's Profile") Topic Author
- [ Offline](/forum/user/2985-jlhosch)

Less More

- Posts: 40
- Thank you received: 0
-
-

15 years 2 weeks ago [\#26886](#26886) by [jlhosch](/forum/user/2985-jlhosch "View jlhosch's Profile")  Replied by *[jlhosch](/forum/user/2985-jlhosch "View jlhosch's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#26886 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Merci ![:-)](/media/kunena/emoticons/9.png ":-)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jlhosch](/forum/user/2985-jlhosch "View jlhosch's Profile")**
- [![jlhosch's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/2985-jlhosch "View jlhosch's Profile") Topic Author
- [ Offline](/forum/user/2985-jlhosch)

Less More

- Posts: 40
- Thank you received: 0
-
-

15 years 2 weeks ago -  15 years 2 weeks ago [\#26896](#26896) by [jlhosch](/forum/user/2985-jlhosch "View jlhosch's Profile")  Replied by *[jlhosch](/forum/user/2985-jlhosch "View jlhosch's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#26896 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Bonjour,
Nicolas, ta solution fonctionne bien à partir du front-end, mais comme elle récupère le user courant, ce n'est pas applicable pour les shipping invoices et invoices depuis le back-end ; il faudrait récupérer les infos du client et non de l'utilisateur connecté.

as-tu une idée, là vite fait ![;-)](/media/kunena/emoticons/14.png ";-)") ?

à partir de la vue order/invoice du back-end donc

Last edit: 15 years 2 weeks ago by [jlhosch](/forum/user/2985-jlhosch "View jlhosch's Profile"). Reason: précision

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

15 years 2 weeks ago [\#26897](#26897) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#26897 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Comme cela:

$userClass = hikashop_get('class.user');
$user = $userClass-&gt;get($order-&gt;order_user_id);
echo 'username: '.$user-&gt;username;
echo 'email: '.$user-&gt;email;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[jlhosch](/forum/user/2985-jlhosch "View jlhosch's Profile")**
- [![jlhosch's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/2985-jlhosch "View jlhosch's Profile") Topic Author
- [ Offline](/forum/user/2985-jlhosch)

Less More

- Posts: 40
- Thank you received: 0
-
-

15 years 2 weeks ago [\#26898](#26898) by [jlhosch](/forum/user/2985-jlhosch "View jlhosch's Profile")  Replied by *[jlhosch](/forum/user/2985-jlhosch "View jlhosch's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#26898 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

nickel, merci beaucoup

Genev.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")**
- [![WebConseil's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13951-webconseil "View WebConseil's Profile")
- [ Offline](/forum/user/13951-webconseil)

Less More

- Posts: 138
- Thank you received: 2
-
-

13 years 4 months ago [\#109582](#109582) by [WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")  Replied by *[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#109582 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Bonjour,

J'ai repris ce code pour ajouter username et email sous l'adresse de livraison dans la facture dans order/invoice.php.
Mais je n'affiche que 2 champs vides...
Ce code est-il valable pour la dernière version d'Hikashop ?
Merci.

PS

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

13 years 4 months ago [\#109597](#109597) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#109597 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

order/invoice.php c'est comme cela qu'il faut faire:
$userClass = hikashop_get('class.user');
$user = $userClass-&gt;get($this-&gt;order-&gt;order_user_id);
echo 'username: '.$user-&gt;username;
echo 'email: '.$user-&gt;email;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")**
- [![WebConseil's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13951-webconseil "View WebConseil's Profile")
- [ Offline](/forum/user/13951-webconseil)

Less More

- Posts: 138
- Thank you received: 2
-
-

13 years 4 months ago -  13 years 4 months ago [\#109665](#109665) by [WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")  Replied by *[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#109665 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Bonjour,

Oui, c'est bien le code que j'avais noté.
Mais ça ne fonctionne pas...

J'ai inséré le code comme ceci : Code:

&lt;table width="100%"&gt; &lt;tr&gt; &lt;?php if($this-&gt;invoice_type=='full' &amp;&amp; !empty($this-&gt;element-&gt;billing_address)){?&gt; &lt;td&gt; &lt;fieldset class="adminform" id="htmlfieldset_billing"&gt; &lt;legend style="background-color: #FFFFFF;"&gt;&lt;?php echo JText::_('HIKASHOP_BILLING_ADDRESS'); ?&gt;&lt;/legend&gt; &lt;?php $this-&gt;setLayout('address_template'); $html = $this-&gt;loadTemplate(); foreach($this-&gt;element-&gt;fields as $field){ $fieldname = $field-&gt;field_namekey; $html=str_replace('{'.$fieldname.'}',$this-&gt;fieldsClass-&gt;show($field,$this-&gt;element-&gt;billing_address-&gt;$fieldname),$html); } echo str_replace("\n","&lt;br/&gt;\n",trim(str_replace("\n\n","\n",preg_replace('#{(?:(?!}).)*}#i','',$html)),"\n")); [b]/** * Affichage email + username */ $userClass = hikashop_get('class.user'); $user = $userClass-&gt;get($this-&gt;order-&gt;order_user_id); ?&gt; &lt;br/&gt; &lt;? echo 'username: '.$user-&gt;username;?&gt; &lt;br/&gt; &lt;? echo 'email: '.$user-&gt;email;[/b] ?&gt; &lt;/fieldset&gt; &lt;/td&gt; &lt;?php }?&gt; &lt;td&gt; &lt;?php if(!empty($this-&gt;element-&gt;order_shipping_id) &amp;&amp; !empty($this-&gt;element-&gt;shipping_address)){ ?&gt; &lt;fieldset class="adminform" id="htmlfieldset_shipping"&gt; &lt;legend style="background-color: #FFFFFF;"&gt;&lt;?php echo JText::_('HIKASHOP_SHIPPING_ADDRESS'); ?&gt;&lt;/legend&gt; &lt;?php if(empty($this-&gt;element-&gt;override_shipping_address)) { $this-&gt;setLayout('address_template'); $html = $this-&gt;loadTemplate(); foreach($this-&gt;element-&gt;fields as $field){ $fieldname = $field-&gt;field_namekey; $html=str_replace('{'.$fieldname.'}',$this-&gt;fieldsClass-&gt;show($field,$this-&gt;element-&gt;shipping_address-&gt;$fieldname),$html); } echo str_replace("\n","&lt;br/&gt;\n",trim(str_replace("\n\n","\n",preg_replace('#{(?:(?!}).)*}#i','',$html)),"\n")); } else { echo $this-&gt;element-&gt;override_shipping_address; } ?&gt; &lt;/fieldset&gt; &lt;?php } ?&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;

et j'obtiens l'affichage en pièce jointe.
Si vous pouvez m'aidez à comprendre, je vous en remercie d'avance.
Cordialement.

PS

- [ ![fact&#95;ciels.JPG](/forum/attachment/10697) ](/forum/attachment/10697 "fact&#95;ciels.JPG") [ ](/forum/attachment/10697?download=1 "fact&#95;ciels.JPG")

Last edit: 13 years 4 months ago by [Jerome](/forum/user/80-jerome "View Jerome's Profile"). Reason: using code tag instead quote tag

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

13 years 4 months ago [\#109669](#109669) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#109669 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Bonjour,

Essayez avec $this-&gt;element-&gt;order-&gt;order_user_id au lieu de $this-&gt;order-&gt;order_user_id

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")**
- [![WebConseil's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13951-webconseil "View WebConseil's Profile")
- [ Offline](/forum/user/13951-webconseil)

Less More

- Posts: 138
- Thank you received: 2
-
-

13 years 4 months ago [\#109672](#109672) by [WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")  Replied by *[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#109672 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Merci, mais aucun changement dans l'affichage avec ce changement...

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

13 years 4 months ago [\#109677](#109677) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#109677 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Bonjour,

Essayez avec $this-&gt;element-&gt;order_user_id au lieu de $this-&gt;order-&gt;order_user_id

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")**
- [![WebConseil's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13951-webconseil "View WebConseil's Profile")
- [ Offline](/forum/user/13951-webconseil)

Less More

- Posts: 138
- Thank you received: 2
-
-

13 years 4 months ago [\#109681](#109681) by [WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")  Replied by *[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#109681 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Bonjour,

Non plus ! Merci pour votre aide collective !
Ci-dessous le code modifié pour vous assurer que je le fais correctement

> /\*\*
> \* Affichage email + username
> \*/
> $userClass = hikashop\_get('class.user');
> $user = $userClass-&gt;get($this-&gt;element-&gt;order\_user\_id); ?&gt;
> &lt;br/&gt;
> &lt;? echo 'username: '.$user-&gt;username;?&gt;
> &lt;br/&gt;
> &lt;? echo 'email: '.$user-&gt;email;
> ?&gt;

On ne devrait pas être très loin de la solution.
Cdlt.

PS

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

13 years 4 months ago [\#109745](#109745) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#109745 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Mmm. Cela devrait marcher pourtant.

Essayez voir ceci:
echo 'username: '.$this-&gt;order-&gt;customer-&gt;username;
echo 'email: '.$this-&gt;order-&gt;customer-&gt;email;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")**
- [![WebConseil's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13951-webconseil "View WebConseil's Profile")
- [ Offline](/forum/user/13951-webconseil)

Less More

- Posts: 138
- Thank you received: 2
-
-

13 years 4 months ago [\#109752](#109752) by [WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")  Replied by *[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#109752 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Et bien non, les champs restent vides !

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

13 years 4 months ago [\#109789](#109789) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#109789 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Je ne vois pas comment c'est possible.
Cela fonctionne comme il faut chez moi.
Soit vous n'éditez pas le fichier pour le bon template, soit votre commande n'a pas d'utilisateur joomla attaché.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")**
- [![WebConseil's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13951-webconseil "View WebConseil's Profile")
- [ Offline](/forum/user/13951-webconseil)

Less More

- Posts: 138
- Thank you received: 2
-
-

13 years 4 months ago [\#109815](#109815) by [WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")  Replied by *[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#109815 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Bonjour,

Je suis totalement sûr de travailler sur le fichier du bon template (bluestork en l'occurence) car j'y ai fait hier aussi plusieurs modifs de mise en page qui sont visibles.
Je ne comprends pas cette notion d'"utilisateur Joomla attaché" : les clients ne sont pas enregistré sur Joomla préalablement ; ils donnent leurs coordonnées lors du passage en caisse, mais ne sont pas enregistrés en tant qu'utilisateurs du CMS...
Mais bon, on récupère leur nom, adresse, téléphone... dans la facture, je ne comprends pas comment on ne peut pas récupérer leur email qui a été obligatoirement saisi au même moment, dans le même formulaire.
Merci.
Cordialement.

PS

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86289
- Thank you received: 14266
-
-

13 years 4 months ago [\#109848](#109848) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#109848 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Bonjour,

Mais du coup c'est normal que cela ne fonctionne pas si ce ne sont pas des utilisateurs joomla...
Les différents codes que j'ai proposés récupère l'email et le nom d'utilisateur de joomla.
Si vos clients n'ont pas d'utilisateur joomla, il n'est pas possible d'afficher leur nom d'utilisateur vu qu'il n'ont pas d'utilisateur...
Et pour l'email, c'est l'email dans HikaShop qu'il faut afficher et non celui de l'utilisateur joomla.
C'est donc le code suivant qu'il faudra utiliser:
echo 'email: '.$this-&gt;order-&gt;customer-&gt;user_email;

The following user(s) said Thank You: [WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")**
- [![WebConseil's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13951-webconseil "View WebConseil's Profile")
- [ Offline](/forum/user/13951-webconseil)

Less More

- Posts: 138
- Thank you received: 2
-
-

13 years 4 months ago [\#109896](#109896) by [WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")  Replied by *[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#109896 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

Bonjour,

Ca va tout de suite mieux !
Comme quoi ce n'est pas toujours bon de glâner du code par ci par là quand on ne le comprend pas.
Merci pour votre aide.
Cordialement.

PS

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")**
- [![WebConseil's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/13951-webconseil "View WebConseil's Profile")
- [ Offline](/forum/user/13951-webconseil)

Less More

- Posts: 138
- Thank you received: 2
-
-

13 years 4 months ago [\#109921](#109921) by [WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")  Replied by *[WebConseil](/forum/user/13951-webconseil "View WebConseil's Profile")* on topic *[Re: Afficher infos client (login ou email) sur facture](/forum/5-support-en-francais-french-support-/26359-afficher-infos-client-login-ou-email-sur-facture#109921 "Bonjour,  J'aimerais pouvoir rappeler au client son login et/ou son email sur les documents qu'il reçoit ou peut imprimer. Comment accéder à ces données (notamment à partir de la vue 'order/show' )?  Genev.")*

J'abuse sûrement, mais de la même façon j'aimerai "récupérer" :
- n° de la la commande
- date de la commande
- la date de la facture (j'ai trouvé seul pour le n° de la facture !!)
Merci d'avance pour le gain de temps.
Cordialement.

PS

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMjYzNTktYWZmaWNoZXItaW5mb3MtY2xpZW50LWxvZ2luLW91LWVtYWlsLXN1ci1mYWN0dXJlP3N0YXJ0PTAmdG1wbD1tYXJrZG93bg==) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 3.192 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
