osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 
 

Site maintenance fix

This is a discussion on Site maintenance fix within the osCMax v1.7 Discussion forums, part of the osCMax v1.7 Forums category; Well the site maintenance is showing: The Admin / Webmaster has enabled maintenance at : TEXT_DATE_TIME I found the post ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Discussion

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 02-01-2005, 10:51 AM
New Member
 
Join Date: Jan 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
razz2
Default Site maintenance fix

Well the site maintenance is showing:

The Admin / Webmaster has enabled maintenance at : TEXT_DATE_TIME

I found the post that it could be a missing file or record in MySQL. It did not mention what to add though. The TEXT_DATE_TIME record did not exist. Here's the thing. It is a fresh install of oscmax 1.7 and aside from a few things it is working great in development except for this and a voucher issue mentioned in another post. The question is what settings should use if I add the record to MySQL?

I set the configuration_id to: 391
The title to: when webmaster enabled maintenance
The key to: TEXT_DATE_TIME
The value to: NOW
The description to: Display when webmaster has enabled maintenance
The configuration_group_id to: 16
The sort_order to: 14

I added it, and it will pull the configuration_value, but the value is static. Where is the code that is supposed to update the record when I turn the feature on?

As always, I thank you all ahead of time for any help,

razz
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
  #2  
Old 02-02-2005, 10:15 AM
New Member
 
Join Date: Jan 2005
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
razz2
Default Fixed it myself

Well, I looked everywhere for the code that is supposed to set the TEXT_DATE_TIME value and could not find it. I have seen other posts about this and someone mentioned missing a MySQL record. I looked for the record and the code that would update the date/time in that record when you enable the site maintenance feature. I found no code to do that so I wrote some.

If you are getting this display when you enable the feature:

The Admin / Webmaster has enabled maintenance at : TEXT_DATE_TIME

Then here is the fix.

Find the file:

/catalog/admin/configuration.php

Find this code (lines 26 and 27):

tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = 'false', last_modified = '" . NOW . "' where configuration_key = 'WARN_BEFORE_DOWN_FOR_MAINTENANCE'"); }

tep_redirect(tep_href_link(FILENAME_CONFIGURATION, 'gID=' . $HTTP_GET_VARS['gID'] . '&cID=' . $cID));


Insert this code between them (I am on my Mac at the moment so if the line breaks fail just let me know and I will re-post from the PC):

// Insert these two lines to fix setting start time
// Requires adding a record to the MySQL Configuration Table
// I used
// configuration_id = 391
// configuration_title = when webmaster enabled maintenance
// configuration_key = TEXT_DATE_TIME
// configuration_value = (set by this code)
// configuration_desription = Display when webmaster has enabled maintenance
// configuration_group_id = 16
// sort_order = 14

// Set time of maintenance start

if ( $cID == 378 ) {
tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = now(), last_modified = now() where configuration_key = 'TEXT_DATE_TIME'"); }

//End of Set time of maintenance start

razz
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Advertisement
Closed Thread

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
down for maintenance kof69 osCMax v2 Installation issues 0 09-23-2005 06:12 AM
Does 'Site Maintenance' functions works? valaridz osCMax v1.7 Discussion 5 02-16-2004 06:00 AM


All times are GMT -8. The time now is 02:00 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
http://www.oscmax.com/forums/
Copyright 2008 osCMax