Post by Qphoria » Fri Oct 30, 2009 1:52 am

This is another free one as I think it should be part of OpenCart.
Supported OpenCart Versions:
================
v1.2.6, v1.2.7, v1.2.8, v1.2.9, v1.3.0, v1.3.1, v1.3.2, v1.3.3, v1.3.4, v1.4.0, v1.4.4


What does it do:
================
This contrib adds a maintenance mode option to your admin->configuration->settings page.


Main features:
==============
* Uses the preAction system to check maintenance status to protect all pages
* Admin can still see the store normally when logged into the admin section.
* Maintenance page uses its own tpl file for extended customizations
catalog_maintmode.jpg

catalog_maintmode.jpg (42.08 KiB) Viewed 19205 times

-- UPDATED TO SUPPORT up to v1.4.4

Attachments


Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by digitalchaos » Tue Nov 03, 2009 12:46 pm

Thanks Q this was definitely needed

The most terrifying words in the English language are: I'm from the government and I'm here to help.
Ronald Reagan

Digital Chaos | Graphic Design Studio http://www.digitalchaos.biz
Digital Chaos Prints | Custom Art Prints http://www.digitalchaosprints.biz


User avatar
New member

Posts

Joined
Mon Sep 28, 2009 9:22 pm
Location - Paterson NJ

Post by DannyMacD » Wed Nov 04, 2009 8:16 pm

works a treat! thanks Q!

Active Member

Posts

Joined
Fri Jun 26, 2009 6:39 am

Post by i2Paq » Thu Nov 12, 2009 3:59 am

Great MOD, this shoul be added to the next version.

Norman in 't Veldt
Moderator OpenCart Forums

_________________ READ and Search BEFORE POSTING _________________

Our FREE search: Find your answer FAST!.

[How to] BTW + Verzend + betaal setup.


User avatar
Global Moderator

Posts

Joined
Mon Nov 09, 2009 7:00 pm
Location - Winkel - The Netherlands

Post by Qphoria » Thu Nov 12, 2009 11:43 am

Updated file in original post with v1.3.3/1.3.4 support
Now there are 2 versions inside the zip. a v132 and v133-v134.
Choose the version that matches your install

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by leprimo » Thu Nov 12, 2009 5:25 pm

GREAT! 8) 8) Thank you.

Active Member

Posts

Joined
Wed Nov 04, 2009 8:31 pm

Post by miki-dan » Wed Dec 02, 2009 1:20 pm

It's a masterpiece maestro! Romania is thanking you personaly for this.

Newbie

Posts

Joined
Wed Dec 02, 2009 11:56 am

Post by dbstr » Sat Dec 12, 2009 9:02 pm

