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

#   LoadFullCart function not working

##

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

Less More

- Posts: 23
- Thank you received: 0
-
-

9 years 6 months ago -  9 years 6 months ago [\#266405](#266405) by [sivaranjani](/forum/user/45208-sivaranjani "View sivaranjani's Profile")  *[LoadFullCart function not working](/forum/29-payment-methods/889637-loadfullcart-function-not-working#266405 "-- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.9  Hi Nicolas  I need to get a order total amount in needCC function. LoadFullCart is not working If any other possibility to get a order total in needCC function.")* was created by *[sivaranjani](/forum/user/45208-sivaranjani "View sivaranjani's Profile")*

-- HikaShop version -- : 3.0.1
-- Joomla version -- : 3.6.5
-- PHP version -- : 5.9

Hi Nicolas

I need to get a order total amount in needCC function. Code:

function needCC(&amp;$method) { $cartClass = hikashop_get('class.cart'); $fullcart = $cartClass-&gt;loadFullCart(false, true, true); $currencyClass = hikashop_get('class.currency'); $currency = $currencyClass-&gt;get($cart-&gt;full_total-&gt;prices[0]-&gt;price_currency_id); }

LoadFullCart is not working
If any other possibility to get a order total in needCC function.

Last edit: 9 years 6 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

9 years 6 months ago [\#266420](#266420) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[LoadFullCart function not working](/forum/29-payment-methods/889637-loadfullcart-function-not-working#266420 "-- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.9  Hi Nicolas  I need to get a order total amount in needCC function. LoadFullCart is not working If any other possibility to get a order total in needCC function.")*

Hi,

So what do you mean by "it's not working" ?
The code looks good to me.
Do you get an error ?
Is $cart not filled with all the data of the cart ?

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

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

Less More

- Posts: 23
- Thank you received: 0
-
-

9 years 6 months ago [\#266612](#266612) by [sivaranjani](/forum/user/45208-sivaranjani "View sivaranjani's Profile")  Replied by *[sivaranjani](/forum/user/45208-sivaranjani "View sivaranjani's Profile")* on topic *[LoadFullCart function not working](/forum/29-payment-methods/889637-loadfullcart-function-not-working#266612 "-- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.9  Hi Nicolas  I need to get a order total amount in needCC function. LoadFullCart is not working If any other possibility to get a order total in needCC function.")*

Thank for ur info, Nicolas.

I am not getting any error but Load the full cart time system hanged. If any other possibility to get the order amount in Checkout page. on before order creation.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy84ODk2MzctbG9hZGZ1bGxjYXJ0LWZ1bmN0aW9uLW5vdC13b3JraW5nP3RtcGw9bWFya2Rvd24=) 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: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

9 years 6 months ago [\#266616](#266616) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[LoadFullCart function not working](/forum/29-payment-methods/889637-loadfullcart-function-not-working#266616 "-- HikaShop version -- : 3.0.1 -- Joomla version -- : 3.6.5 -- PHP version -- : 5.9  Hi Nicolas  I need to get a order total amount in needCC function. LoadFullCart is not working If any other possibility to get a order total in needCC function.")*

Hello,

The function needCC is called by "onPaymentDisplay".
That method receive the cart in his parameters.

So, in your override of the function "onPaymentDisplay", you can simply store the $order in reference within the plugin variables before the call of the parent method.
Then in your "needCC" you will have the order.
And about the currency (and currency_id), you already have it in the plugin variables.

Regards,

---

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

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

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

[](#top)
