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

#   Récupérer le nom de la catégorie dans la commande

##

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

Less More

- Posts: 318
- Thank you received: 1
-
-
-
- [](http://www.agence-web-inoak.fr)
-

15 years 5 days ago [\#31303](#31303) by [toffffe](/forum/user/4564-toffffe "View toffffe's Profile")  *[Récupérer le nom de la catégorie dans la commande](/forum/5-support-en-francais-french-support-/31303-recuperer-le-nom-de-la-categorie-dans-la-commande#31303 "Bonjour, Je voudrais savoir comment récupérer le nom de la catégorie d'un article dans le mail que je reçois. Merci")* was created by *[toffffe](/forum/user/4564-toffffe "View toffffe's Profile")*

Bonjour,
Je voudrais savoir comment récupérer le nom de la catégorie d'un article dans le mail que je reçois.
Merci

---

Agence web e-commerce spécialiste Hikashop

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMzEzMDMtcmVjdXBlcmVyLWxlLW5vbS1kZS1sYS1jYXRlZ29yaWUtZGFucy1sYS1jb21tYW5kZT90bXBsPW1hcmtkb3du) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

15 years 5 days ago [\#31320](#31320) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Récupérer le nom de la catégorie dans la commande](/forum/5-support-en-francais-french-support-/31303-recuperer-le-nom-de-la-categorie-dans-la-commande#31320 "Bonjour, Je voudrais savoir comment récupérer le nom de la catégorie d'un article dans le mail que je reçois. Merci")*

Bonjour,

Ca n'est pas évident. Il faut faire une requête SQL dans l'email:

$db =&amp; JFactory::getDBO();
$db-&gt;setQuery('SELECT b.category_name FROM #__hikashop_product_category AS a LEFT JOIN #_hikashop_category AS b ON a.category_id=b.category_id WHERE a.product_id = '.$item-&gt;product_id);
echo $db-&gt;loadResult();

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

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

Less More

- Posts: 318
- Thank you received: 1
-
-
-
- [](http://www.agence-web-inoak.fr)
-

15 years 4 days ago [\#31386](#31386) by [toffffe](/forum/user/4564-toffffe "View toffffe's Profile")  Replied by *[toffffe](/forum/user/4564-toffffe "View toffffe's Profile")* on topic *[Re: Récupérer le nom de la catégorie dans la commande](/forum/5-support-en-francais-french-support-/31303-recuperer-le-nom-de-la-categorie-dans-la-commande#31386 "Bonjour, Je voudrais savoir comment récupérer le nom de la catégorie d'un article dans le mail que je reçois. Merci")*

ok, alors sinon je retourne la question : dans 3 catégories différente je peux entrer le même nom de produit, et je ne rentre pas de description. Ma question c'est comment identifié quel produit a été commandé ?
Merci

---

Agence web e-commerce spécialiste Hikashop

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

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

Less More

- Posts: 318
- Thank you received: 1
-
-
-
- [](http://www.agence-web-inoak.fr)
-

15 years 4 days ago [\#31387](#31387) by [toffffe](/forum/user/4564-toffffe "View toffffe's Profile")  Replied by *[toffffe](/forum/user/4564-toffffe "View toffffe's Profile")* on topic *[Re: Récupérer le nom de la catégorie dans la commande](/forum/5-support-en-francais-french-support-/31303-recuperer-le-nom-de-la-categorie-dans-la-commande#31387 "Bonjour, Je voudrais savoir comment récupérer le nom de la catégorie d'un article dans le mail que je reçois. Merci")*

Est-ce que le "code" de la fiche produit peut servir à ça ?
Ou avez vous une autre solution
Merci

---

Agence web e-commerce spécialiste Hikashop

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMzEzMDMtcmVjdXBlcmVyLWxlLW5vbS1kZS1sYS1jYXRlZ29yaWUtZGFucy1sYS1jb21tYW5kZT90bXBsPW1hcmtkb3du) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86593
- Thank you received: 14334
-
-

15 years 4 days ago [\#31421](#31421) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: Récupérer le nom de la catégorie dans la commande](/forum/5-support-en-francais-french-support-/31303-recuperer-le-nom-de-la-categorie-dans-la-commande#31421 "Bonjour, Je voudrais savoir comment récupérer le nom de la catégorie d'un article dans le mail que je reçois. Merci")*

Vous pouvez utiliser le code oui, mais vous allez être limité sur les caractères utilisables pour le code.
Sinon, vous pourriez également utiliser un champs personnalisé de la table "produit".
Dans l'email il est facil d'afficher cela:
$class = hikashop_get('class.product');
$product = $class-&gt;get($item-&gt;product_id);
echo $product-&gt;CUSTOM_FIELD_COLUMN_NAME;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vMzEzMDMtcmVjdXBlcmVyLWxlLW5vbS1kZS1sYS1jYXRlZ29yaWUtZGFucy1sYS1jb21tYW5kZT90bXBsPW1hcmtkb3du) 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: 0.062 seconds

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