Theodore wrote:hi, sorry, i installed this, i start maintance mode in admin settings.. but do not see chenges :(
Most likely because you are logged in as admin. Try logging out, and refresh the frontend store.

Request Reviews v1.0 released.


Active Member

Posts

Joined
Sun Aug 30, 2009 12:20 am

Post by axxies » Sat Jan 02, 2010 7:38 pm

Great mod - I love it!

New member

Posts

Joined
Thu Sep 03, 2009 4:30 pm

Post by The Alchemist » Mon Feb 08, 2010 10:26 am

You know what what be a good mod for this?

If you have maintenance mode for only certain parts of the site, like Products, information, PDF's, etc, so that this way the whole site isnt down at one time.

I have this mod as well, and think its cool, but sometimes I am only working on one section at a time, and dont need the whole site down to work out the bugs.

User avatar
Active Member

Posts

Joined
Sun Nov 22, 2009 11:04 am

Post by Qphoria » Wed Mar 24, 2010 10:34 pm

Updated for 1.4.0 through 1.4.4 support

Fixed:
- Skip Maintenance mode if using SEO
- blank page if there is no index.php on the end of the url.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Wade C » Thu Mar 25, 2010 2:28 am

Tried installing this on 1.4.4
Once installed, when I go to the System-Settings page, I get
//Q: Maintenance Mode $_['entry_maintenance'] = 'Maintenance Mode:
Prevents customers from browsing your store. They will instead see a maintenance message. Only users logged in as admin will see the store as normal.';

Showing up at the top above the OpenCart | Adminstration header
Then when I go to the "Server" Tab and select the "yes" radio button for "entry_maintenance" - and click save, I get:
//Q: Maintenance Mode $_['entry_maintenance'] = 'Maintenance Mode:
Prevents customers from browsing your store. They will instead see a maintenance message. Only users logged in as admin will see the store as normal.';Warning: Cannot modify header information - headers already sent by (output started at /usr/local/4admin/apache/vhosts/website.com/httpdocs/cartfolder/admin/language/english/setting/setting.php:50) in /usr/local/4admin/apache/vhosts/website.com/httpdocs/cartfolder/system/engine/controller.php on line 27

Did I put something in the wrong place? I went through the instructions a few times double checking myself.

Thanks
Wade

Oooppps, did I do that?


New member

Posts

Joined
Sat Apr 11, 2009 1:12 am

Post by migz » Thu Mar 25, 2010 9:39 am

Qphoria wrote:Updated for 1.4.0 through 1.4.4 support

Fixed:
- Skip Maintenance mode if using SEO
- blank page if there is no index.php on the end of the url.
still the same on 1.4.0, what are the changes so it wouldn't skip SEO?

Active Member

Posts

Joined
Mon Feb 01, 2010 2:13 am

Post by Qphoria » Thu Mar 25, 2010 12:14 pm

just move the preaction in the index above the seo one. The readme says above now

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Qphoria » Thu Mar 25, 2010 9:31 pm

carefully read step 4. I think you are editing the setting.tpl file of step b but you need to be editing the file in step a

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by migz » Thu Mar 25, 2010 10:45 pm

Qphoria wrote:just move the preaction in the index above the seo one. The readme says above now
thanks! O0

Active Member

Posts

Joined
Mon Feb 01, 2010 2:13 am

Post by Wade C » Thu Mar 25, 2010 11:44 pm

Here is a clip from /admin/controller/setting/setting.php (step 4)

Code: Select all

if (isset($this->request->post['config_error_filename'])) {
			$this->data['config_error_filename'] = $this->request->post['config_error_filename']; 
		} else {
			$this->data['config_error_filename'] = $this->config->get('config_error_filename');
		}
		 
//Q: Maintenance Mode
		$this->data['entry_maintenance'] = $this->language->get('entry_maintenance');
		if (isset($this->request->post['config_maintenance'])) {
		    $this->data['config_maintenance'] = $this->request->post['config_maintenance']; 
		} else {
		    $this->data['config_maintenance'] = $this->config->get('config_maintenance');
		}//




		$this->template = 'setting/setting.tpl';
		$this->children = array(
			'common/header',	
			'common/footer'	
		);


...from /admin/language/english/setting/setting.php (step 5)

Code: Select all

// Error
$_['error_permission']        = 'Warning: You do not have permission to modify settings!';
$_['error_title']             = 'Title must be greater than 3 and less than 32 characters!';
$_['error_owner']             = 'Store Owner must be greater than 3 and less than 64 characters!';
$_['error_address']           = 'Store Address must be greater than 10 and less than 256 characters!';
$_['error_email']             = 'E-Mail Address does not appear to be valid!';
$_['error_telephone']         = 'Telephone must be greater than 3 and less than 32 characters!';
$_['error_error_filename']    = 'Error Log Filename required!';
?>
//Q: Maintenance Mode
$_['entry_maintenance']          = 'Maintenance Mode:<br /><span class="help">Prevents customers from browsing your store. They will instead see a maintenance message. Only users logged in as admin will see the store as normal.</span>';

And this is a chunk from /admin/view/template/setting/setting.tpl (step 6)

Code: Select all

 <tr>
            <td><span class="required">*</span> <?php echo $entry_error_filename; ?></td>
            <td><input type="text" name="config_error_filename" value="<?php echo $config_error_filename; ?>" />
              <?php if ($error_error_filename) { ?>
              <span class="error"><?php echo $error_error_filename; ?></span>
              <?php } ?></td>
          </tr>
<!--//Q: BOF Maintenance Mode-->
          <tr>
            <td><?php echo $entry_maintenance; ?></td>
            <td><?php if ($config_maintenance) { ?>
              <input type="radio" name="config_maintenance" value="1" checked="checked" />
              <?php echo $text_yes; ?>
              <input type="radio" name="config_maintenance" value="0" />
              <?php echo $text_no; ?>
              <?php } else { ?>
              <input type="radio" name="config_maintenance" value="1" />
              <?php echo $text_yes; ?>
              <input type="radio" name="config_maintenance" value="0" checked="checked" />
              <?php echo $text_no; ?>
              <?php } ?></td>
          </tr>
          <!--//Q: EOF Maintenance Mode-->        
	  </table>
      </div>
    </form>
I can send you copies of the entire files if you wanted to look at them.

I think I did everything right... When I read youre reply, I thought.... "ooooooohhhhhh I bet I did" but when I got to checking, there isnt a .tpl file in that folder and Im not finding a setting.tpl in any "route" that I would have thought Id have mistakenly taken (ie following a wrong line to a folder) - but who knows. Im still learning A LOT about this stuff.

Any thoughts would be appreciated. I hope I have included enough info, and not proven myself as a proof-reading idiot.
Wade

Oooppps, did I do that?


New member

Posts

Joined
Sat Apr 11, 2009 1:12 am

Post by Qphoria » Fri Mar 26, 2010 12:19 am

You pasted the language stuff AFTER the ?>. needs to be before.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am

Post by Wade C » Fri Mar 26, 2010 12:42 am

:-\

Bingo!

Ahhh I followed directions "too well" and with my lack of coding knowledge, it bit me. :D

Thanks so much! Im still learning and I appreciate your patience with me.

Wade

Oooppps, did I do that?


New member

Posts

Joined
Sat Apr 11, 2009 1:12 am

Post by sizzlingscience » Sun Apr 18, 2010 2:21 am

Hi there

I've installed the MOD but my maintenance page isn't showing too well - any suggestions? I'm running version 1.4.0
http://www.sizzlingscience.co.uk/opencarttest/

Thanks, Melanie

New member

Posts

Joined
Tue Jan 12, 2010 6:03 am
Who is online

Users browsing this forum: No registered users and 17 guests