I need to redirect the customer from the checkout page to the registration page in case the user is not logged in / or when to click on add to cart also redirect it to the register page
I tried with the following code(put in /cataloge/controller/checkout/checkout.php)
in the OpenCart Default theme, it works properly.
if (!$this->customer->isLogged()) {
$this->session->data['redirect'] = $this->url->link('checkout/cart', '', 'SSL');
$this->redirect($this->url->link('account/login', '', 'SSL'));
}
but in my case OpenCart 3.0.3.2 and Journal 3 theme it was not succeded
So any idea or solution for this issue
Go into admin => settings and check the Guest checkout to only allow for registered users to checkout
This will then “force” the registration on the checkout page - negating the need to redirect -
With regards to your question - If it works on default and not with your theme - then you ask your theme developer to assist you.
This will then “force” the registration on the checkout page - negating the need to redirect -
With regards to your question - If it works on default and not with your theme - then you ask your theme developer to assist you.
DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.
https://www.youtube.com/watch?v=zXIxDoCRc84
The Journal3 framework is not a proper standard compliant framework or theme for OpenCart and uses its own one-step checkout, hence you may have to get in touch with the Journal3 support on this.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Who is online
Users browsing this forum: No registered users and 24 guests