Post by riwakawebsitedesigns » Mon Apr 21, 2014 7:24 pm

Hi.

I would like to know if any one knows how open carts back end maintenance mode code work.

I would like to create some thing similar using codeigniter. I use open cart for my store to sell my goods but for my main website I use codeigniter.

Any ideas.


Posts

Joined
Fri Dec 20, 2013 11:05 am

Post by Axansh » Wed Apr 23, 2014 2:30 am

have a look, index.php

where you can find:
// Maintenance Mode
$controller->addPreAction(new Action('common/maintenance'));

Where system check its status first,if its on then it will show relevant
page directly.

Just debug index.php.

Thanks and Best Regards,
Axansh Sheth

Our Opencart Module
All in ONE SEO |
Multi-purpose pop |
Restaurant theme |
Store time save module


User avatar
Active Member

Posts

Joined
Mon Feb 06, 2012 3:07 pm

Post by riwakawebsitedesigns » Wed Apr 23, 2014 4:26 pm

What way would you do it for codeigniter?


Posts

Joined
Fri Dec 20, 2013 11:05 am

Post by Axansh » Wed Apr 23, 2014 11:34 pm

Add this in index.php

$maintenance = false; ## set to true to enable

if ($maintenance)
{
if (isset( $_SERVER['REMOTE_ADDR']) and $_SERVER['REMOTE_ADDR'] == 'your_ip')
{
##do nothing
} else
{

error_reporting(E_ALL);
ini_set('display_errors', 1); ## to debug your maintenance view

require_once 'maintenance.php'; ## call view
return;
exit();

}
}

==============
and create maintenance.php.

Thanks and Best Regards,
Axansh Sheth

Our Opencart Module
All in ONE SEO |
Multi-purpose pop |
Restaurant theme |
Store time save module


User avatar
Active Member

Posts

Joined
Mon Feb 06, 2012 3:07 pm
Who is online

Users browsing this forum: No registered users and 36 guests