get Address information on payment plugin
11 years 4 months ago #202879
by kaya
get Address information on payment plugin was created by kaya
-- HikaShop version -- : 2.x.x
-- Joomla version -- : 2.5
Hi dear
I need Address information in payment plugin. how can get it?
-- Joomla version -- : 2.5
Hi dear
I need Address information in payment plugin. how can get it?
Please Log in or Create an account to join the conversation.
11 years 4 months ago #202881
by nicolas
Replied by nicolas on topic get Address information on payment plugin
Hi,
Look in the $order object given to you in the trigger function of your payment plugin.
It contains all the data of the order, including the shipping and billing addresses:
www.hikashop.com/support/documentation/156
Look in the $order object given to you in the trigger function of your payment plugin.
It contains all the data of the order, including the shipping and billing addresses:
www.hikashop.com/support/documentation/156
The following user(s) said Thank You: kaya
Please Log in or Create an account to join the conversation.
11 years 3 months ago #204571
by kaya
Replied by kaya on topic get Address information on payment plugin
Hi dear nicolas
I want get user phone in onPaymentNotification method for send sms and onPaymentNotification including $statuses.
how can get user phone with $order in onPaymentNotification method?
thank you
I want get user phone in onPaymentNotification method for send sms and onPaymentNotification including $statuses.
how can get user phone with $order in onPaymentNotification method?
thank you
Please Log in or Create an account to join the conversation.
11 years 3 months ago #204583
by Xavier
Replied by Xavier on topic get Address information on payment plugin
Hi,
You can potentially use that code:
After:
You can potentially use that code:
Code:
$orderClass = hikashop_get('class.order');
$orderData = $orderClass->get($dbOrder->order_id);
$db = JFactory:: getDBO();
$db->setQuery('SELECT address_telephone FROM '.hikashop_table('address').' WHERE address_id = '.(int)$orderData->order_billing_address_id);
$phoneNumber = @$db->loadResult();
After:
Code:
$dbOrder = $this->getOrder((int)@$vars['invoice']);
The following user(s) said Thank You: kaya
Please Log in or Create an account to join the conversation.
Time to create page: 0.215 seconds