Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Customer Login & Cart problems


pbeuger

Recommended Posts

I have the following two problems while setting up osCommerce...

 

1. When a customer logs in most of the time it still says "Welcome Guest!" on the main page although there is no error message like when you type the wrong name or password.

When it does work, the customer is asked to log again and again at every step of the check out procedure.

 

2. Regardless of being logged in or guest, the cart does not work right. Sometimes you add something to the cart it shows 'cart empty' on the cart page that is displayed right after you click add.

Other times the cart shows something in it (on the top right of every page) but then it shows something else in the cart the next page you visit.

 

I switched sessions from files to database, created a different session directory, but no luck.

 

Thanks in advance,

 

Paul.

Link to comment
Share on other sites

It sounds as if you do not have cookies and/or SSL configured properly. Post the first 20 lines of your catalog/include/configure.php file (don't include the database stuff at the bottom).

Link to comment
Share on other sites

SAME HERE :(

 

 

I have the following two problems while setting up osCommerce...

 

1. When a customer logs in most of the time it still says "Welcome Guest!" on the main page although there is no error message like when you type the wrong name or password.

When it does work, the customer is asked to log again and again at every step of the check out procedure.

 

2. Regardless of being logged in or guest, the cart does not work right. Sometimes you add something to the cart it shows 'cart empty' on the cart page that is displayed right after you click add.

Other times the cart shows something in it (on the top right of every page) but then it shows something else in the cart the next page you visit.

 

I switched sessions from files to database, created a different session directory, but no luck.

 

Thanks in advance,

 

Paul.

Link to comment
Share on other sites

SAME HERE  :(

 

Well Steve told you what the probable problem was and what to do.

Post your configure.php file (minus the db info) like he suggested and we will take a look at it and try to help.

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

Actually I believe I found the issue. As I said in my first post I had tried switching sessions from files to the database. However, I did this by re-running Install while config.php permissions were still set to read-only.

Although I did not get any error messages, the define('STORE_SESSIONS' line was still set to ''. After I manually changed it to 'mysql' as described in the comment for that line all seems to work well.

 

As for the rest of the config.php file HTTP_COOKIE_DOMAIN is set to my domain, and HTTP_COOKIE_PATH to /catalog/. I do not use HTTPS.

 

Thanks,

 

Paul.

Link to comment
Share on other sites

Similiar problem, here is my configure.php:

define('HTTP_SERVER', 'http://autoramatv.netfirms.com');

define('HTTPS_SERVER', 'https://autoramatv.sslpowered.com');

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'autoramatv.netfirms.com');

define('HTTPS_COOKIE_DOMAIN', 'autoramatv.sslpowered.com');

define('HTTP_COOKIE_PATH', '/eShop/nfoscomm/catalog/');

define('HTTPS_COOKIE_PATH', '/eShop/nfoscomm/catalog/');

define('DIR_WS_HTTP_CATALOG', '/eShop/nfoscomm/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/eShop/nfoscomm/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');

define('DB_SERVER_USERNAME', 'XXXXX');

define('DB_SERVER_PASSWORD', 'YYYYY');

define('DB_DATABASE', 'ZZZZZZ');

define('USE_PCONNECT', 'true');

define('STORE_SESSIONS', 'mysql');

 

When I try to checkout, it shows a different shopping cart with different amounts and won't go to the checkout. Please Help.

Link to comment
Share on other sites

define('USE_PCONNECT', 'true'); //make it false

 

try this, for this line of code

 

define('HTTPS_COOKIE_PATH', '');

 

You have quite a complicated setup, which is causing you problems. First of all it appears to be on a subdomain, and secondly you have it set several levels above the root e.g. '/eShop/nfoscomm/catalog/'. Is there any reason why it can't just be in /catalog/, or even in the root directory?

 

Vger

Link to comment
Share on other sites

  • 3 weeks later...

HI everyone,

 

I'm having the same issues and then some! :(

 

 

First off:

<?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 (c) 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://www.remansurplus.com/'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', 'false'); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'http://www.remansurplus.com/');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', 'http://www.remansurplus.com/');
 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', 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', 'localhost'); // eg, localhost - should not be empty for productive servers
 define('DB_SERVER_USERNAME', 'user');
 define('DB_SERVER_PASSWORD', 'pass');
 define('DB_DATABASE', 'osCommerce');
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'
?>

 

 

 

Session Config:

 

Session Directory /tmp

Force Cookie Use False

Check SSL Session ID False

Check User Agent True

Check IP Address True

Prevent Spider Sessions True

Recreate Session False

 

With it off I have no issues with adding to my cart or logging in, except it forgets I'm logged in when I click the home page links... (obvious)

 

When I turn "Force Cookies" on it sends me to the no cookies page... Even though I am allowing all IE 6... I checked my cookies and nothing is coming threw from that URL...?

 

Is this a known bug?

 

Additionally:

 

Why does the footer not show correctly in the majority of pages?

Link to comment
Share on other sites

It's your bug. The HTTP_COOKIE_DOMAIN define is just that, a domain, NOT a URL. You want:

define('HTTP_COOKIE_DOMAIN', 'remansurplus.com');

 

Your site doesn't work much at all for me - I get no links on the page.

Link to comment
Share on other sites

What you really mean to say is that Force Cookie Use does not work if you are using shared SSL. In this case, he is not using SSL at all, so Force Cookie Use will work fine (if configured properly.)

Link to comment
Share on other sites

The 'Force Cookie Use' feature only works when you have a full ssl installed.

 

Stop saying that cause you are wrong and you have posted the same thing in another thread! :P

 

stevel,

 

Thanks much I got home and tested it local and it works great! :rolleyes:

Link to comment
Share on other sites

Actually, there is a way of getting it to work, even on a shared ssl, but it requires a lot of explanation and the solution is not 'tidy' - so I tend to stick with 'it don't work' it's a lot simpler and usually avoids long postings. He's right though that I failed to notice that ssl (of any sort) wasn't enabled on this domain and so, yes, Force Cookie Use will work. And 'No' I am not posting the workaround for shared ssl.

 

Vger

:P

Stop saying that cause you are wrong and you have posted the same thing in another thread! :P

 

stevel,

 

Thanks much I got home and tested it local and it works great! :rolleyes:

Link to comment
Share on other sites

It would appear that you have an unclosed tr tag on the page - the one that comes after <!-- body //--> is unclosed, but that's probably because there's an extra tr in the rest of the page somewhere. This is causing the footer problems. What I find curious is that I see this only the first time I load one of your category pages - subsequent loads are fine. Strange.

Link to comment
Share on other sites

Hello all..

I am having the same problem... I have read this thread and many others, tried all the suggestions and nothing seems to work. I give up. If anyone of you can set this thing up for me, email me with your price and I'll contact you... I've wasted enough time.

 

Thanks,

Doug

[email protected]

Link to comment
Share on other sites

  • 3 weeks later...
The 'Force Cookie Use' feature only works when you have a full ssl installed.

 

Vger

 

I was wondering if someone could help me understand the above statement better. I am hosting my site on a virtual server... the host has their other customer's sites hosted on the same machine as mine.

 

I purchased an SSL from them for my site. Does the fact that it is a virtual server with many sites on it have anything to do with my SSL Certificate being shared or not?

 

In other words how do I find out if my SSL Certificate and SSL is shared or not? I am not sure exactly what to ask my host to get this answered. Can someone help me figure this out or suggest how I should word the question to my host?

 

Also, if you set OSC to "force cookies" what happens if the person viewing your site has cookies disabled? I know with php if cookies are disabled it will add the session ID as a querry string to the end of all links on your web pages. But what if you have Search Engine Friendly URLs set to true in OSC. Does this effect anything?

 

I am relatively new to all of this... other than reading about things in books and on the web I have never put any of this into practice. So I was hoping someone could help me understand what is going on and the best way to configure OSC.

 

Thanks for you time everyone.

 

Eric B

AJ2000

Link to comment
Share on other sites

Vger's statement is shorthand for "Force Cookie Usage" works only when your HTTPS_COOKIE_DOMAIN is the same as your HTTP_COOKIE_DOMAIN. This is true for when you have an SSL certificate for your domain, false if you are using your host's "shared SSL", where the certificate uses the host's domain name. It has nothing to do with shared hosting, per se.

 

Vger is also known to remark that there is a way to make Force Cookie Use with shared SSL, but this requires some mod_rewrite code and isn't something really recommended.

Link to comment
Share on other sites

Vger's statement is shorthand for "Force Cookie Usage" works only when your HTTPS_COOKIE_DOMAIN is the same as your HTTP_COOKIE_DOMAIN.  This is true for when you have an SSL certificate for your domain, false if you are using your host's "shared SSL", where the certificate uses the host's domain name.  It has nothing to do with shared hosting, per se.

 

Vger is also known to remark that there is  a way to make Force Cookie Use with shared SSL, but this requires some mod_rewrite code and isn't something really recommended.

 

Would I even need to use cookies if I am using php sessions?

 

And if someone has cookies disabled on their browser php usually will add the session id as a query string at the end of all links on the webpage.... but what happens if you have Search Engine Friendly URLs turned on? Will this cause problems with session ids which are appended as query strings?

 

Thanks

Eric B

AJ2000

Link to comment
Share on other sites

Would I even need to use cookies if I am using php sessions?

 

And if someone has cookies disabled on their browser php usually will add the session id as a query string at the end of all links on the webpage.... but what happens if you have Search Engine Friendly URLs turned on? Will this cause problems with session ids which are appended as query strings?

 

Thanks

Eric B

 

To clarify my above question.

I really don't understand the purpose of force cookies... what is it used for?

 

Why use force cookies if you are using php sessions?

 

Thanks

Eric B

AJ2000

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...