Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Shopping cart is empty?


mtnet2000

Recommended Posts

Posted

Hello, Every time I go to check out, it tells me that my cart is empty! I notice that when I shop it is in http:// but when I got to check out it goes to https:// My site link is http://networkitnow.net/catalog/ right now it is in the testing phase and I only have a few products uploaded. Any info on the site will appreciated.

Posted

Double check all the https links and cookie paths in your config files or post the config file here.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Posted

catalog/includes/configure.php is the one that would cause this problem.

Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux

Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)

Posted

Here is my configure.php file:

<?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', ''); // 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', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', '');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '');

define('HTTPS_COOKIE_PATH', '');

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

define('DIR_WS_HTTPS_CATALOG', '/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', ''); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', '');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', 'osCommerce');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

?>

Posted

Okay, basically you need to include all of the missing values in your configure.php file. This is a sample of a configure.php file for a site that's in the root directory e.g. yourdomain.com/index.php, and on a shared ssl connection (for afull ssl just enter https://yourdomain.com)

Okay, let's sort things out here.  The problem you're having is a common one.  The customer tries to Login, or to Sign Up for an account, or tries to proceed to checkout - and they end up back at the Login page again.  It has nothing to do with the login.php file.  It has everything to do with your includes.configure.php file!  This what what it should look like.  There may be variations, according to your hosting companies setup, whether you use a shared ssl, or a full sll.  This is set up for a shared sll, installed in the root directory e.g. yourdomain.com/index.php
[CODE]<?php
/*
 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.yourdomain.com/'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', 'https://servername.yourhost.com/yourdomain.com/'); //  eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', true); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.yourdomain.com/');
 define('HTTPS_COOKIE_DOMAIN', 'https://servername.yourhost.com/yourdomain.com/');
 define('HTTP_COOKIE_PATH', ''); 
 define('HTTPS_COOKIE_PATH', ''); 
 define('DIR_WS_HTTP_CATALOG', '/var/www/html/'); // absolute path required (only catalog if not installed in root directory)
 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', DIR_WS_CATALOG . 'pub/');
 define('DIR_FS_DOCUMENT_ROOT', '/var/www/html/'); (you can delete this line)
 define('DIR_FS_CATALOG', '/var/www/html/'); 
 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 (if it doesn't work try 127.0.0.1)
 define('DB_SERVER_USERNAME', 'your mysql username');
 define('DB_SERVER_PASSWORD', 'yourmysql password');
 define('DB_DATABASE', 'yourdomain_com_-_oscommerce');(default install name for database)
 define('USE_PCONNECT', 'false'); // use persistent connections?
 define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'(set to mysql)
?>

Hope this helps - Vger :D

Posted

I was having this problem as well.

Thanks for the help Vger!! :D

 

A note for others...I hesitated to try this fix because my cart seemed to work fine with Mozilla Firefox browser. So, I thought the problem was with Internet Explorer and not with my configure.php file---but I was wrong.

 

=============================

 

This is where my problem wound up being:

(yours may be different)

 

 

Before:

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

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

 

 

Now:

define('HTTP_COOKIE_PATH', '');

define('HTTPS_COOKIE_PATH', '');

 

=============================

 

Thanks again for the help Vger, you rock! :)

Posted

I'm sorry I'm lost here (Newbie)< what values do I have to enter, do I replace yourdoman.com with my domain in this configure.php and uplad to replace my current one?

Posted

I visited your shop, opened an account--"I'm testing your cart", and all seems to be working properly. I received the email nearly instantly. My browser is Mozilla Firefox.

 

Much success in your business! :D

 

--Wendy

  • 2 weeks later...
Posted

Thank You, but the problem I'm having is when you try to purchase something, when you go to checkout, the items in your cart disappear

  • 4 weeks later...
Posted

I've been struggling with this problem also:

 

Log in--click to buy some things--try to checkout--kicked back to login again--kicked to top page (occasionally I could check me out, but usually after creating a new account); this Log in--Try to Checkout--Log in again--Top Page endless loop was really frustrating the HECK out of me.

 

I use a shared SSL server and clicked to enable SSL while installing osCommerce. I used the correct address when asked for the SSL (https) server.

I noticed in the catalog/includes/configure.php file that it did not add the SSL server address to the define HTTPS COOKIE DOMAIN command line. It read:

define('HTTPS_COOKIE_DOMAIN', 'mysite.com');

 

After I changed it to:

define('HTTPS_COOKIE_DOMAIN', 'mysslserveraddress.com'); everything seemed to work perfectly.

Now, when I login at the Top (or Home) page, I can purchase items and go directly to checkout without having to log myself back in. Also, when I log off, it completely logs me off without leaving items in the cart like it would before.

So what happened is that when osCommerce installed, it asked for the secure server address for my shopping cart, but didn't copy the same address for my cookies.......it used the unsecure address instead of the secure one. I guess that caused the lock to appear when using the shopping cart, but the cookies not to function properly when purchasing and logging on or off.

  • 2 years later...
Posted
I was having this problem as well.

Thanks for the help Vger!! :D

 

A note for others...I hesitated to try this fix because my cart seemed to work fine with Mozilla Firefox browser. So, I thought the problem was with Internet Explorer and not with my configure.php file---but I was wrong.

 

=============================

 

This is where my problem wound up being:

(yours may be different)

Before:

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

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

Now:

define('HTTP_COOKIE_PATH', '');

define('HTTPS_COOKIE_PATH', '');

 

=============================

 

Thanks again for the help Vger, you rock! :)

 

 

Thanks for the assistance!! It works great. Much easier of a fix than I anticipated.

  • 8 months later...
Posted
Thanks for the assistance!! It works great. Much easier of a fix than I anticipated.

 

Just to say thanks!!

I got this fixed by leaving the cookie path empty.

Works great now...

 

I still suggest everyone to get their own SSL certificate instead of shared SSL.

Just a thought!

 

Take care.

 

Mat

  • 9 months later...
Posted

Yep solved the proplem for me.

 

I did this

 

Before:

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

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

Now:

define('HTTP_COOKIE_PATH', '');

define('HTTPS_COOKIE_PATH', '');

 

and then changed the

 

define('HTTPS_SERVER', 'https://domainname.com.au');

and

define('HTTPS_COOKIE_DOMAIN', 'domainname.com.au');

 

thanks all

Goldern

Posted

Yep solved the proplem for me.

 

I did this

 

Before:

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

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

Now:

define('HTTP_COOKIE_PATH', '');

define('HTTPS_COOKIE_PATH', '');

 

 

Hello to all!

I am a newbie at this and trying to get my cart set up at this point. I noticed the same problem and have been trying to make changes to the configure.php file with no sucess. It reads like above, ie.

define('HTTP_COOKIE_PATH', '');

define('HTTPS_COOKIE_PATH', '');

 

and I am able to shop and add items to the cart, but as soon as I go to checkout, the cart reads- (0 items)

my site is http://www.thebarbecueshopinc.com/catalog

 

PLEASE PLEASE help!!!

Archived

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

×
×
  • Create New...