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

#   userid dans cart.php

##

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

Less More

- Posts: 2697
- Thank you received: 74
-
-

14 years 7 months ago -  14 years 7 months ago [\#45373](#45373) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  *[userid dans cart.php](/forum/5-support-en-francais-french-support-/45373-userid-dans-cart-php#45373 "bonjour  comment je peux recuperer l'id de l'utilisateur dans cart.php ? l'id de celui qui a le cart et passe commande  autrement qu'avec $user =&amp; JFactory::getUser(); $userid = $user-&gt;get('id');  merci")* was created by *[erickb](/forum/user/4069-erickb "View erickb's Profile")*

bonjour

comment je peux recuperer l'id de l'utilisateur dans cart.php ? l'id de celui qui a le cart et passe commande

autrement qu'avec
$user =&amp; JFactory::getUser();
$userid = $user-&gt;get('id');

merci

Last edit: 14 years 7 months ago by [erickb](/forum/user/4069-erickb "View erickb's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNDUzNzMtdXNlcmlkLWRhbnMtY2FydC1waHA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86321
- Thank you received: 14279
-
-

14 years 7 months ago [\#45425](#45425) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: userid dans cart.php](/forum/5-support-en-francais-french-support-/45373-userid-dans-cart-php#45425 "bonjour  comment je peux recuperer l'id de l'utilisateur dans cart.php ? l'id de celui qui a le cart et passe commande  autrement qu'avec $user =&amp; JFactory::getUser(); $userid = $user-&gt;get('id');  merci")*

avec
$user = hikashop_loadUser(true);

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNDUzNzMtdXNlcmlkLWRhbnMtY2FydC1waHA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 2697
- Thank you received: 74
-
-

14 years 7 months ago [\#45435](#45435) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[Re: userid dans cart.php](/forum/5-support-en-francais-french-support-/45373-userid-dans-cart-php#45435 "bonjour  comment je peux recuperer l'id de l'utilisateur dans cart.php ? l'id de celui qui a le cart et passe commande  autrement qu'avec $user =&amp; JFactory::getUser(); $userid = $user-&gt;get('id');  merci")*

non ça plante
il faut sans doute importer une class mais tel quel ça marche pas

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNDUzNzMtdXNlcmlkLWRhbnMtY2FydC1waHA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86321
- Thank you received: 14279
-
-

14 years 7 months ago [\#45436](#45436) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: userid dans cart.php](/forum/5-support-en-francais-french-support-/45373-userid-dans-cart-php#45436 "bonjour  comment je peux recuperer l'id de l'utilisateur dans cart.php ? l'id de celui qui a le cart et passe commande  autrement qu'avec $user =&amp; JFactory::getUser(); $userid = $user-&gt;get('id');  merci")*

Cette fonction est dans le helper de base d'hikashop qui est chargé avant n'importe quelle vue d'hikashop.
Il n'y a pas de raison quelle ne soit pas définie.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNDUzNzMtdXNlcmlkLWRhbnMtY2FydC1waHA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 2697
- Thank you received: 74
-
-

14 years 7 months ago -  14 years 7 months ago [\#45438](#45438) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[Re: userid dans cart.php](/forum/5-support-en-francais-french-support-/45373-userid-dans-cart-php#45438 "bonjour  comment je peux recuperer l'id de l'utilisateur dans cart.php ? l'id de celui qui a le cart et passe commande  autrement qu'avec $user =&amp; JFactory::getUser(); $userid = $user-&gt;get('id');  merci")*

php_error.log

[31-Mar-2012 14:06:46] PHP Catchable fatal error: Object of class stdClass could not be converted to string in /www/sacapuce.biz/templates/shoes/html/com_hikashop/checkout/cart.php on line 16

$userid = hikashop_loadUser(true);

plante completement la page

Last edit: 14 years 7 months ago by [erickb](/forum/user/4069-erickb "View erickb's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNDUzNzMtdXNlcmlkLWRhbnMtY2FydC1waHA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 2697
- Thank you received: 74
-
-

14 years 7 months ago -  14 years 7 months ago [\#45440](#45440) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[Re: userid dans cart.php](/forum/5-support-en-francais-french-support-/45373-userid-dans-cart-php#45440 "bonjour  comment je peux recuperer l'id de l'utilisateur dans cart.php ? l'id de celui qui a le cart et passe commande  autrement qu'avec $user =&amp; JFactory::getUser(); $userid = $user-&gt;get('id');  merci")*

$userid = hikashop_loadUser(); marche sans le true
merci

Last edit: 14 years 7 months ago by [erickb](/forum/user/4069-erickb "View erickb's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNDUzNzMtdXNlcmlkLWRhbnMtY2FydC1waHA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86321
- Thank you received: 14279
-
-

14 years 7 months ago [\#45557](#45557) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: userid dans cart.php](/forum/5-support-en-francais-french-support-/45373-userid-dans-cart-php#45557 "bonjour  comment je peux recuperer l'id de l'utilisateur dans cart.php ? l'id de celui qui a le cart et passe commande  autrement qu'avec $user =&amp; JFactory::getUser(); $userid = $user-&gt;get('id');  merci")*

Ah oui c'est normal que ça plantait ![:)](/media/kunena/emoticons/3.png ":)")
Avec le true cela renvoi toutes les infos de l'utilisateur. Il suffisait de faire un $user-&gt;user_id ensuite. sinon, sans le true cela retourne l'id directement.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNDUzNzMtdXNlcmlkLWRhbnMtY2FydC1waHA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 2697
- Thank you received: 74
-
-

14 years 6 months ago [\#45813](#45813) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[Re: userid dans cart.php](/forum/5-support-en-francais-french-support-/45373-userid-dans-cart-php#45813 "bonjour  comment je peux recuperer l'id de l'utilisateur dans cart.php ? l'id de celui qui a le cart et passe commande  autrement qu'avec $user =&amp; JFactory::getUser(); $userid = $user-&gt;get('id');  merci")*

tres pratique
merci

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNDUzNzMtdXNlcmlkLWRhbnMtY2FydC1waHA/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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: 0.105 seconds

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

[](#top)
