Misleading "next" button during registration of new user

  • Posts: 1
  • Thank you received: 0
  • Hikashop Essential
9 months 1 week ago #336855

-- HikaShop version -- : 4.4.4
-- Joomla version -- : 3.10.3
-- PHP version -- : 7.4
-- Browser(s) name and version -- : Firefox

When a new user is created, one of the steps is to verify the registered e-mail. In the particular notification view telling the user to check his email and verify by clicking the link, there is a "next" button. This button is rather confusing and leads back to the blank registration view. Is there a simple method to remove this button?

Attachments:

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

  • Posts: 76130
  • Thank you received: 11914
  • MODERATOR
9 months 1 week ago #336862

Hi,

There is no easy way because if you hide it with CSS, it will hide it for other steps too which would prevent your users from moving forward during their checkout.
But I think we can work on something to redirect to the normal activation page.
Try to change the code:

if(!empty($ret['messages'])) {
				foreach($ret['messages'] as $k => $msg) {
					$checkoutHelper->addMessage('login.'.$k, $msg);
				}
			}
			// Hide registration form and display account validation message.
			$content['params']['registration'] = false;
			$content['params']['show_login'] = false;
			$content['params']['waiting_validation'] = true;
to:
$redirect = $config->get('redirect_to_activation_page', 1);
			if($redirect) {
				// display messages through Joomla and then redirect to the activation page
				$app = JFactory::getApplication();
				if(!empty($ret['messages'])) {
					foreach($ret['messages'] as $msg) {
						if(is_string($msg))
							$app->enqueueMessage($msg);
						else if(is_array($msg) && count($msg) == 2)
							$app->enqueueMessage($msg[0], $msg[1]);
					}
				}
				$app->enqueueMessage(JText::_('WHEN_CLICKING_ACTIVATION'));
	
				$lang = JFactory::getLanguage();
				$locale = strtolower(substr($lang->get('tag'), 0, 2));
				global $Itemid;
				$url_itemid = '';
				if(!empty($menu_id))
					$url_itemid = '&Itemid=' . $menu_id;
				$app->redirect(hikashop_completeLink('checkout&task=activate_page&lang='.$locale.$url_itemid,false,true));
			} else {
				// Hide registration form and display account validation message
				if(!empty($ret['messages'])) {
					foreach($ret['messages'] as $k => $msg) {
						$checkoutHelper->addMessage('login.'.$k, $msg);
					}
				}
				$content['params']['registration'] = false;
				$content['params']['show_login'] = false;
				$content['params']['waiting_validation'] = true;
			}
in the file administrator/components/com_hikashop/helpers/checkout/login.php
That way, you should see the user activation message on another page than the checkout, and thus without the buttons.

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

Time to create page: 0.056 seconds
Powered by Kunena Forum