Skip to main content

Access payment method in checkout end view

More
14 years 7 months ago - 14 years 7 months ago #37747 by emergentec
Hi!

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.

More
14 years 7 months ago #37899 by nicolas
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;

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

More
14 years 7 months ago #38089 by emergentec
Can't I get the label instead of the code?

"Bank transfer" instead of banktransfer?

Best regards

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

More
14 years 7 months ago #38183 by nicolas
It's possible.

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
Powered by Kunena Forum