Post by CaptainHaddock » Mon Apr 08, 2024 10:23 am

Hi,
I need to deactivate a multistore so it cannot be used by customers.
The store is one of several multistores under a single opencart 3.08 installation.
Ideally if anyone lands on any of its pages, they will see a message saying the store is not currently in business.
I would be grateful for advice on how to do this, or an extension that does it.
Thanks

Active Member

Posts

Joined
Tue Jul 02, 2013 7:01 am


Post by paulfeakins » Mon Apr 08, 2024 6:59 pm

CaptainHaddock wrote:
Mon Apr 08, 2024 10:23 am
I need to deactivate a multistore so it cannot be used by customers.
The store is one of several multistores under a single opencart 3.08 installation.
Ideally if anyone lands on any of its pages, they will see a message saying the store is not currently in business.
I would be grateful for advice on how to do this, or an extension that does it.
This has been asked and answered before:
viewtopic.php?t=209850

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by CaptainHaddock » Tue Apr 09, 2024 5:24 am

paulfeakins wrote:
Mon Apr 08, 2024 6:59 pm
CaptainHaddock wrote:
Mon Apr 08, 2024 10:23 am
I need to deactivate a multistore so it cannot be used by customers.
The store is one of several multistores under a single opencart 3.08 installation.
Ideally if anyone lands on any of its pages, they will see a message saying the store is not currently in business.
I would be grateful for advice on how to do this, or an extension that does it.
This has been asked and answered before:
viewtopic.php?t=209850
Hi Paul,
Thanks for your reply.
My question is different to the one in the link you kindly provided.
I want to deactivate one multistore, not all multistores under a parent.
The switch for maintenance mode is only shown for the parent store. If you turn it on, it puts all multistores into maintenance.
How do I deactivate just one multistore?
Thanks

Active Member

Posts

Joined
Tue Jul 02, 2013 7:01 am


Post by paulfeakins » Tue Apr 09, 2024 6:44 pm

CaptainHaddock wrote:
Tue Apr 09, 2024 5:24 am
My question is different to the one in the link you kindly provided.
Ah yes, I did Google this for sub-stores so assumed Google would have returned a relevant result but it seems not.

Have you looked for extensions to do this yet?

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom

Post by MCE Digital » Wed Apr 10, 2024 10:20 pm

Maybe not the very best solution but it works...:
Configuration --> Settings -->Edit store and change URL to https://deactivatedstore.com

Second solution is to change the domain documentroot in (Cpanel) or Domainpointer (DirectAdmin).

Most ideal is indeed a solution that allows you to put a single multistore in maintenance mode. A good working plugin for this I have not seen yet.

Newbie

Posts

Joined
Thu Nov 29, 2018 10:32 pm

Post by nonnedelectari » Thu Apr 11, 2024 10:20 am

OC maintenance was set for technical maintenance, not store maintenance and since all multi stores use the same logic, all should be put into maintenance at the same time for that. It is controlled by a single setting variable and checked in catalog/controller/startup/maintenance.php which is called always and ignores some routes as well as logged in users. For a nice solution you would need to set, and maintain, a variable per multistore child and create an additional interface to handle those.

as a very very temp fix, you could modify maintenance.php and trigger maintenance mode per specific store_id.

Code: Select all

class ControllerStartupMaintenance extends Controller {
	public function index() {
		if ($this->config->get('config_maintenance')) {
			..........
to

Code: Select all

class ControllerStartupMaintenance extends Controller {
	public function index() {
		
		// force store with id = 1 into maintenance, comment out to disable
		$forced_maintenance_store = 1;
		
		if ($this->config->get('config_maintenance') || (isset($forced_maintenance_store) && ($this->config->get('config_store_id') == $forced_maintenance_store))) {
			......
I don't do multistore so I cannot test this but you could try it.

Active Member

Posts

Joined
Thu Mar 04, 2021 6:34 pm

Post by CaptainHaddock » Thu Apr 11, 2024 12:26 pm

Thanks very much for the suggestions.
I found an extension that lets you put individual multistores into maintenance mode.
It's called Multistore Maintenance Switch and was easy to install and is working well:
https://www.opencart.com/index.php?rout ... n_id=39170
Thanks all !

Active Member

Posts

Joined
Tue Jul 02, 2013 7:01 am


Post by paulfeakins » Thu Apr 11, 2024 8:00 pm

CaptainHaddock wrote:
Thu Apr 11, 2024 12:26 pm
Thanks very much for the suggestions.
I found an extension that lets you put individual multistores into maintenance mode.
It's called Multistore Maintenance Switch and was easy to install and is working well:
https://www.opencart.com/index.php?rout ... n_id=39170
Thanks all !
Excellent work Captain!

And thanks for updating the thread.

Now please add [SOLVED] to the start of the topic title.

UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk


User avatar
Legendary Member
Online

Posts

Joined
Mon Aug 22, 2011 11:01 pm
Location - London Gatwick, United Kingdom
Who is online

Users browsing this forum: No registered users and 18 guests