Get Geolocation data from session

  • Posts: 9
  • Thank you received: 0
  • Hikashop Business
8 years 2 months ago #250456

-- HikaShop version -- : 2.6.2

Hi,

In the Geolocation Plugin documentation it states that information is cached in a users session. How do I go about accessing this? I have tried using getIPLocation from class geolocation but this appears to make another request to IPinfodb.

Thanks

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

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
8 years 2 months ago #250459

Hi,

HikaShop is working with his zones ; when the geolocation is called, it stores the corresponding HikaShop zone in the session.

$app = JFactory::getApplication();
$zone = $app->getUserState(HIKASHOP_COMPONENT.'.zone_id', 0);
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.
The following user(s) said Thank You: designbuilder

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

  • Posts: 9
  • Thank you received: 0
  • Hikashop Business
8 years 2 months ago #250521

Thanks Jerome,

That is very helpful.

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

Time to create page: 0.055 seconds
Powered by Kunena Forum