Hi,
1.
The state field displays based on the country field selection on the registration/address form. When you are in the backend, with the "display limited to" setting, there is no country field so the state field cannot work properly.
Add the code:
<script type="text/javascript">
if(window.Oby){
window.Oby.registerAjax("hikashop.stateupdated", function(id,elem){
if(typeof id != "object")
id = document.getElementById(id);
if(id.id == "field_options_parent_value")
document.getElementById(id.id).setAttribute("name","field_options[parent_value]");
});
}
</script>
after the code:
<td class="key">
<?php echo JText::_( 'DISPLAY_LIMITED_TO' ); ?>
</td>
<td>
in the file administrator/components/com_hikashop/views/field/tmpl/form.php and the code
if($field->field_type == 'zone' && !empty($field->field_options['zone_type']) && $field->field_options['zone_type'] == 'state'){
$null = null;
$fields = $fieldClass->getFields('',$null,$type);
$countryField = null;
foreach($fields as $brotherField){
if($brotherField->field_type == 'zone' && !empty($brotherField->field_options['zone_type']) && $brotherField->field_options['zone_type'] == 'country'){
$countryField = $brotherField;
break;
}
}
if($countryField){
$baseUrl = JURI::base().'index.php?option=com_hikashop&ctrl=field&task=state&tmpl=component';
$currentUrl = strtolower(hikashop_currentUrl());
if(substr($currentUrl, 0, 8) == 'https://') {
$domain = substr($currentUrl, 0, strpos($currentUrl, '/', 9));
} else {
$domain = substr($currentUrl, 0, strpos($currentUrl, '/', 8));
}
if(substr($baseUrl, 0, 8) == 'https://') {
$baseUrl = $domain . substr($baseUrl, strpos($baseUrl, '/', 9));
} else {
$baseUrl = $domain . substr($baseUrl, strpos($baseUrl, '/', 8));
}
$countryField->field_url = $baseUrl . '&';
echo $fieldClass->display($countryField,$countryField->field_default,'field_options_parent_value',false,'',true);
}
}
after the code
$fieldClass = hikashop_get('class.field');
$field = $fieldClass->getField($namekey,$type);
in the file administrator/components/com_hikashop/controllers/field.php and that will allow you to select the state you want in your field. Note however that this isn't a perfect solution as after you save the system won't be able to display the selected value. This means that once you select the value and save the field, if you save again the field, you'll loose the selected value unless you select it again and save it.
But here, we're at the limits of the system, so I would recommend to seek for an alternative, like always display the input text. It's safer for future maintenance of your website.
2.
Maybe the files are created but empty ?
If you download them via FTP, can you open them ?
Usually, these issues come from a permission issue. So check the permissions of that safe folder so that it is writable by the apache user.