- Posts: 490
- Thank you received: 2
no custom error message appearing during registration
9 years 10 months ago #256038
by ronron
no custom error message appearing during registration was created by ronron
-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.5
-- Error-message(debug-mod must be tuned on) -- : none
hi
im deliberately making errors on registration to test the custom error message. unfortunately i cant see any of the custom errors i made. i only see are default errors.
example:
custom field is mobile number
custom error message is = Please Complete Your Mobile Number so we can get back to you
actual error
Please complete the Mobile No. field.
1. so how can i get the custom error to come out instead of the default?
2. how can i make the errors appear below the fields itself? and not on the top? please see example
thank you
-- Joomla version -- : 3.4.5
-- PHP version -- : 5.5
-- Error-message(debug-mod must be tuned on) -- : none
hi
im deliberately making errors on registration to test the custom error message. unfortunately i cant see any of the custom errors i made. i only see are default errors.
example:
custom field is mobile number
custom error message is = Please Complete Your Mobile Number so we can get back to you
actual error
Please complete the Mobile No. field.
1. so how can i get the custom error to come out instead of the default?
2. how can i make the errors appear below the fields itself? and not on the top? please see example
thank you
Please Log in or Create an account to join the conversation.
9 years 10 months ago #256046
by nicolas
Replied by nicolas on topic no custom error message appearing during registration
Hi,
Thanks for your feedback. That's a bug. Change the code:
to:
in the file administrator/components/com_hikashop/classes/field.php and that will fix the problem.
2. You won't be able to do that as the system isn't made to work like that.
Next version of HikaShop will improve the error message display on the login/address forms of the checkout.
Thanks for your feedback. That's a bug. Change the code:
Code:
if($this->report === true) {
$app = JFactory::getApplication();
$app->enqueueMessage(JText::sprintf('PLEASE_FILL_THE_FIELD', $this->trans($field->field_realname)), 'error');
} else {
$this->parent->messages[] = array(
JText::sprintf('PLEASE_FILL_THE_FIELD', $this->trans($field->field_realname)),
'error'
);
}
Code:
if(!empty($field->field_options['errormessage'])){
$message = $this->trans($field->field_options['errormessage']);
}else{
$message = JText::sprintf('PLEASE_FILL_THE_FIELD', $this->trans($field->field_realname));
}
if($this->report === true) {
$app = JFactory::getApplication();
$app->enqueueMessage($message, 'error');
} else {
$this->parent->messages[] = array($message, 'error');
}
2. You won't be able to do that as the system isn't made to work like that.
Next version of HikaShop will improve the error message display on the login/address forms of the checkout.
The following user(s) said Thank You: ronron
Please Log in or Create an account to join the conversation.
Time to create page: 0.188 seconds