Guest Posted January 12, 2010 Share Posted January 12, 2010 I've chosen this contribution over the other ones for 'store closed' type contributions due to the added maintenance option, yet I seem to have encountered a problem. When I put the store into a 'Closed' status, rather than getting the message advising that the store is closed, my page displays the following: CLOSED_MESSAGEDate and Time Now, here is the PHP code from the index.php file <?php // BOF: Store Mode - CRC if (STORE_MODE == 'Closed') { ?> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <tr> <td class="storeClosed" align="center"><?php echo CLOSED_MESSAGE . ONLINE_DATE_TIME ?></td> </tr> <tr> <td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td> </tr> <?php } // EOF: Store Mode ?> Please, if someone could help me with this, I'd be most grateful. Naloomi It's not defined. The "CLOSED_MESSAGED" That is. You could simply define it there if you wanted ie; define('CLOSED_MESSAGED', 'We are temporarily closed'); before it. What you missed in the instructions was this *********** STEP 2 * ********** in catalog/includes/languages/english/index.php Find the ENDING: ?> Insert this BEFORE: define('CLOSED_MESSAGE', STORE_NAME . ' is temporarily <u>closed</u>. You may create a ' . STORE_NAME . ' account, login to your ' . STORE_NAME . ' account, and add products to your shopping cart. Your shopping cart will be saved for delayed checkout.<br><br>We plan to reopen: '); Quote Link to comment Share on other sites More sharing options...
blr044 Posted March 15, 2010 Share Posted March 15, 2010 (edited) disregard this, post in wrong thread. Sorry Edited March 15, 2010 by blr044 Quote Link to comment Share on other sites More sharing options...
carryG Posted May 12, 2010 Share Posted May 12, 2010 Great contribution - thank you!! I love the differing options available. Is there a way to add more than ONE Adminstrator IP address? We have two or more "data entry" people working and need to allow the addresses while working with store down? Thanks! Quote Link to comment Share on other sites More sharing options...
mrwrighty Posted June 28, 2010 Share Posted June 28, 2010 Hi The IP address is causing problems as we have multiple users that will have the ability to change the shop status, so if one closes the store, another user cannot open the store as the IP address will be wrong. I can see the benefits for single users, but this is causing major problems for multiple users. Quote Link to comment Share on other sites More sharing options...
blr044 Posted June 30, 2010 Share Posted June 30, 2010 Thanks. Dump this post. Quote Link to comment Share on other sites More sharing options...
carryG Posted July 8, 2010 Share Posted July 8, 2010 (edited) The IP address is causing problems as we have multiple users that will have the ability to change the shop status, so if one closes the store, another user cannot open the store as the IP address will be wrong. I can see the benefits for single users, but this is causing major problems for multiple users. ----> I agree, most shops (with any growth) might need a web designer, a programmer or data entry staff to access the store. With this mod installed, you simply cannot add a second ip address as it assumes that you only have one to use and only one person (ever) will login the store. Its unfortunate, its a nice mod worth of alot of praise! We are going to see if we can tweak it with multiple ip and a non-auto add ip version... Edited July 8, 2010 by carryG Quote Link to comment Share on other sites More sharing options...
ctec2001 Posted July 24, 2010 Share Posted July 24, 2010 Thank you so much for the development of this contribution. Worked the first time with absolutely no errors. Thanks again. Quote Do or Do Not, there is no try. Link to comment Share on other sites More sharing options...
The Polecats Posted September 16, 2010 Share Posted September 16, 2010 I've just installed Store Mode and gets the following error message when adding an item to the shopping cart: "Fatal error: Call to undefined method currencies::calculate_price() in public_html/catalog/includes/classes/shopping_cart.php on line 272" After that the shop stops working, I can't load the main index file and I have to shut down the browser and go back to the store - since the cart is empty it works again until I add another item. Does anyone know what could be wrong? - it doesn't matter whether I have the store set to "Open" or "Closed". I've made two changes to the catalog/index.php file, one for "Product Sort" and this one for Store Mode if that helps. I've also got STS installed and some minor contributions. I did try to revert back to an older version by restoring the database in "Database Backup Manager" and later ran the SQL for Store Mode again and got en error message. Realized then that I'd only restored the database for products/orders etc and not the full database - but does the fact that I ran the SQL again matter? Quote Link to comment Share on other sites More sharing options...
The Polecats Posted September 30, 2010 Share Posted September 30, 2010 I've just installed Store Mode and gets the following error message when adding an item to the shopping cart: "Fatal error: Call to undefined method currencies::calculate_price() in public_html/catalog/includes/classes/shopping_cart.php on line 272" After that the shop stops working, I can't load the main index file and I have to shut down the browser and go back to the store - since the cart is empty it works again until I add another item. Does anyone know what could be wrong? - it doesn't matter whether I have the store set to "Open" or "Closed". I've made two changes to the catalog/index.php file, one for "Product Sort" and this one for Store Mode if that helps. I've also got STS installed and some minor contributions. I did try to revert back to an older version by restoring the database in "Database Backup Manager" and later ran the SQL for Store Mode again and got en error message. Realized then that I'd only restored the database for products/orders etc and not the full database - but does the fact that I ran the SQL again matter? I figured ut what was wrong with my store - the error was in currencies.php in catalog/includes/classes - I have been busy with something else since my post and my store won't go live yet for a while so I haven't had time to look more into this until recently. Now it works except when in maintenance mode where the free STS template I'm using gets screwed up... I'll see what I'll do about it later on, it works when STS is turned off and I'll probably try to make my own template from the blank template that does work... Quote Link to comment Share on other sites More sharing options...
Ariffshah Posted October 25, 2010 Share Posted October 25, 2010 Hi, I think I have done a mistake by set the Maintenance Mode: Testing to true. Now i could not enter admin ya.. where can i adjust the script to enable back my shop to normal? Quote Link to comment Share on other sites More sharing options...
marcsinfo Posted December 23, 2010 Share Posted December 23, 2010 Hi, First I would like to thank you for this contribution that I really appreciate it works perfectly fine. The only problem I have now is when I tried to install the contribution "[TiM's osC Solutions] Require customers to login", the maintenance page does not load anymore the open and closed mode are functioning properly with this contribution. It only adds this to the application_top.php file. In /catalog/inlcudes/application_top.php *** At the end of the file, find *** ?> *** Before that, add *** // BOF: [TiM's osC Solutions] Require customers to login if (!defined('REQUIRE_LOGIN')) { tep_db_query( "insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Require login', 'REQUIRE_LOGIN', 'false', 'Require users to login before they can see the catalog. This redirects any guests to the login page.', '1', '22', now(), null, 'tep_cfg_select_option(array(\'true\', \'false\'),');" ); define('REQUIRE_LOGIN', 'false'); } if (!tep_session_is_registered('customer_id') && REQUIRE_LOGIN == 'true') { if (!in_array(basename($PHP_SELF), array(FILENAME_LOGIN, FILENAME_LOGOFF, FILENAME_PASSWORD_FORGOTTEN, FILENAME_CONTACT_US, FILENAME_SITEMAP, FILENAME_CREATE_ACCOUNT, FILENAME_CREATE_ACCOUNT_SUCCESS))) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } } // BOF: [TiM's osC Solutions] Require customers to login I don't know exactly how to add a check that if STORE_MODE is in maintenance mode, to define('REQUIRE_LOGIN', 'false'); and I'm not sure if it's the right place to modify or should the maintenance_index.php file should be modified in some way instead. Any help would be greatly appreciated. Thanks. Quote Link to comment Share on other sites More sharing options...
marcsinfo Posted December 29, 2010 Share Posted December 29, 2010 Hi, I think it was too obvious for me who don't know much about PHP, I got my self a book and found out that I just needed to add the maintenance_index.php file to the list of excluded files, so that it reads like this. // BOF: [TiM's osC Solutions] Require customers to login if (!defined('REQUIRE_LOGIN')) { tep_db_query( "insert into configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES ('Require login', 'REQUIRE_LOGIN', 'false', 'Require users to login before they can see the catalog. This redirects any guests to the login page.', '1', '22', now(), null, 'tep_cfg_select_option(array(\'true\', \'false\'),');" ); define('REQUIRE_LOGIN', 'false'); } if (!tep_session_is_registered('customer_id') && REQUIRE_LOGIN == 'true') { if (!in_array(basename($PHP_SELF), array(FILENAME_LOGIN, FILENAME_LOGOFF, FILENAME_PASSWORD_FORGOTTEN, FILENAME_CONTACT_US, FILENAME_SITEMAP, FILENAME_CREATE_ACCOUNT, FILENAME_CREATE_ACCOUNT_SUCCESS, MAINTENANE_INDEX.PHP))) { $navigation->set_snapshot(); tep_redirect(tep_href_link(FILENAME_LOGIN, '', 'SSL')); } } // BOF: [TiM's osC Solutions] Require customers to login For those who like me are begining with PHP. Quote Link to comment Share on other sites More sharing options...
marcsinfo Posted December 29, 2010 Share Posted December 29, 2010 Hi, Oups, sorry the .PHP should not be in there just FILENAME_MAINTENANCE_INDEX, too much pain killer's I think. Quote Link to comment Share on other sites More sharing options...
Rabarbervin Posted January 6, 2011 Share Posted January 6, 2011 I get this message when i set the store to Maintenance: Fatal error: Cannot redeclare do_magic_quotes_gpc() (previously declared in /customers/mysite.se/mysite.se/httpd.www/includes/functions/compatibility.php:18) in /customers/mysite.se/mysite.se/httpd.www/includes/functions/compatibility.php on line 30 I dont understand what to fix, so any help would make me happy! thx in advance... Rabarbervin Quote Link to comment Share on other sites More sharing options...
Rabarbervin Posted January 6, 2011 Share Posted January 6, 2011 I defined it in the names.php as you can see highlighted: define('FILENAME_COOKIE_USAGE', 'cookie_usage.php'); define('FILENAME_CREATE_ACCOUNT', 'create_account.php'); define('FILENAME_CREATE_ACCOUNT_SUCCESS', 'create_account_success.php'); define('FILENAME_DEFAULT', 'index.php'); define('FILENAME_DOWNLOAD', 'download.php'); define('FILENAME_INDEX_MAINTENANCE', 'index_maintenance.php'); define('FILENAME_INFO_SHOPPING_CART', 'info_shopping_cart.php'); define('FILENAME_LOGIN', 'login.php'); define('FILENAME_LOGOFF', 'logoff.php'); define('FILENAME_NEW_PRODUCTS', 'new_products.php'); define('FILENAME_PASSWORD_FORGOTTEN', 'password_forgotten.php'); Is this properly done? Rabarbervin Quote Link to comment Share on other sites More sharing options...
♥kymation Posted January 6, 2011 Share Posted January 6, 2011 The error message says that you added do_magic_quotes_gpc() to your includes/functions/compatibility.php twice: one on line 18 and one on line 30. Go delete one of them. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Rabarbervin Posted January 6, 2011 Share Posted January 6, 2011 Thx for your help! But i cant find it in line 30, it´s only on line 18 as you can see highlited below: <?php /* $Id$ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2010 osCommerce Released under the GNU General Public License */ //// // Recursively handle magic_quotes_gpc turned off. // This is due to the possibility of have an array in // $HTTP_xxx_VARS // Ie, products attributes function do_magic_quotes_gpc(&$ar) { if (!is_array($ar)) return false; reset($ar); while (list($key, $value) = each($ar)) { if (is_array($ar[$key])) { do_magic_quotes_gpc($ar[$key]); } else { $ar[$key] = addslashes($value); } } reset($ar); } if (PHP_VERSION >= 4.1) { $HTTP_GET_VARS =& $_GET; $HTTP_POST_VARS =& $_POST; $HTTP_COOKIE_VARS =& $_COOKIE; Does it mean that it wants it to be written ones again in to line 30?? Rabarbervin Quote Link to comment Share on other sites More sharing options...
Rabarbervin Posted January 6, 2011 Share Posted January 6, 2011 Oh... and i didnt edit that file in anyway, its untouched, i only edited the files that the instruction told me to. Quote Link to comment Share on other sites More sharing options...
♥kymation Posted January 6, 2011 Share Posted January 6, 2011 Well, that's what the error is saying. Check that you didn't add that definition into some other file somewhere. Regards Jim Quote See my profile for a list of my addons and ways to get support. Link to comment Share on other sites More sharing options...
Melocotron Posted June 15, 2011 Share Posted June 15, 2011 Hi Scott I trying to install the contribution http://addons.oscommerce.com/info/8030 But in Step 5 and 6 i didn'f find these files on my oscommerce store: catalog/includes/template_top.php and catalog/includes/template_bottom.php I don't use templates, and i don't know if these changes are necessary to contribution works What can I do ?? Thanks Quote Link to comment Share on other sites More sharing options...
SLiCK_303 Posted June 15, 2011 Share Posted June 15, 2011 (edited) I would assume you d/l the wrong version, if you don't use osc v2.3.1 then you need to d/l the 2.2 version. http://addons.oscommerce.com/info/6332 Edited June 15, 2011 by SLiCK_303 Quote Link to comment Share on other sites More sharing options...
Melocotron Posted June 20, 2011 Share Posted June 20, 2011 HI. I istalled store mode for v.22 and open/closed mode its OK, but in maintenenance something is wrong. My clients told me that when the store is in maintenance mode, they seen anything, white screen only. Why ? something is wrong in my installation ? don't redirect correctly. In other hand, can I set the time and date to open/closed my store automatically ¡???? Thank you very much !!! pd. sorry for my bad english. Quote Link to comment Share on other sites More sharing options...
SLiCK_303 Posted June 20, 2011 Share Posted June 20, 2011 goto admin/Configuration/Store Mode and make sure 'Maintenance Page' is set to index_maintenance.php. make sure index_maintenance.php actually exists in the root folder of your website. assuming both of those things are correct, and you haven't made any changes to index_maintenance.php, then I'm outta ideas.. ;) Quote Link to comment Share on other sites More sharing options...
SLiCK_303 Posted June 20, 2011 Share Posted June 20, 2011 Actually one more thing, I assume you are not using english.. copy includes/languages/english/index_maintenance.php to includes/languages/YOUR_LANGUAGE/index_maintenance.php, changing YOUR_LANGUAGE to whatever language you are using.... Quote Link to comment Share on other sites More sharing options...
Melocotron Posted June 20, 2011 Share Posted June 20, 2011 Hi SLiCK_303 index_maintenance.php are actually in my root folder my language is spanish, and there are a copy of index_maintenanc.php frome english language in spanish languaga folder. The same error. white screen If I type mydomain.com/index_maintenance.php I can see the maintenance page. But something still wrong with redirection Restore the last backup and reinstall ??? THanks 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.