get Address information on payment plugin

  • Posts: 120
  • Thank you received: 2
9 years 6 months ago #202879

-- HikaShop version -- : 2.x.x
-- 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.

  • Posts: 82868
  • Thank you received: 13375
  • MODERATOR
9 years 5 months ago #202881

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

The following user(s) said Thank You: kaya

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

  • Posts: 120
  • Thank you received: 2
9 years 5 months ago #204571

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

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

  • Posts: 13201
  • Thank you received: 2322
9 years 5 months ago #204583

Hi,

You can potentially use that 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:
$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.071 seconds
Powered by Kunena Forum