Skip to main content

LoadFullCart function not working

More
9 years 6 months ago - 9 years 6 months ago #266405 by sivaranjani
-- 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(&$method) { $cartClass = hikashop_get('class.cart'); $fullcart = $cartClass->loadFullCart(false, true, true); $currencyClass = hikashop_get('class.currency'); $currency = $currencyClass->get($cart->full_total->prices[0]->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.

Please Log in or Create an account to join the conversation.

More
9 years 5 months ago #266420 by nicolas
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 or Create an account to join the conversation.

More
9 years 5 months ago #266612 by sivaranjani
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 or Create an account to join the conversation.

More
9 years 5 months ago #266616 by Jerome
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 & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

Time to create page: 0.165 seconds
Powered by Kunena Forum