Red Bridge Internet is a San Francisco WordPress Consulting firm specializing in WordPress websites and WordPress Plugin Development. We're the ones you have been searching for.

osCommerce with SSL Shopping Cart empty

There is a minor issue with osCommerce when using either 3rd party or ssl certificates assigned to a sub-domain which results in an error reading “Your Shopping Cart is empty!”. This happens when ENABLE_SSL is set to true in the configuration file. There has been some discussion on the osCommerce Forums regarding “Shopping cart empty when checkout is clicked“.

The error is most often seen after adding a product to your osCommerce Shopping Cart. The shopping cart will show the proper products, however, when navigating to checkout the screen returns “Your Shopping Cart is empty!”. This happens due to osCommerce storing the cookie on 2 separate domains. In most osCommerce configurations you’ll see people setting up their sites like so:

define(‘HTTP_SERVER’, ‘http://www.domain.com’);
define(‘HTTPS_SERVER’, ‘https://secure.domain.com’);
define(‘ENABLE_SSL’, true);
define(‘HTTP_COOKIE_DOMAIN’, ‘www.domain.com’);
define(‘HTTPS_COOKIE_DOMAIN’, ‘secure.domain.com’);
define(‘HTTP_COOKIE_PATH’, ‘www.domain.com’);
define(‘HTTPS_COOKIE_PATH’, ‘secure.domain.com’);

This configuration is incorrect in that osCommerce has a hard time distinguishing the cookies. What you need to do is store the cookies at the main domain without the sub. I had changed the configuration file to read:

define(‘HTTP_SERVER’, ‘http://www.domain.com’);
define(‘HTTPS_SERVER’, ‘https://secure.domain.com’);
define(‘ENABLE_SSL’, true);
define(‘HTTP_COOKIE_DOMAIN’, ‘domain.com’);
define(‘HTTPS_COOKIE_DOMAIN’, ‘domain.com’);
define(‘HTTP_COOKIE_PATH’, ‘/’);
define(‘HTTPS_COOKIE_PATH’, ‘/’);

By changing my osCommerce configuration file to set the cookie at the root domain, I have been able straigten out the SSL/HTTPS issue and allow the shopping cart to flow forward with the order.

I am using both Purchase Without Account and Advanced SEO for osCommerce through MagneticOne and everything is stable and processing orders.

Incoming search terms:

  • your shopping cart is empty oscommerce
  • oscommerce shopping cart empty
  • your shopping cart is empty
  • Your Shopping Cart is empty! oscommerce
  • adding products shopping cart empty oscommerce
  • oscommerce shopping cart problem
  • oscommerce your shopping cart is empty
  • shoping basket empty oscommerce
  • oscommerce ssl shopping cart
  • oscommerce empty cart in ssl

Related posts:

  1. osCommerce Popular Contributions Lists
  2. osCommerce Purchase Without Account Database Error
  3. Print Category Name as Title in osCommerce
  4. Link osCommerce infoBox Heading
  5. Increase Category Name Length in osCommerce

One response to “osCommerce with SSL Shopping Cart empty”

  1. Jessica

    this worked for me! Thank you for a solution after other people’s solution did not work.

Leave a Reply