Absolute Beginner Posted March 7, 2009 Share Posted March 7, 2009 Hi, I am new to OSCommerce so apologies in advance if my question has a high "dumb factor"! The site I am concerned with is up and running. I want to add the discount coupon functionality to it but would like the changes to be made in a test environment first. Can I clone the working site and have the clone (my test area) coexist alongside the live site? What I have tried so far is to clone "store" (which has catalog beneath) as "test". I have a clone of the database too. I have replaced references to "store" with "test" in both configure.php files but when I goto Modules > Order Total, Discount Coupons is not visible. I have noticed that the module directory still shows a path to order total under "store" and not "test". Where is the module directory set? Is what I am trying to do possible? What else do I need to do? Thanks in advance. A.B. Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 7, 2009 Share Posted March 7, 2009 Yes, it is possible and quite common. The paths are set in the configure files. You've most likely made a mistake there. You can post your includes/configure.php file here, without the login details, and someone will take a look at it. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Absolute Beginner Posted March 7, 2009 Author Share Posted March 7, 2009 Yes, it is possible and quite common. The paths are set in the configure files. You've most likely made a mistake there. You can post your includes/configure.php file here, without the login details, and someone will take a look at it. Jack Thanks for the reply Jack; the configure.php files are shown below. User, password, database and website entries are sanitized to protect the guilty:- After I cloned the file structure and database, apart from making the discount voucher changes, I did two things: 1) changed username, password & database name (to match my new database) in these files. 2) replaced "store" with "test" in these files to reflect the new path as directories "store" and "test" share the same parent directory. includes/configure.php below ________________________________________________________________________ <?php /* $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://mywebsite.com'); // eg, http://localhost - should not be empty for productive servers // define('HTTPS_SERVER', 'https://mywebsite.sslpowered.com/'); // eg, https://localhost - should not be empty for productive servers define('HTTPS_SERVER', 'https://mywebsite.sslpowered.com'); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'mywebsite.com'); // define('HTTPS_COOKIE_DOMAIN', 'secure.sslpowered.com'); define('HTTPS_COOKIE_DOMAIN', 'mywebsite.sslpowered.com'); define('HTTP_COOKIE_PATH', '/test/catalog/'); define('HTTPS_COOKIE_PATH', '/test/catalog/'); define('DIR_WS_HTTP_CATALOG', '/test/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/test/catalog/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME'])); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', 'MYSQLHOST'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', '********'); define('DB_SERVER_PASSWORD', '********'); define('DB_DATABASE', '********'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ?> ________________________________________________________________________________ _ admin/includes/configure.php below ________________________________________________________________________________ _ <?php /* $Id: configure.php,v 1.14 2003/02/21 16:55:24 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License */ // define our webserver variables // FS = Filesystem (physical) // WS = Webserver (virtual) define('HTTP_SERVER', 'https://mywebsite.sslpowered.com/'); // eg, http://localhost or - https://localhost define('HTTP_CATALOG_SERVER', 'http://mywebsite.com'); define('HTTPS_CATALOG_SERVER', 'https://mywebsite.sslpowered.com/'); define('ENABLE_SSL_CATALOG', 'true'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT . '/test/catalog/' ); // where your pages are located on the server. define('DIR_WS_ADMIN', '/test/catalog/admin/'); define('DIR_FS_ADMIN', $DOCUMENT_ROOT . '/test/catalog/admin/'); define('DIR_WS_CATALOG', HTTP_SERVER.'/test/catalog/'); define('DIR_FS_CATALOG', $DOCUMENT_ROOT . '/test/catalog/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); // define our database connection define('DB_SERVER', 'MYSQLHOST'); define('DB_SERVER_USERNAME', '********'); define('DB_SERVER_PASSWORD', '********'); define('DB_DATABASE', '********'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> _______________________________________________________________ Thanks, A.B. Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 7, 2009 Share Posted March 7, 2009 Is the url for the test site http://mywebsite.com/test/catalog? Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Absolute Beginner Posted March 7, 2009 Author Share Posted March 7, 2009 Is the url for the test site http://mywebsite.com/test/catalog? Jack Yes it is although I am obviously using "mywebsite" rather than the real one. The live (and working store) can be represented as http://mywebsite.com/store/catalog and my test site can be represented as http://mywebsite.com/test/catalog. The stage I am at currently is the section "Install the Discount Coupon order total module" from kgt's discount coupon package. In his documentation, he states "... Log into your admin section and go to Modules > Order Total. Select the Discount Coupons module and click the Install button in the box on the right. Ensure the module is enabled. The installation should now be complete. The module will automatically create the database tables needed, there is no SQL script you need to run, unless the script encountered an error creating the tables (this can happen if the user osCommerce connects with does not have CREATE TABLE permissions). See the common problems section if you need to manually run the create table statements..." When I view Modules > Order Total, I do not see the Discount Coupons module but I do see that Module Directory is pointing to the live Order Total module and not the one in my test environment. Thanks. A.B. Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 7, 2009 Share Posted March 7, 2009 Oh, so the shop side of the test shop is working. It is just the admin that needs help. In that case, these are incorrect define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT . '/test/catalog/' ); // where your pages are located on the server. define('DIR_WS_ADMIN', '/test/catalog/admin/'); define('DIR_FS_ADMIN', $DOCUMENT_ROOT . '/test/catalog/admin/'); define('DIR_WS_CATALOG', HTTP_SERVER.'/test/catalog/'); define('DIR_FS_CATALOG', $DOCUMENT_ROOT . '/test/catalog/'); Try this instead define('DIR_FS_DOCUMENT_ROOT', '/home/username/public_html/test/'); define('DIR_WS_ADMIN', '/admin/'); define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN); define('DIR_WS_CATALOG', '/'); define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG); You need to change the first entry to the correct path. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Absolute Beginner Posted March 7, 2009 Author Share Posted March 7, 2009 Oh, so the shop side of the test shop is working. It is just the admin that needs help. In that case, these are incorrectdefine('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT . '/test/catalog/' ); // where your pages are located on the server. define('DIR_WS_ADMIN', '/test/catalog/admin/'); define('DIR_FS_ADMIN', $DOCUMENT_ROOT . '/test/catalog/admin/'); define('DIR_WS_CATALOG', HTTP_SERVER.'/test/catalog/'); define('DIR_FS_CATALOG', $DOCUMENT_ROOT . '/test/catalog/'); Try this instead define('DIR_FS_DOCUMENT_ROOT', '/home/username/public_html/test/'); define('DIR_WS_ADMIN', '/admin/'); define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN); define('DIR_WS_CATALOG', '/'); define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG); You need to change the first entry to the correct path. Jack I've tried that but without success. What is confusing me at the moment is how does it know which set of configure.php files to use? I have a set for "store" and a set for "test" and they are located in different places. Unless it knows where to find the correct files, any settings in them will not be read. Should there be something in the environment that tells it to go look in "store" or go look in "test"? Thanks, A.B. Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 8, 2009 Share Posted March 8, 2009 The url tells it where to go. That's why I asked what the url was. If the url is http://mywebsite.com/test/catalog, then the configure files are loaded from the test/catalog/includes and test/catalog/admin/includes directories. Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Absolute Beginner Posted March 8, 2009 Author Share Posted March 8, 2009 Hi Jack, I have had some success and have assessed myself a dumb factor of 8.5 I was sent a link to the login page and have been using that all along. The link was pointing to the live environment so it is not really surprising I was having problems seeing the Discount Coupon module in the test environment (ok, a dumb factor of 8.8) Thanks for your help and for being patient with me on my first outing on this forum. I will put together and post a "how to" to help others in case they find themselves in a similar position. It will also help me should I forget! Thanks again. (Still an) Absolute Beginner Link to comment Share on other sites More sharing options...
Jack_mcs Posted March 9, 2009 Share Posted March 9, 2009 No problem, glad I could help. :) Jack Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.