[Skip to main content](#vessel-content)

#   2.2.0 - Default Country Stuck as France

##

- **[fmedia](/forum/user/26646-fmedia "View fmedia's Profile")**
- [![fmedia's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/26646-fmedia "View fmedia's Profile") Topic Author
- [ Offline](/forum/user/26646-fmedia)

Less More

- Posts: 3
- Thank you received: 0
-
-

13 years 2 months ago [\#118920](#118920) by [fmedia](/forum/user/26646-fmedia "View fmedia's Profile")  *[2.2.0 - Default Country Stuck as France](/forum/27-checkout/861112-2-2-0-default-country-stuck-as-france#118920 "Hey,  Sorry if this is a duplicate post, but I spent half a day looking for an answer and couldn't find one.  Trying out the Starter Version 2.2.0, but when I select another country to be the default for registration (in the address&#95;country custom field edit page), hit save, and the page reloads, it's back to France. The front end form also still displays France as the default.  The default field in the DB shows up as &quot;country&#95;Canada&#95;38&quot;, however.  The states field will also give me only French options.  Is this something I can fix? Is it a starter version thing?")* was created by *[fmedia](/forum/user/26646-fmedia "View fmedia's Profile")*

Hey,

Sorry if this is a duplicate post, but I spent half a day looking for an answer and couldn't find one.

Trying out the Starter Version 2.2.0, but when I select another country to be the default for registration (in the address_country custom field edit page), hit save, and the page reloads, it's back to France. The front end form also still displays France as the default.

The default field in the DB shows up as "country_Canada_38", however.

The states field will also give me only French options.

Is this something I can fix? Is it a starter version thing?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MTExMi0yLTItMC1kZWZhdWx0LWNvdW50cnktc3R1Y2stYXMtZnJhbmNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 2 months ago [\#118922](#118922) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[2.2.0 - Default Country Stuck as France](/forum/27-checkout/861112-2-2-0-default-country-stuck-as-france#118922 "Hey,  Sorry if this is a duplicate post, but I spent half a day looking for an answer and couldn't find one.  Trying out the Starter Version 2.2.0, but when I select another country to be the default for registration (in the address&#95;country custom field edit page), hit save, and the page reloads, it's back to France. The front end form also still displays France as the default.  The default field in the DB shows up as &quot;country&#95;Canada&#95;38&quot;, however.  The states field will also give me only French options.  Is this something I can fix? Is it a starter version thing?")*

Hi,

Can you edit the file "administrator/components/com_hikashop/classes/field.php" and replace the code: Code:

$country = ''; if(empty($country)) { $address_country_field = $this-&gt;parent-&gt;get(14); //14 = id of country field if(!empty($address_country_field) &amp;&amp; $address_country_field-&gt;field_type=='zone' &amp;&amp; !empty($address_country_field-&gt;field_options['zone_type']) &amp;&amp; $address_country_field-&gt;field_options['zone_type']=='country' &amp;&amp; !empty($address_country_field-&gt;field_default)) { $country = $address_country_field-&gt;field_default; } }

By: Code:

if(empty($country)) { $address_country_field = $this-&gt;parent-&gt;get(14); //14 = id of country field if(!empty($address_country_field) &amp;&amp; $address_country_field-&gt;field_type=='zone' &amp;&amp; !empty($address_country_field-&gt;field_options['zone_type']) &amp;&amp; $address_country_field-&gt;field_options['zone_type']=='country' &amp;&amp; !empty($address_country_field-&gt;field_default)) { $country = $address_country_field-&gt;field_default; } }

Thanks

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MTExMi0yLTItMC1kZWZhdWx0LWNvdW50cnktc3R1Y2stYXMtZnJhbmNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[fmedia](/forum/user/26646-fmedia "View fmedia's Profile")**
- [![fmedia's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/26646-fmedia "View fmedia's Profile") Topic Author
- [ Offline](/forum/user/26646-fmedia)

Less More

- Posts: 3
- Thank you received: 0
-
-

13 years 2 months ago [\#118926](#118926) by [fmedia](/forum/user/26646-fmedia "View fmedia's Profile")  Replied by *[fmedia](/forum/user/26646-fmedia "View fmedia's Profile")* on topic *[2.2.0 - Default Country Stuck as France](/forum/27-checkout/861112-2-2-0-default-country-stuck-as-france#118926 "Hey,  Sorry if this is a duplicate post, but I spent half a day looking for an answer and couldn't find one.  Trying out the Starter Version 2.2.0, but when I select another country to be the default for registration (in the address&#95;country custom field edit page), hit save, and the page reloads, it's back to France. The front end form also still displays France as the default.  The default field in the DB shows up as &quot;country&#95;Canada&#95;38&quot;, however.  The states field will also give me only French options.  Is this something I can fix? Is it a starter version thing?")*

Hi Jerome,

i replaced lines 1835 through 1841 in classes/field.php with what you posted, I'm still experiencing the bug.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MTExMi0yLTItMC1kZWZhdWx0LWNvdW50cnktc3R1Y2stYXMtZnJhbmNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

13 years 2 months ago [\#118970](#118970) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[2.2.0 - Default Country Stuck as France](/forum/27-checkout/861112-2-2-0-default-country-stuck-as-france#118970 "Hey,  Sorry if this is a duplicate post, but I spent half a day looking for an answer and couldn't find one.  Trying out the Starter Version 2.2.0, but when I select another country to be the default for registration (in the address&#95;country custom field edit page), hit save, and the page reloads, it's back to France. The front end form also still displays France as the default.  The default field in the DB shows up as &quot;country&#95;Canada&#95;38&quot;, however.  The states field will also give me only French options.  Is this something I can fix? Is it a starter version thing?")*

Hi,

We can't reproduce your problem in our local websites. So we will require an access to your website in order to see it directly and make some tests.
You can send us such private information by private message.

Regards,

---

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MTExMi0yLTItMC1kZWZhdWx0LWNvdW50cnktc3R1Y2stYXMtZnJhbmNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 2 months ago [\#119129](#119129) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[2.2.0 - Default Country Stuck as France](/forum/27-checkout/861112-2-2-0-default-country-stuck-as-france#119129 "Hey,  Sorry if this is a duplicate post, but I spent half a day looking for an answer and couldn't find one.  Trying out the Starter Version 2.2.0, but when I select another country to be the default for registration (in the address&#95;country custom field edit page), hit save, and the page reloads, it's back to France. The front end form also still displays France as the default.  The default field in the DB shows up as &quot;country&#95;Canada&#95;38&quot;, however.  The states field will also give me only French options.  Is this something I can fix? Is it a starter version thing?")*

Hi,

Thanks to replace the display() function of the class "hikashopDropDown" in the file indicated by Jerome by: Code:

function display($field, $value, $map, $inside, $options = '', $test = false, $allFields = null, $allValues = null){ $string = ''; if(!empty($field-&gt;field_value) &amp;&amp; !is_array($field-&gt;field_value)){ $field-&gt;field_value = $this-&gt;parent-&gt;explodeValues($field-&gt;field_value); } if(empty($field-&gt;field_value) &#124;&#124; !count($field-&gt;field_value)){ return '&lt;input type="hidden" name="'.$map.'" value="" /&gt;'; } if($this-&gt;type == "multiple"){ $string.= '&lt;input type="hidden" name="'.$map.'" value=" " /&gt;'; $map.='[]'; $arg = 'multiple="multiple"'; if(!empty($field-&gt;field_options['size'])) $arg .= ' size="'.intval($field-&gt;field_options['size']).'"'; }else{ $arg = 'size="1"'; if(is_string($value)&amp;&amp; empty($value) &amp;&amp; !empty($field-&gt;field_value)){ $found = false; $first = false; foreach($field-&gt;field_value as $oneValue =&gt; $title){ if($first===false){ $first=$oneValue; } if($oneValue==$value){ $found = true; break; } } //set default value for IE if(!$found){ $value = $first; } } } $string .= '&lt;select id="'.$this-&gt;prefix.$field-&gt;field_namekey.$this-&gt;suffix.'" name="'.$map.'" '.$arg.$options.'&gt;'; if(empty($field-&gt;field_value)) return $string.'&lt;/select&gt;'; $app = JFactory::getApplication(); $admin = $app-&gt;isAdmin(); foreach($field-&gt;field_value as $oneValue =&gt; $title){ if(isset($field-&gt;field_default) &amp;&amp; array_key_exists($field-&gt;field_default, $field-&gt;field_value)){ if($oneValue === $field-&gt;field_default){ $selected = (is_string($field-&gt;field_default) &amp;&amp; $oneValue === $field-&gt;field_default) &#124;&#124; is_array($field-&gt;field_default) &amp;&amp; in_array($oneValue,$field-&gt;field_default) ? 'selected="selected" ' : ''; }else{ $selected = ((int)$title-&gt;disabled &amp;&amp; !$admin) ? 'disabled="disabled" ' : ''; } }else{ $selected = ((int)$title-&gt;disabled &amp;&amp; !$admin) ? 'disabled="disabled" ' : ''; $selected .= ((is_numeric($value) &amp;&amp; is_numeric($oneValue) AND $oneValue == $value) &#124;&#124; (is_string($value) &amp;&amp; $oneValue === $value) &#124;&#124; is_array($value) &amp;&amp; in_array($oneValue,$value)) ? 'selected="selected" ' : ''; } $id = $this-&gt;prefix.$field-&gt;field_namekey.$this-&gt;suffix.'_'.$oneValue; $string .= '&lt;option value="'.$oneValue.'" id="'.$id.'" '.$selected.'&gt;'.$this-&gt;trans($title-&gt;value).'&lt;/option&gt;'; } $string .= '&lt;/select&gt;'; return $string; }

And the "display()" function of the class "hikashopZone" in the same file by: Code:

function display($field, $value, $map, $inside, $options = '', $test = false, $allFields = null, $allValues = null){ // Set default zone depending on the geolocation plugin $currentZoneId = hikashop_getZone()?hikashop_getZone():''; if(!empty($currentZoneId) &amp;&amp; JFactory::getApplication()-&gt;isSite()){ $zoneClass = hikashop_get('class.zone'); $currentZone = $zoneClass-&gt;getZoneParents($currentZoneId); foreach($currentZone as $currentZoneInfos){ if(preg_match('/country/',$currentZoneInfos)){ $defaultCountry = $currentZoneInfos; } } } if($field-&gt;field_options['zone_type']=='country'){ if(isset($defaultCountry)){ $field-&gt;field_default = $defaultCountry; } $stateNamekey = str_replace('country','state',$field-&gt;field_namekey); if(!empty($allFields)) { foreach($allFields as &amp;$f) { if(!empty($f-&gt;field_options['zone_type']) &amp;&amp; $f-&gt;field_options['zone_type'] == 'state') { $stateNamekey = $f-&gt;field_namekey; break; } } } $stateId = str_replace( array('[',']',$field-&gt;field_namekey), array('_','',$stateNamekey), $map ); $changeJs = 'window.hikashop.changeState(this,\''.$stateId.'\',\''.$field-&gt;field_url.'field_type='.$field-&gt;field_table.'&amp;field_id='.$stateId.'&amp;field_namekey='.$stateNamekey.'&amp;namekey=\'+this.value);'; if(!empty($options) &amp;&amp; stripos($options,'onchange="')!==false){ $options = preg_replace('#onchange="#i','onchange="'.$changeJs,$options); }else{ $options = ' onchange="'.$changeJs.'"'; } if($allFields == null &#124;&#124; $allValues == null) { $doc = JFactory::getDocument(); $js = 'window.addEvent(\'domready\', function() { var el = document.getElementById(\''.$this-&gt;prefix.$field-&gt;field_namekey.$this-&gt;suffix.'\'); window.hikashop.changeState(el,\''.$stateId.'\',\''.$field-&gt;field_url.'field_type='.$field-&gt;field_table.'&amp;field_id='.$stateId.'&amp;field_namekey='.$stateNamekey.'&amp;namekey=\'+el.value); });'; $doc-&gt;addScriptDeclaration($js); } } elseif($field-&gt;field_options['zone_type']=='state') { $stateId = str_replace(array('[',']'),array('_',''),$map); $dropdown = ''; if($allFields != null) { $country = null; foreach($allFields as $f) { if($f-&gt;field_type=='zone' &amp;&amp; !empty($f-&gt;field_options['zone_type']) &amp;&amp; $f-&gt;field_options['zone_type']=='country') { $key = $f-&gt;field_namekey; if(!empty($allValues-&gt;$key)) { $country = $allValues-&gt;$key; } else { $country = $f-&gt;field_default; } break; } } if(empty($country)) { $address_country_field = $this-&gt;parent-&gt;get(14); //14 = id of country field if(!empty($address_country_field) &amp;&amp; $address_country_field-&gt;field_type=='zone' &amp;&amp; !empty($address_country_field-&gt;field_options['zone_type']) &amp;&amp; $address_country_field-&gt;field_options['zone_type']=='country' &amp;&amp; !empty($address_country_field-&gt;field_default)) { $country = $address_country_field-&gt;field_default; } } if(isset($defaultCountry)){ $country = $defaultCountry; } if(!empty($country)) { $countryType = hikashop_get('type.country'); $dropdown = $countryType-&gt;displayStateDropDown($country, $stateId, $map, '', $value); } } return '&lt;span id="'.$stateId.'_container"&gt;'.$dropdown.'&lt;/span&gt;'. '&lt;input type="hidden" id="'.$stateId.'_default_value" name="'.$stateId.'_default_value" value="'.$value.'"/&gt;'; } return parent::display($field,$value,$map,$inside,$options,$test,$allFields,$allValues); }

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MTExMi0yLTItMC1kZWZhdWx0LWNvdW50cnktc3R1Y2stYXMtZnJhbmNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[fmedia](/forum/user/26646-fmedia "View fmedia's Profile")**
- [![fmedia's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/26646-fmedia "View fmedia's Profile") Topic Author
- [ Offline](/forum/user/26646-fmedia)

Less More

- Posts: 3
- Thank you received: 0
-
-

13 years 2 months ago [\#119218](#119218) by [fmedia](/forum/user/26646-fmedia "View fmedia's Profile")  Replied by *[fmedia](/forum/user/26646-fmedia "View fmedia's Profile")* on topic *[2.2.0 - Default Country Stuck as France](/forum/27-checkout/861112-2-2-0-default-country-stuck-as-france#119218 "Hey,  Sorry if this is a duplicate post, but I spent half a day looking for an answer and couldn't find one.  Trying out the Starter Version 2.2.0, but when I select another country to be the default for registration (in the address&#95;country custom field edit page), hit save, and the page reloads, it's back to France. The front end form also still displays France as the default.  The default field in the DB shows up as &quot;country&#95;Canada&#95;38&quot;, however.  The states field will also give me only French options.  Is this something I can fix? Is it a starter version thing?")*

Thanks!

That fixed the problem on the back end, but the registration on the front end at the checkout is still showing France as a default when the backend says Canada.

Do I need to update any other code?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MTExMi0yLTItMC1kZWZhdWx0LWNvdW50cnktc3R1Y2stYXMtZnJhbmNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 2 months ago [\#119485](#119485) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[2.2.0 - Default Country Stuck as France](/forum/27-checkout/861112-2-2-0-default-country-stuck-as-france#119485 "Hey,  Sorry if this is a duplicate post, but I spent half a day looking for an answer and couldn't find one.  Trying out the Starter Version 2.2.0, but when I select another country to be the default for registration (in the address&#95;country custom field edit page), hit save, and the page reloads, it's back to France. The front end form also still displays France as the default.  The default field in the DB shows up as &quot;country&#95;Canada&#95;38&quot;, however.  The states field will also give me only French options.  Is this something I can fix? Is it a starter version thing?")*

Hi,

Can you try to unpublish the plugin "Hikashop geolocation" to see if it's correcting the problem ?

Or remove the following code of the code given in the previous post: Code:

$currentZoneId = hikashop_getZone()?hikashop_getZone():''; if(!empty($currentZoneId) &amp;&amp; JFactory::getApplication()-&gt;isSite()){ $zoneClass = hikashop_get('class.zone'); $currentZone = $zoneClass-&gt;getZoneParents($currentZoneId); foreach($currentZone as $currentZoneInfos){ if(preg_match('/country/',$currentZoneInfos)){ $defaultCountry = $currentZoneInfos; } } }

The following user(s) said Thank You: [hactic](/forum/user/32281-hactic "View hactic's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MTExMi0yLTItMC1kZWZhdWx0LWNvdW50cnktc3R1Y2stYXMtZnJhbmNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[hactic](/forum/user/32281-hactic "View hactic's Profile")**
- [![hactic's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/32281-hactic "View hactic's Profile")
- [ Offline](/forum/user/32281-hactic)

Less More

- Posts: 35
- Thank you received: 3
-
- [](https://shop.smartgart.com)
-

11 years 1 month ago [\#214012](#214012) by [hactic](/forum/user/32281-hactic "View hactic's Profile")  Replied by *[hactic](/forum/user/32281-hactic "View hactic's Profile")* on topic *[2.2.0 - Default Country Stuck as France](/forum/27-checkout/861112-2-2-0-default-country-stuck-as-france#214012 "Hey,  Sorry if this is a duplicate post, but I spent half a day looking for an answer and couldn't find one.  Trying out the Starter Version 2.2.0, but when I select another country to be the default for registration (in the address&#95;country custom field edit page), hit save, and the page reloads, it's back to France. The front end form also still displays France as the default.  The default field in the DB shows up as &quot;country&#95;Canada&#95;38&quot;, however.  The states field will also give me only French options.  Is this something I can fix? Is it a starter version thing?")*

I am digging on a similar topic. Variable $currentZoneInfos contains something like 'country_Germany_81'.
This is zone_namekey. To obtain a more readable zone_name or zone_name_english, I did this workaround:
Code:

$database = JFactory::getDBO(); $query = $database-&gt;getQuery(true); $query = 'SELECT zone_name, zone_name_english FROM ' . hikashop_table('zone') . ' WHERE zone_namekey = \'' . $defaultCountry . '\''; $database-&gt;setQuery($query); $rows = $database-&gt;loadObjectList(); // var_dump($rows); echo $rows[0]-&gt;zone_name;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MTExMi0yLTItMC1kZWZhdWx0LWNvdW50cnktc3R1Y2stYXMtZnJhbmNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

11 years 1 month ago [\#214017](#214017) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[2.2.0 - Default Country Stuck as France](/forum/27-checkout/861112-2-2-0-default-country-stuck-as-france#214017 "Hey,  Sorry if this is a duplicate post, but I spent half a day looking for an answer and couldn't find one.  Trying out the Starter Version 2.2.0, but when I select another country to be the default for registration (in the address&#95;country custom field edit page), hit save, and the page reloads, it's back to France. The front end form also still displays France as the default.  The default field in the DB shows up as &quot;country&#95;Canada&#95;38&quot;, however.  The states field will also give me only French options.  Is this something I can fix? Is it a starter version thing?")*

Hi,

You can use the zone class to "get" the 2one thanks to is namekey.
Otherwise you can perform the sql query but i'll suggest you to use the joomla database quote function to avoid sql injection from the defaultCountry variable.

Regards,

---

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

The following user(s) said Thank You: [hactic](/forum/user/32281-hactic "View hactic's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg2MTExMi0yLTItMC1kZWZhdWx0LWNvdW50cnktc3R1Y2stYXMtZnJhbmNlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.145 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
