- Posts: 16
- Thank you received: 2
Use Geolocation plugin to select Country on user registration
7 years 10 months ago #300807
by tgowans1
-- HikaShop version -- : 3.5.1
-- Joomla version -- : 3.9.0
Is it possible that the Custom Field, "Country" could be used to linked with the Geolocation plugin so that the user's Country could be automatically selected from the dropdown field? This would work in a similar way to how the Geolocation plugin works for automatically changing the displayed currency.
-- Joomla version -- : 3.9.0
Is it possible that the Custom Field, "Country" could be used to linked with the Geolocation plugin so that the user's Country could be automatically selected from the dropdown field? This would work in a similar way to how the Geolocation plugin works for automatically changing the displayed currency.
Please Log in or Create an account to join the conversation.
7 years 10 months ago #300810
by tgowans1
Replied by tgowans1 on topic Use Geolocation plugin to select Country on user registration
It appears that this feature already exists but is not working on my installation. It is failing on the below lines of code in the classes/field.php file (hikashopFieldDropdown class, display function)
!$isValue is returning 0
array_key_exists($field->field_default, $field->field_value) is also returning 0
Code:
if(isset($field->field_default) && !$isValue) {
if(array_key_exists($field->field_default, $field->field_value)){
!$isValue is returning 0
array_key_exists($field->field_default, $field->field_value) is also returning 0
Please Log in or Create an account to join the conversation.
7 years 10 months ago #300834
by Jerome
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.
Replied by Jerome on topic Use Geolocation plugin to select Country on user registration
Hello,
It would indicate that your country field default value is not set-up.
Regards,
It would indicate that your country field default value is not set-up.
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.
7 years 10 months ago - 7 years 10 months ago #300837
by tgowans1
Replied by tgowans1 on topic Use Geolocation plugin to select Country on user registration
Hi Jerome,
Default value for country has been set in the address_country custom field. I have also tried setting the default value to other countries with no success.
Default value for country has been set in the address_country custom field. I have also tried setting the default value to other countries with no success.
This message contains confidential information
Last edit: 7 years 10 months ago by tgowans1.
Please Log in or Create an account to join the conversation.
7 years 10 months ago #300845
by Jerome
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.
Replied by Jerome on topic Use Geolocation plugin to select Country on user registration
Hello,
I cannot reproduced your issue.
If the geolocation plugin do store the "geoloc_zone_id" in the user session, that value is used by the Zone field and it replace the default country that you have stored in the field.
I don't know what zone is retrieved by your plugin (and stored in the session) but there is no kind of bug in the HikaShop field system.
Regards,
I cannot reproduced your issue.
If the geolocation plugin do store the "geoloc_zone_id" in the user session, that value is used by the Zone field and it replace the default country that you have stored in the field.
I don't know what zone is retrieved by your plugin (and stored in the session) but there is no kind of bug in the HikaShop field system.
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.
Time to create page: 0.211 seconds