no custom error message appearing during registration

  • Posts: 490
  • Thank you received: 2
8 years 2 days ago #256038

-- 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

Attachments:

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

  • Posts: 82868
  • Thank you received: 13377
  • MODERATOR
8 years 1 day ago #256046

Hi,

Thanks for your feedback. That's a bug. Change the 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'
				);
			}
to:
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');
			}
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.

The following user(s) said Thank You: ronron

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

Time to create page: 0.060 seconds
Powered by Kunena Forum