- Posts: 23
- Thank you received: 0
LoadFullCart function not working
- sivaranjani
-
Topic Author
- Offline
Less
More
9 years 6 months ago - 9 years 6 months ago #266405
by sivaranjani
LoadFullCart function not working was created 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.
LoadFullCart is not working
If any other possibility to get a order total in needCC function.
-- 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);
}
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.
9 years 5 months ago #266420
by nicolas
Replied by nicolas on topic LoadFullCart function not working
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 ?
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.
- sivaranjani
-
Topic Author
- Offline
Less
More
- Posts: 23
- Thank you received: 0
9 years 5 months ago #266612
by sivaranjani
Replied by sivaranjani on topic LoadFullCart function not working
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.
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.
9 years 5 months ago #266616
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic LoadFullCart function not working
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,
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