MarceKMBA Posted August 4, 2010 Posted August 4, 2010 I had originally installed my OsCommerce cart under mydomainname/Cart, because I was using another web template. I decided to get rid of the other template and move my Cart to the main page, so when people went to my URL they would see the cart (instead of having to go to /Cart). I moved it according to the instructions provided to me by my host, I did a search replace on "/Cart/" to "/" on the "configure.php" file and then also on the "admin/includes/configure.php" file. However, I find now, when I try and log in and add things to my cart, when I go to check out, my cart empties and I'm prompted to log in again. This is for both existing test accounts and new accounts. This functionality worked fine before the move, but isn't working now. Obviously this is a pretty important for my site and business, does anyone have any ideas about what I might have missed, or where I need to look to correct this? Please help. Thanks!!
artful Posted August 4, 2010 Posted August 4, 2010 I had originally installed my OsCommerce cart under mydomainname/Cart, because I was using another web template. I decided to get rid of the other template and move my Cart to the main page, so when people went to my URL they would see the cart (instead of having to go to /Cart). I moved it according to the instructions provided to me by my host, I did a search replace on "/Cart/" to "/" on the "configure.php" file and then also on the "admin/includes/configure.php" file. However, I find now, when I try and log in and add things to my cart, when I go to check out, my cart empties and I'm prompted to log in again. This is for both existing test accounts and new accounts. This functionality worked fine before the move, but isn't working now. Obviously this is a pretty important for my site and business, does anyone have any ideas about what I might have missed, or where I need to look to correct this? Please help. Thanks!! Hi, When you transferred your modified configure files did you think to change the permissions to let them be writeable before transferring as the 444 permission will not allow the change. You need to make them writeable on the server just the time necessary to transfer and then put them back to the protected unwriteable permission. Try and see if it works. Barbara
MrPhil Posted August 4, 2010 Posted August 4, 2010 You should have left your cart installed where it was, and used .htaccess redirection to transparently transfer visitors from / to /Cart. Much better that way. I presume that you've already moved your files and all, so now you have to figure out how to clean up the mess. As mentioned, check that your configuration changes actually "took" (files weren't read-only), and that you didn't miss any (including "local" copies). Clear all your browser caches and shopping cart cookies. I don't know if there's any path information stored in the database -- hopefully not.
MarceKMBA Posted August 5, 2010 Author Posted August 5, 2010 Hi, When you transferred your modified configure files did you think to change the permissions to let them be writeable before transferring as the 444 permission will not allow the change. You need to make them writeable on the server just the time necessary to transfer and then put them back to the protected unwriteable permission. Try and see if it works. Barbara When I look at the code on the configuration files on the server, they look correct - if it was a permission issue, they would still have the old information. Where I see the problem right now is in 2 places - when I click to "check out" my cart gets emptied - if I log in, it takes me to the catalog, and if I click on an image on the catalog, it takes me back to the customer log in screen, then the next time I log in, it takes me back to the log in screen, and it repeats between these two scenarios. Is there a file I should be looking at that deals with that aspect? Just to confirm, the only two places that should be pointing to Cart are: configure.php on the root folder configuration.php in the admin/includes
artful Posted August 5, 2010 Posted August 5, 2010 When I look at the code on the configuration files on the server, they look correct - if it was a permission issue, they would still have the old information. Where I see the problem right now is in 2 places - when I click to "check out" my cart gets emptied - if I log in, it takes me to the catalog, and if I click on an image on the catalog, it takes me back to the customer log in screen, then the next time I log in, it takes me back to the log in screen, and it repeats between these two scenarios. Is there a file I should be looking at that deals with that aspect? Just to confirm, the only two places that should be pointing to Cart are: configure.php on the root folder configuration.php in the admin/includes Before going farther let's just check those configure files again: root : includes/configure.php should be : ************ <?php define('HTTP_SERVER', 'http://www.mydomain.com'); define('HTTPS_SERVER', 'http://www.mydomain.com'); //if no SSL, otherwise use the https://www.mydomain.com define('ENABLE_SSL', false); // if using SSL and the https: use true define('HTTP_COOKIE_DOMAIN', 'www.mydomain.com'); define('HTTPS_COOKIE_DOMAIN', 'www.mydomain.com'); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_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', '/xxx/public/www/'); //according to your hosting setup, just an example define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', ''); define('DB_SERVER_USERNAME', ''); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', ''); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> ********************** admin/includes/configure.php should be : ********************** <?php define('HTTP_SERVER', 'http://www.mydomain.com'); define('HTTPS_SERVER', 'http://www.mydomain.com'); define('ENABLE_SSL', false); define('HTTP_COOKIE_DOMAIN', 'www.mydomain.com'); define('HTTPS_COOKIE_DOMAIN', 'www.mydomain.com'); define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_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', '/xxx/public/www/'); //according to your hosting setup, just an example define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DB_SERVER', ''); define('DB_SERVER_USERNAME', ''); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', ''); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?>
danpep Posted August 5, 2010 Posted August 5, 2010 You should have left your cart installed where it was, and used .htaccess redirection to transparently transfer visitors from / to /Cart. Much better that way. I presume that you've already moved your files and all, so now you have to figure out how to clean up the mess. As mentioned, check that your configuration changes actually "took" (files weren't read-only), and that you didn't miss any (including "local" copies). Clear all your browser caches and shopping cart cookies. I don't know if there's any path information stored in the database -- hopefully not. I am in the same boat here. I'm not that great .htaccess or modRewrite (I assume that's what you are referring to). Can you give an example of how to rewrite the URL if your cart was in a directory called "/cart/" Also, would the URL in the browser still display "websitename.com/cart/" or is there a way to just rewrite the url to be "websitename.com/"
MrPhil Posted August 5, 2010 Posted August 5, 2010 RewriteEngine On RewriteCond %{REQUEST_URI} !^/cart RewriteRule ^(.*)$ /cart/$1 Try that, at least to start. Any URL not starting with /cart should get it added. The URL in the browser should be unchanged... if you entered http://websitename.com/, it should stay that.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.