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

#   Recuperer le total et les produits dans un module

##

- **[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: 2704
- Thank you received: 74
-
-

14 years 1 week ago -  14 years 1 week ago [\#76630](#76630) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  *[Recuperer le total et les produits dans un module](/forum/5-support-en-francais-french-support-/75816-recuperer-le-total-et-les-produits-dans-un-module#76630 "Bonjour  Comment je recupere le total du panier TTC ( hors transport) dans un module ? ainsi que l'id des produits deja dans le panier ?  $class = hikashop&#95;get('class.cart'); ou $class = hikashop&#95;get('class.order');  ensuite $total = $class-&gt;get($this-&gt;element-&gt;???);  -----  Il me faut aussi dans le cart savoir le category&#95;id des produits  merci")* was created by *[erickb](/forum/user/4069-erickb "View erickb's Profile")*

Bonjour

Comment je recupere le total du panier TTC ( hors transport) dans un module ? ainsi que l'id des produits deja dans le panier ?

$class = hikashop_get('class.cart');
ou
$class = hikashop_get('class.order');

ensuite
$total = $class-&gt;get($this-&gt;element-&gt;???);

---

Il me faut aussi dans le cart savoir le category_id des produits

merci

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

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

14 years 1 week ago [\#76787](#76787) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Recuperer le total et les produits dans un module](/forum/5-support-en-francais-french-support-/75816-recuperer-le-total-et-les-produits-dans-un-module#76787 "Bonjour  Comment je recupere le total du panier TTC ( hors transport) dans un module ? ainsi que l'id des produits deja dans le panier ?  $class = hikashop&#95;get('class.cart'); ou $class = hikashop&#95;get('class.order');  ensuite $total = $class-&gt;get($this-&gt;element-&gt;???);  -----  Il me faut aussi dans le cart savoir le category&#95;id des produits  merci")*

Bonsoir,
Code:

$cartClass = hikashop_get('class.cart'); $cart = $cartClass-&gt;loadFullCart(true); // $cart-&gt;products // $cart-&gt;total

Cordialement,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNzU4MTYtcmVjdXBlcmVyLWxlLXRvdGFsLWV0LWxlcy1wcm9kdWl0cy1kYW5zLXVuLW1vZHVsZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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: 2704
- Thank you received: 74
-
-

14 years 1 week ago -  14 years 1 week ago [\#76799](#76799) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[Recuperer le total et les produits dans un module](/forum/5-support-en-francais-french-support-/75816-recuperer-le-total-et-les-produits-dans-un-module#76799 "Bonjour  Comment je recupere le total du panier TTC ( hors transport) dans un module ? ainsi que l'id des produits deja dans le panier ?  $class = hikashop&#95;get('class.cart'); ou $class = hikashop&#95;get('class.order');  ensuite $total = $class-&gt;get($this-&gt;element-&gt;???);  -----  Il me faut aussi dans le cart savoir le category&#95;id des produits  merci")*

echo $cart-&gt;total;  **je plante**

je le recupere avec
Code:

$cartClass = hikashop_get('class.cart'); $cart = $cartClass-&gt;loadFullCart(true); $fulltotal = $cart-&gt;full_total; $prices = $fulltotal-&gt;prices[0]-&gt;price_value;

il n'y a pas plus simple ?

merci

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

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

14 years 1 week ago [\#76842](#76842) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Recuperer le total et les produits dans un module](/forum/5-support-en-francais-french-support-/75816-recuperer-le-total-et-les-produits-dans-un-module#76842 "Bonjour  Comment je recupere le total du panier TTC ( hors transport) dans un module ? ainsi que l'id des produits deja dans le panier ?  $class = hikashop&#95;get('class.cart'); ou $class = hikashop&#95;get('class.order');  ensuite $total = $class-&gt;get($this-&gt;element-&gt;???);  -----  Il me faut aussi dans le cart savoir le category&#95;id des produits  merci")*

Bonsoir,

Il y a une variable "total" dans la fonction loadFullCart, je me suis basé rapidement sur le code de la fonction sans faire de test.
La récupération ne peut pas passer en dessous des 3 étapes suivantes : Code:

$cartClass = hikashop_get('class.cart'); $cart = $cartClass-&gt;loadFullCart(true); $price = $cart-&gt;full_total-&gt;prices[0]-&gt;price_value;

Cordialement,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNzU4MTYtcmVjdXBlcmVyLWxlLXRvdGFsLWV0LWxlcy1wcm9kdWl0cy1kYW5zLXVuLW1vZHVsZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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: 2704
- Thank you received: 74
-
-

14 years 1 week ago [\#76875](#76875) by [erickb](/forum/user/4069-erickb "View erickb's Profile")  Replied by *[erickb](/forum/user/4069-erickb "View erickb's Profile")* on topic *[Recuperer le total et les produits dans un module](/forum/5-support-en-francais-french-support-/75816-recuperer-le-total-et-les-produits-dans-un-module#76875 "Bonjour  Comment je recupere le total du panier TTC ( hors transport) dans un module ? ainsi que l'id des produits deja dans le panier ?  $class = hikashop&#95;get('class.cart'); ou $class = hikashop&#95;get('class.order');  ensuite $total = $class-&gt;get($this-&gt;element-&gt;???);  -----  Il me faut aussi dans le cart savoir le category&#95;id des produits  merci")*

merci

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzUtc3VwcG9ydC1lbi1mcmFuY2Fpcy1mcmVuY2gtc3VwcG9ydC0vNzU4MTYtcmVjdXBlcmVyLWxlLXRvdGFsLWV0LWxlcy1wcm9kdWl0cy1kYW5zLXVuLW1vZHVsZT90bXBsPW1hcmtkb3du) 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.065 seconds

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