Forums / General Questions / Down for Maintenance - "Contact us" page still works

Down for Maintenance - "Contact us" page still works

Locked

Started by dlucarelli on 8 Sep 2010, 1:49 AM · Views: 1,889

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
8 Sep 2010, 1:49 AM
#1
dlucarelli avatar

dlucarelli

New Zenner

Join Date:
Aug 2010
Location:
Pittsburgh, PA (USA)
Posts:
12
Plugin Contributions:
0

Down for Maintenance - "Contact us" page still works

Hello,

I have Zen cart 1.3.9f installed and in testing, with thezencart.com template 21594 installed and working.

The behavior I want when WEBSITE_MAINTENANCE=True is ONLY the header shows - no columns, footers, prices, etc.

So, in Configuration -> Website Maintenance, I have set:

Hide Header FALSE
Hide Column Left TRUE
Hide Column Right TRUE
Hide Footer TRUE
Hide Prices TRUE

All other Website Maintenance settings are default.

All works as expected - except the 'Contact us' link. This link is enabled, and, when clicked, brings up the 'Contact us!' form. Completing the form send the email as expected.

How do I prevent the 'Contact Us' page from loading during a maintenance window? I'd like the link to redirect back to the Maintenance page, just like the "Home", "New Products", "Specials", "All Products", "Reviews" and "FAQs" pages.

Thanks in advance

--Dan

8 Sep 2010, 2:23 AM
#2
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,893
Plugin Contributions:
20

Re: Down for Maintenance - "Contact us" page still works

Not familiar with that "store-bought" template, but many of them violate the "standard" settings of Zen Cart. Without a look at the files, your best bet is to check with those from whom you purchased.

Need a hand with Zen Cart? Hire the team at myZenCartZone.com for upgrades, repairs, and custom plugins.
Zen Cart Certified hosting at myZenCartHost.com

8 Sep 2010, 2:30 AM
#3
samar777 avatar

samar777

Zen Follower

Join Date:
Nov 2009
Location:
Chicago, IL.
Posts:
202
Plugin Contributions:
0

Re: Down for Maintenance - "Contact us" page still works

have you tried to clear the cache and then refresh the page? a lot of times thats the culprit .
Secondly, Even if the contact us page is loading there is no harm really. maybe you will get a few emails from potential customers.
thirdly, if all fails, and for a quick work around for now, you can just turn the contact us page off from admin>ez pages>contact us. : )

Automation is Godliness

8 Sep 2010, 4:24 AM
#4
dlucarelli avatar

dlucarelli

New Zenner

Join Date:
Aug 2010
Location:
Pittsburgh, PA (USA)
Posts:
12
Plugin Contributions:
0

Re: Down for Maintenance - "Contact us" page still works

Yes, I have cleared the cache. Restarted the browser, even. Changed browsers, even.

This behavior is exhibited on two sites: my preproduction site with the "Store-Bought" template, and a testing site with the default template and no modifications or add-ins. I do not think this is a template issue.

The "store bought" template adds an EZ Page link for Contact_Us: Header=Yes,Internal link URL: index.php?main_page=contact_us. There are similar EZ page links for Home, New Products, Specials, All Products, Reviews, FAQs. All of these links work - i.e. they honor the down_for_maintanance flag.

When I use the default template, and set Hide Right Column TRUE, and click on 'Contact us' in the information box in the left column, the right column renders along with the contact us form.

Although there may be no harm, I want the site completely shut off during maintenance - especially since my preproduction site has altered the maintenance page with a "Coming Soon!" message.

Perhaps the contact_us form needs to honor the down_for_maintenance flag?

I don't see how the 'thirdly' option can work - I can turn the information box on or off in the default template, but the "store bought" one exposes the links to the header - and, alas! I cannot find the EZ Page for just the contact_us form.

8 Sep 2010, 4:33 AM
#5
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Down for Maintenance - "Contact us" page still works

If you look in the file:
/includes/init_includes/init_customer_auth.php

you will see where there is a setting for the type of Down For Maintenance ...

if (!defined('DOWN_FOR_MAINTENANCE_TYPE')) define('DOWN_FOR_MAINTENANCE_TYPE', 'relaxed');

You can override that to be set to strict, where no pages will work by creating a file:
/includes/extra_configures/my_down_for_maintenance.php

with the content:

<?php
// change Down for Maintenance to not show any pages
define('DOWN_FOR_MAINTENANCE_TYPE', 'strict');

NOTE: you can call that filename anything, but I like names that mean something concerning what they contain ... :smile:

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

8 Sep 2010, 4:38 AM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Down for Maintenance - "Contact us" page still works

Apart from making code edits as Ajeh suggested, there is no built-in option for what you're requesting in the current version.
In down-for-maintenance mode, the privacy, shipping, conditions, and contact-us page are all accessible. Most everything else requires reading database data, and as such is not displayed.

Fortunately, the multiple levels of maintenance choices Ajeh mentions are admin-configurable in the (currently in development) v2.0 edition. For details on the 2.0 product, subscribe yourself to the News & Announcements area of the forum.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

8 Sep 2010, 11:02 AM
#7
dlucarelli avatar

dlucarelli

New Zenner

Join Date:
Aug 2010
Location:
Pittsburgh, PA (USA)
Posts:
12
Plugin Contributions:
0

Re: Down for Maintenance - "Contact us" page still works

Ajeh and DrByte,

Thanks for the info. Ajeh, I will try the mod and play with the results.

--Dan