olsonsp4c Posted October 29, 2008 Share Posted October 29, 2008 (edited) This is the support forum for the addon Store Mode (Open | Closed | Maintenance): http://addons.oscommerce.com/info/6332 The purpose of this add-on is to set the mode of your store: Open, Closed, or Maintenance The settings are defined in the Admin->Configuration->Store Mode and in the language files Set Store Mode-> Open, Closed, or Maintenance Open Store Mode: Fully functioning ecommerce webstore Closed Store Mode: Allows your customers to create accounts Allows your customers and search engines to browse Allows your customers to add items to the cart Saves shopping carts for delayed checkout Prohibits customers from checking out of the store Displays a friendly message on the index and shopping cart pages Public notice before going offline Maintenance Store Mode: Choose filename (default is index_maintenance.php) Hide the header Hide the left column Hide the right column Hide the footer Hide the product prices Perform offline maintenance (admin's ip address bypasses the maintenance page) Public notice before going offline Display catalog side reminder to admin of offline status Scott Edited October 29, 2008 by olsonsp4c Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox Link to comment Share on other sites More sharing options...
stragami Posted October 29, 2008 Share Posted October 29, 2008 (edited) Hi Scott, sorry for my english..... :rolleyes: 1. thanks for this contrib it is some what i m looking for a long time. but it does not work as it must set to open: all works fine set to closed: user will be stoppted at shopping_card.php the info will be displayed - also fine set to matinance: the user are able to do all he wants no stoppoint or re-directing to the deauflt page only at the first line the info will displayed reminder! Storename is currently offline for maintenace and in the admin panel the point offline Waring will goes always to false also if i set header, column right -left , footer to true - all will be displayed the price will be hide for coulmn left - rght can be happen because i install "INFOBOX ADMI" can you take a look into the install.txt maybe the is some missing or worg or it is a problem with my shop as i have a lot contrib installed cheers alfred Edited October 29, 2008 by stragami Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted October 29, 2008 Author Share Posted October 29, 2008 (edited) Hi Scott, sorry for my english..... :rolleyes: 1. thanks for this contrib it is some what i m looking for a long time. but it does not work as it must set to open: all works fine set to closed: user will be stoppted at shopping_card.php the info will be displayed - also fine set to matinance: the user are able to do all he wants no stoppoint or re-directing to the deauflt page only at the first line the info will displayed reminder! Storename is currently offline for maintenace and in the admin panel the point offline Waring will goes always to false also if i set header, column right -left , footer to true - all will be displayed the price will be hide for coulmn left - rght can be happen because i install "INFOBOX ADMI" can you take a look into the install.txt maybe the is some missing or worg or it is a problem with my shop as i have a lot contrib installed cheers alfred It is working just fine. Your ip address is allowed to view all pages as normal with a reminder at the top telling you that the store is offline for maintenance; however, all other users are disallowed. If you want to see what other users see, you need to put it in maintenance mode and then go to a different computer and browse to your store. Scott Edited October 29, 2008 by olsonsp4c Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox Link to comment Share on other sites More sharing options...
olsonsp4c Posted October 29, 2008 Author Share Posted October 29, 2008 (edited) In other words, your ip address is allowed to browse the site as normal so that you can change things around and test your webstore while your users/customers can only see the maintenance page. This gives you the freedom to update pages without customers being frustrated by site errors, checkout issues, etc... while you get things ironed out! The reminder at the top is there so you don't forget to change the status back to "Open" - to remind you that you are in Maintenance Mode. You can test this (temporarily): in catalog/admin/configuration.php page - comment out this piece of code (it automatically detects the Admin IP Address) if ($HTTP_GET_VARS['gID'] == '1501') { $IP_Admin = tep_db_prepare_input(getenv(REMOTE_ADDR)); $IP_Admin_DB_query = tep_db_query ("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'OFFLINE_IP_ADDRESS'"); $IP_Admin_DB = tep_db_fetch_array($IP_Admin_DB_query); if ($IP_Admin_DB['configuration_value'] != $IP_Admin) { tep_db_query("update " . TABLE_CONFIGURATION . " set configuration_value = '" . $IP_Admin . "' where configuration_key = 'OFFLINE_IP_ADDRESS'"); } } Then go to Admin->Configuration->Store Mode->Admin IP Address and change the value to something that is NOT your current IP Address (127.4.2.5), then click update. Now go to your store and you should only be able to get to the maintenance page and nothing else. This is what all your users/customers see while you are in Maintenance Mode. NOW, after you've done this, go and UNCOMMENT the code above in catalog/admin/configuration.php so that it is functional again and save. Go to Admin->Configuration->Store Mode->Admin IP Address and verify that it has automatically detected your IP Address. Then, go back to your webstore, and you should now be able to browse your store normally with the message at the top reminding you that your store is in Maintenance mode. Scott Edited October 29, 2008 by olsonsp4c Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox Link to comment Share on other sites More sharing options...
stragami Posted October 30, 2008 Share Posted October 30, 2008 Hi Scott, sounds logical - i will test it next days and adv thanks for your help and your time to explain rgds alfred Quote Link to comment Share on other sites More sharing options...
stragami Posted October 31, 2008 Share Posted October 31, 2008 Hi Scot, your right - all works fine - can be go nonline. Thanks for sharing! rgds alfred Quote Link to comment Share on other sites More sharing options...
Forestshopkeeper Posted November 4, 2008 Share Posted November 4, 2008 Hi Scott: Grreat contribution: one minor correction to instructions. in step 11 you say to go to catalog/languages/english.php on my site, there is no catalog/languages directory. I think you left out the includes directory. Also, on my site, FILENAME_DEFAULT was defined as index.php. I had to change it to FILENAME_DEFAULT2=index_maintenance.php Everything seems to work. I went to a totally different computer and maintenance works and the other modes work as well. Thanks again Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted November 4, 2008 Author Share Posted November 4, 2008 You are correct about that, it should have been catalog/includes/languages/english.php You are welcome! Scott Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox Link to comment Share on other sites More sharing options...
Forestshopkeeper Posted November 4, 2008 Share Posted November 4, 2008 You are correct about that, it should have been catalog/includes/languages/english.php You are welcome! Scott Hi Scott: I have one more question. I would like to make the closed message larger. I can't seem to find where you set the font information. I am not very good at this. I know you made it red, though I don't know how. I would like to increase the font size by one or two. I have looked at the define Closed message, but don't want to mess with it before I ask. Thanks again Jim Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted November 4, 2008 Author Share Posted November 4, 2008 You will find that info in the mods you made to index.php and shopping_cart.php, it is the "class=" that makes it red. try changing it to class="main" <tr> <td class="stockWarning" align="center"><?php echo CLOSED_MESSAGE . ONLINE_DATE_TIME ?></td> </tr> Scott Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox Link to comment Share on other sites More sharing options...
Forestshopkeeper Posted November 4, 2008 Share Posted November 4, 2008 You will find that info in the mods you made to index.php and shopping_cart.php, it is the "class=" that makes it red. try changing it to class="main" <tr> <td class="stockWarning" align="center"><?php echo CLOSED_MESSAGE . ONLINE_DATE_TIME ?></td> </tr> Scott Hi Scott: Thanks for the info. I actually went into the stylesheet and created a new class, right below the stockWarning class called storeClose, copied the info for stockWarning and changed font size to 20px. Then I changed the class (from above) to storeClose in both of the files. and surprise, surprise..... it worked. Once again, thanks for a great contrib. Jim Shoppe in the Forest Quote Link to comment Share on other sites More sharing options...
Forestshopkeeper Posted November 10, 2008 Share Posted November 10, 2008 This is the support forum for the addon Store Mode (Open | Closed | Maintenance): http://addons.oscommerce.com/info/6332 The purpose of this add-on is to set the mode of your store: Open, Closed, or Maintenance The settings are defined in the Admin->Configuration->Store Mode and in the language files Set Store Mode-> Open, Closed, or Maintenance Open Store Mode: Fully functioning ecommerce webstore Closed Store Mode: Allows your customers to create accounts Allows your customers and search engines to browse Allows your customers to add items to the cart Saves shopping carts for delayed checkout Prohibits customers from checking out of the store Displays a friendly message on the index and shopping cart pages Public notice before going offline Maintenance Store Mode: Choose filename (default is index_maintenance.php) Hide the header Hide the left column Hide the right column Hide the footer Hide the product prices Perform offline maintenance (admin's ip address bypasses the maintenance page) Public notice before going offline Display catalog side reminder to admin of offline status Scott Hi Scott: Have you heard of any problems with sendmail after installation of your contribution? I don't think your contribution is causing my problem, (no emails after install), but thought I would ask. Hopefully, it is a problem at the host and they will get it fixed. Thanks Jim Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted November 10, 2008 Author Share Posted November 10, 2008 Thanks for writing Jim! No, I don't have have any issues with mail sending - all my email notifications are sending properly. This mod doesn't touch any code that would affect email sending. Probably is a server issue that should resolve. Scott Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox Link to comment Share on other sites More sharing options...
Franck Posted November 14, 2008 Share Posted November 14, 2008 Hello, Scott, One typo in your installation text, Step 11: You do not provide the first term in the first DEFINE. // Store Modedefine( ' ' , 'Notice: ' . STORE_NAME . ' will be offline from '); I think you meant it to be OFFLINE_MESSAGE_1. Thanks for a very useful contribution! Franck Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted November 15, 2008 Author Share Posted November 15, 2008 Hello, Scott, One typo in your installation text, Step 11: You do not provide the first term in the first DEFINE. I think you meant it to be OFFLINE_MESSAGE_1. Thanks for a very useful contribution! Franck Thanks Franck! Yes it should be: define('OFFLINE_MESSAGE_1', 'Notice: ' . STORE_NAME . ' will be offline from '); // the message customers will see when the Offline Warning is enabled in the admin Scott Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox Link to comment Share on other sites More sharing options...
Franck Posted November 15, 2008 Share Posted November 15, 2008 (edited) You're welcome, Scott. That was an easy typo to catch, and so far everything is working wonderfully, which just means you've carefully crafted this contribution. And I am grateful. I did have one question: I was not sure how the Offline Warning is supposed to work and had to read your code to understand that the Offline Warning that customers see is only displayed when the store is in Open mode. To make this clearer on the Admin interface, I changed the configuration description to this: "If enabled, when the store is in Open mode a message will display at the top of each catalog page warning your customers that the store will be going offline. This message is configurable in your language file." Maybe it's just me, but this helps me distinguish more clearly between the customer offline warning and admin offline warning. Thanks again for your work. Franck Edited November 15, 2008 by Franck Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted November 18, 2008 Author Share Posted November 18, 2008 New version out with small fixes: http://addons.oscommerce.com/info/6332 Scott Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox Link to comment Share on other sites More sharing options...
Franck Posted November 18, 2008 Share Posted November 18, 2008 (edited) Hi, again, Scott, One suggested improvement... My maintenance is taking much longer than planned and to make things easier for customers I added the following lines... AFTER <tr> <td class="main"><?php echo MAINTENANCE_TEXT . ONLINE_DATE_TIME . '.'; ?></td> </tr> ADD <td class="main"> <h4 class="font_listing_title"><?php echo nl2br(STORE_NAME_ADDRESS); ?></h4> <u><?php echo '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . '</a>' ?></u> </td> This puts the store name and contact information right up front should customers need to get in touch while the online store is closed. Franck Edited November 18, 2008 by Franck Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted November 18, 2008 Author Share Posted November 18, 2008 (edited) Hi, again, Scott, One suggested improvement... My maintenance is taking much longer than planned and to make things easier for customers I added the following lines... AFTER <tr> <td class="main"><?php echo MAINTENANCE_TEXT . ONLINE_DATE_TIME . '.'; ?></td> </tr> ADD <td class="main"> <h4 class="font_listing_title"><?php echo nl2br(STORE_NAME_ADDRESS); ?></h4> <u><?php echo '<a href="mailto:' . STORE_OWNER_EMAIL_ADDRESS . '">' . STORE_OWNER_EMAIL_ADDRESS . '</a>' ?></u> </td> This puts the store name and contact information right up front should customers need to get in touch while the online store is closed. Franck thanks Franck - good idea - I might opt instead for putting a contact form on the maintenance page so that owners email address aren't harvested by spammers and bots, I'll look into that this morning... Scott Edited November 18, 2008 by olsonsp4c Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox Link to comment Share on other sites More sharing options...
Franck Posted November 18, 2008 Share Posted November 18, 2008 thanks Franck - good idea - I might opt instead for putting a contact form on the maintenance page so that owners email address aren't harvested by spammers and bots, I'll look into that this morning... Scott I understand. Actually I encode the store email address and create a separate DEFINE for it in my language file... but thought I'd keep things simple as I put this idea out there. Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted November 18, 2008 Author Share Posted November 18, 2008 Store Mode v1.2 is out: http://addons.oscommerce.com/info/6332 Since v1.1 ---------- * Added a contact form to the maintenance page * Added compatibility for my osC reCaptcha addon (download it for how to install): http://addons.oscommerce.com/info/6306 Scott Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox Link to comment Share on other sites More sharing options...
helixia Posted November 28, 2008 Share Posted November 28, 2008 Everything works fine except when I change to Maintenance store mode and I try to send an email box with a few valid email addresses, I have this message: "Your E-Mail Address does not appear to be valid - please make any necessary corrections." can sb tell me why? Quote Link to comment Share on other sites More sharing options...
olsonsp4c Posted November 28, 2008 Author Share Posted November 28, 2008 Everything works fine except when I change to Maintenance store mode and I try to send an email box with a few valid email addresses, I have this message:"Your E-Mail Address does not appear to be valid - please make any necessary corrections." can sb tell me why? hi, i'll look into it and get back with you - might take a day or to, if you need, feel free to go into the index_maintenance.php page and remove the section that validates the email addresses and produces the error message, then it will work just fine. Scott Quote Addons I've crafted: osC reCaptcha | Live Support phpOnline | Store Mode | Simple Categories Header | Authorize.Net Infobox Package Tracking Plus | USPS Flat Rate Shipping | USPS Shipping Insurance | RapidSSL Infobox Link to comment Share on other sites More sharing options...
helixia Posted November 28, 2008 Share Posted November 28, 2008 Thank you very much, Scott! And Happy Thanksgiving! Quote Link to comment Share on other sites More sharing options...
helixia Posted December 2, 2008 Share Posted December 2, 2008 hi, i'll look into it and get back with you - might take a day or to, if you need, feel free to go into the index_maintenance.php page and remove the section that validates the email addresses and produces the error message, then it will work just fine. Scott Dear Scott It is alright now. There is nothing wrong with your email functionality. It is working fine. I am very sorry. I tried it again after going through a lot of changes. I was doing some redirect on .htaccess and SSL and STS 4.5.8 so I do not know what actually causes the problem. Anyway, it is fine now. May I ask what does your email verifier does? I suppose it is tep_validate_email I entered a misspelled hotmail.com like [email protected] but your email verifier din't say it is invalid. if (tep_validate_email($email_address)) { tep_mail(STORE_OWNER, STORE_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT, SEND_NAME . $name . "\r\n" . SEND_EMAIL . $email_address . "\r\n\r\n" . $enquiry, $name, $email_address); $messageStack->add('maintenance', EMAIL_SUCCESS); } else { $error = true; $messageStack->add('maintenance', ENTRY_EMAIL_ADDRESS_CHECK_ERROR); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.