- Posts: 137
- Thank you received: 2
Access payment method in checkout end view
- emergentec
-
Topic Author
- Offline
Less
More
14 years 7 months ago - 14 years 7 months ago #37747
by emergentec
Access payment method in checkout end view was created by emergentec
Hi!
Is it possible to access the payment method in the checkout view "end"?
Best regards
Is it possible to access the payment method in the checkout view "end"?
Best regards
Last edit: 14 years 7 months ago by emergentec.
Please Log in or Create an account to join the conversation.
14 years 7 months ago #37899
by nicolas
Replied by nicolas on topic Re: Access payment method in checkout end view
What do you mean by "access the payment method" ?
You want to know the payment method selected ?
For that you would have to load the order:
$app =& Jfactory::getApplication();
$class = hikashop_get('class.order');
$order = $class->get($app->getUserState( HIKASHOP_COMPONENT.'.order_id'));
echo $order->order_payment_method;
You want to know the payment method selected ?
For that you would have to load the order:
$app =& Jfactory::getApplication();
$class = hikashop_get('class.order');
$order = $class->get($app->getUserState( HIKASHOP_COMPONENT.'.order_id'));
echo $order->order_payment_method;
Please Log in or Create an account to join the conversation.
- emergentec
-
Topic Author
- Offline
Less
More
- Posts: 137
- Thank you received: 2
14 years 7 months ago #38089
by emergentec
Replied by emergentec on topic Re: Access payment method in checkout end view
Can't I get the label instead of the code?
"Bank transfer" instead of banktransfer?
Best regards
"Bank transfer" instead of banktransfer?
Best regards
Please Log in or Create an account to join the conversation.
14 years 7 months ago #38183
by nicolas
Replied by nicolas on topic Re: Access payment method in checkout end view
It's possible.
In that case you need to do like that:
In that case you need to do like that:
Code:
$app =& Jfactory::getApplication();
$class = hikashop_get('class.order');
$order = $class->get($app->getUserState( HIKASHOP_COMPONENT.'.order_id'));
$paymentClass = hikashop_get('class.payment');
$payment = $paymentClass->get($order->order_payment_id);
echo $payment->payment_name;
Please Log in or Create an account to join the conversation.
Time to create page: 0.156 seconds