Page 3 of 3

Re: [vQmod] - Force Login/Register to see site (1.5.x only)

Posted: Wed Jun 17, 2015 9:56 pm
by Qphoria
maguijo wrote:I'm a little late to this party, having only just now updated from 1.5.x to 2.x, but for this vQmod to work with opencart 2.x, you need to change line 36 from

Code: Select all

$this->redirect($this->url->link('account/login', 'SSL'));
to

Code: Select all

$this->response->redirect($this->url->link('account/login', 'SSL'));
Many thanks to qphoria for the years we've been using this mod successfully, and here's a toast to many more!
Updated the file in the first post. Thanks!

Re: [vQmod] - Force Login/Register to see site (1.5.x/2.x)

Posted: Sun Apr 03, 2016 3:16 am
by bhy
Hello, thank you very much for this excellent extension.

My question is:

is it possible to hide even the front page for unregistered users?

Currently when I go to https://velkoobchod.bioma.cz I can see the full front page and only when I click on some item, I am directed to the login page. I would like to be directed to the login page right after typing https://velkoobchod.bioma.cz so that unregistered users can't see the products and prices on the front page.

Thank you very much for any suggestions.

Re: [vQmod] - Force Login/Register to see site (1.5.x/2.x)

Posted: Tue May 24, 2016 1:35 am
by bhy
Hello, thanks again for this great extension, the problem I mentioned before is already solved.

But I have a more interesting question. How difficult would it be to add a possibility to access and use the shop without registration for users who would obtain a URL that would work like a code to access the shop?

I.e. when the user accesses say myshop.cz he would be directed to the login page just like this extension does it by default, but after going to say myshop.cz/code/cdkok989 he could use the shop without registering.

Thank you very much for any suggestions.

Re: [vQmod] - Force Login/Register to see site (1.5.x/2.x)

Posted: Tue May 24, 2016 3:40 am
by Qphoria
bhy wrote:Hello, thanks again for this great extension, the problem I mentioned before is already solved.

But I have a more interesting question. How difficult would it be to add a possibility to access and use the shop without registration for users who would obtain a URL that would work like a code to access the shop?

I.e. when the user accesses say myshop.cz he would be directed to the login page just like this extension does it by default, but after going to say myshop.cz/code/cdkok989 he could use the shop without registering.

Thank you very much for any suggestions.
You'd need a custom mod for that to add checks all over where login is set to see if the code is set as an alternative. PM me if you are interested and I can quote you for the custom work.

Cheers
Q

Re: [vQmod] - Force Login/Register to see site (1.5.x/2.x)

Posted: Tue Jul 25, 2017 7:22 pm
by netsabilisim
V2.3 www.domainname.com There is no way to route the root

Re: [vQmod] - Force Login/Register to see site (1.5.x/2.x)

Posted: Fri Jul 27, 2018 7:09 am
by mukur
Bumping this old topic - using Opencart 2.3.0.2 in mutisite mode

Is there a way to force login, but only for the 2nd store?

Re: [vQmod] - Force Login/Register to see site (1.5.x/2.x)

Posted: Tue Aug 07, 2018 10:22 pm
by Qphoria
Updated for 3.0
Technically it already worked for 2.3 and 3.0 but as netsabilism noted, you could still access the homepage. I've separated that feature a bit and moved it to its own line so if you want to still allow the homepage to be loaded but no other pages, then you could uncomment the noted line in the xml file.

Also optimized the code a bit
netsabilisim wrote:
Tue Jul 25, 2017 7:22 pm
V2.3 www.domainname.com There is no way to route the root
I fixed the code to also route the root path to the login page

Re: [vQmod] - Force Login/Register to see site (1.5.x/2.x)

Posted: Thu Dec 20, 2018 7:02 pm
by dmadeit
@mukur

Find
<code>if ($_SERVER['QUERY_STRING'] != 'route=' . $dest_route) {</code>

add this after
<code>if ($this - > config - > get('config_store_id') == 1) {</code>

Remember to change store id number.