Function to print the country for an address

  • Posts: 634
  • Thank you received: 16
6 years 5 months ago #282872

-- HikaShop version -- : 3.2.1
-- Joomla version -- : 3.8.2

Hi, I'm printing outside Hikamarket the information about a customer address.

I have used this code:

$addressClass = hikashop_get('class.address');

$address = $addressClass->get($this->order->order_shipping_address_id);

$zones = $addressClass->loadZone($address);

$zoneClass = hikashop_get('class.zone');

$state = $zoneClass->getOrderZones($this->order);

But only appears the state of the order.

Which function I have to use to retrieve the country name (and not the namekey)?

Thanks in advance,
--
Victor

Last edit: 6 years 5 months ago by PeterChain.

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 5 months ago #282878

Hello,

Would it be possible to have more about the context ?
What do you mean by "outside of HikaMarket" ? Where is it ?

Because I'm not really sure that it's related to HikaMarket but maybe only to the HikaShop core functions.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

  • Posts: 634
  • Thank you received: 16
6 years 5 months ago #282930

Hi,

Yes,

I'm changing the template for the iframe for changing the order status ("edit status") on the show layout for a order in the hikamarket frontend vendor view and I wanted to make appear the address of the customer (with other information).

Regards,

--
Victor

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

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
6 years 5 months ago #282935

Hello,

I'm changing the template for the iframe for changing the order status ("edit status") on the show layout for a order in the hikamarket frontend vendor view and I wanted to make appear the address of the customer (with other information).


I'm afraid it still not possible to understand clearly what you're doing and what you're excepting from me regarding the HikaMarket support.

The HikaMarket order details already contains all the required information about the order, including the customer address.
Even in the "ordermarket / status", "ordermarket / invoice" views you have an access to the HikaShop full order object.
Afterwards, if the elements that you have in that object are not enough ; you need to load manually what you want. But I still don't understand what or why... So I'm afraid that I can't help you if you still do not provide me the requested elements.

Because I'm not really sure that it's related to HikaMarket but maybe only to the HikaShop core functions.


Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

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

Moderators: Obsidev
Time to create page: 0.051 seconds
Powered by Kunena Forum