Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

add to cart not working


whitewolfspirits

Recommended Posts

I have been searching for awhile and I have not been able to find a solution to this so figured I would ask here. I have used OsCommerce before and never had this problem. My add to cart is not working. It just returns an empty cart. Any help would be appreciated. The site is reptees.com. Thank you.

White Wolf Spirits

Link to comment
Share on other sites

@@whitewolfspirits

 

TURN OFF "Enable search engine safe URL's" in the admin area under configution >> my store. This feature has NEVER worked and should have been removed from osCommerce a long time ago.

 

 

 

Chris

Link to comment
Share on other sites

Hi There,

Got the same problem and I got PHP version 5.4. I did the whole step-by-step instructions about SSL (also on this forum), but it didn't make a difference, so I set the files to the original state. Tried both logged in as customer as not logged in and in IE and Firefox, but the shopping cart stays empty.

http://www.graftobian.nl/index_org.php is my temporary shoplandingpage (index.html is now used for the landingpage on domain and yes I was stupid enough not to check my backed-up database when I upgraded from 2.3.1 to 2.3.3 the shop so now I don't have anything and stressfull this version doesn't work)

I would really be very thankfull if a solution can be found...

Link to comment
Share on other sites

Weird enough; I haven't changed a single thing, and decide to add some products for the time being. I couldn't resist testing the newly added products if they had the same problem and for a mysterious reason the new product COULD be added to the cart and the check-out works fine till now.

I deleted the product that was already in the shop, re-created it and also this product doesn't cause the non-add-behaviour....

Link to comment
Share on other sites

Non adding to cart is almost always one of two things;

 

1. /includes/configure.php is incorrectly configured

or

2. product has attributes attached (and for some other reason, these are not being correctly processed)

Link to comment
Share on other sites

  • 4 months later...
  • 6 months later...

Hi,

I have, more or less, the same problem.

The adding to the cart worked fine, I've added attributes to the products and now it isn't working anymore for the products with attributes.

 

Is there a general solution for this? I've tried debugging this and the problem seems, to me, to be in the creation of the form 'cart_quantity' in product_info.php.

In most cases I get redirected to the index.php.

Is there a solution known solution for this?

 

Thank you!

Link to comment
Share on other sites

  • 1 month later...

Same problem.

 

osCommerce: 2.3.4

PHP Version: 5.3.28

session.auto_start off and off (local and master)

no product attributes

browser tested on: Firefox (latest)

 

Only at times does this happen, but when going back to the product (or to any other product) and adding it to cart, it works as it should.

 

Any help would be appreciated :)

Link to comment
Share on other sites

Try setting your cookie domain in includes/configure

 

  define('HTTP_COOKIE_DOMAIN', 'www.xxxxxx.com');
  define('HTTPS_COOKIE_DOMAIN', 'www.xxx.com');

 

sometimes with the www sometimes without.

 

Regards

Jolli

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

Try setting your cookie domain in includes/configure

 

  define('HTTP_COOKIE_DOMAIN', 'www.xxxxxx.com');

  define('HTTPS_COOKIE_DOMAIN', 'www.xxx.com');

 

sometimes with the www sometimes without.

 

Regards

Jolli

 

Thanks for the quick response. I seem to have fixed it by changing:

 

define('HTTP_COOKIE_DOMAIN', 'www.domain.com');

to:

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

 

I believe this might cover the url with and without www?

Link to comment
Share on other sites

Thanks for the quick response. I seem to have fixed it by changing:

 

define('HTTP_COOKIE_DOMAIN', 'www.domain.com');

to:

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

 

I believe this might cover the url with and without www?

 

Update:

I still seem to be getting the issue with:

define('HTTP_COOKIE_DOMAIN', 'www.domain.com');

and

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

and

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

 

:wacko:

 

Maybe it will help adding:

- I am currently working in a subdirectory domain.com/test (current oscommerce v2.2 on root directory)

- the /test directory is password protected with .htaccess

- cookie path is set as: define('HTTP_COOKIE_PATH', '/test/');

- the url stays with the prefix www. on all pages

Link to comment
Share on other sites

Check in your admin under configuration if the cache and sessions directory are set to the right path  and not going to top level   blah...blah.../test/includes/work

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

Hi

 

I can't see anything related to cache/sessions under the admin configure.php. The current file contents are:

 

  define('HTTP_SERVER', 'http://www.domain.com');
  define('HTTPS_SERVER', 'http://www.domain.com');
  define('ENABLE_SSL', false);
  define('HTTP_COOKIE_DOMAIN', '.domain.com');
  define('HTTPS_COOKIE_DOMAIN', '/test/');
  define('HTTP_COOKIE_PATH', '/test/');
  define('HTTPS_COOKIE_PATH', '/test/');
  define('DIR_WS_HTTP_CATALOG', '/test/');
  define('DIR_WS_HTTPS_CATALOG', '/test/');
  define('DIR_WS_IMAGES', 'images/');
  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 
  define('DIR_WS_INCLUDES', 'includes/');
  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', '/home/username/public_html/test/');
  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

  define('DB_SERVER', 'localhost');
  define('DB_SERVER_USERNAME', '####');
  define('DB_SERVER_PASSWORD', '####');
  define('DB_DATABASE', '####');
  define('USE_PCONNECT', 'false');
  define('STORE_SESSIONS', 'mysql');
  define('CFG_TIME_ZONE', 'UTC');

Link to comment
Share on other sites

Hi

 

I can't see anything related to cache/sessions under the admin configure.php. The current file contents are:

 

  define('HTTP_SERVER', 'http://www.domain.com');

  define('HTTPS_SERVER', 'http://www.domain.com');

  define('ENABLE_SSL', false);

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

  define('HTTPS_COOKIE_DOMAIN', '/test/');

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

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

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

  define('DIR_WS_HTTPS_CATALOG', '/test/');

  define('DIR_WS_IMAGES', 'images/');

  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

 

  define('DIR_WS_INCLUDES', 'includes/');

  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', '/home/username/public_html/test/');

  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

  define('DB_SERVER', 'localhost');

  define('DB_SERVER_USERNAME', '####');

  define('DB_SERVER_PASSWORD', '####');

  define('DB_DATABASE', '####');

  define('USE_PCONNECT', 'false');

  define('STORE_SESSIONS', 'mysql');

  define('CFG_TIME_ZONE', 'UTC');

Not in your configure in the admin dashboard itself there are x 2 links one for sessions and one for cache it is possible your sessions are being stored on the main site and not in test which would explain why you sometimes lose the session.

 

Oh and i just noticed you mention above "(current oscommerce v2.2 on root directory)"  why are you working with an old outdated version of oscommerce you should be using 2.3.4

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

Hi

 

I have been running oscommerce v2.2 for a few years (located on the root directory), but since I wish to update PHP on the server and was unable to solve certain issues with the latest PHP (and v2.2), I decided to redo the store with osCommerce 2.3.4, temporary using the subdirectory "test" for setting up everything before replacing the store running on v2.2.

All my discussions are related to v2.3.4, and not v2.2 :)

 

Currently my settings in admin are:

Cache settings:

Use cache: False

Cache Directory: /home/username/public_html/test/includes/work/

 

Sessions settings:

Session Directory /home/username/public_html/test/includes/work/ icon_arrow_right.gif

Force Cookie Use False icon_info.gif

Check SSL Session ID False icon_info.gif

Check User Agent False icon_info.gif

Check IP Address False icon_info.gif

Prevent Spider Sessions True icon_info.gif

Recreate Session True

Link to comment
Share on other sites

:thumbsup:  good just thought  for a minute oh oh

 

Well the admin looks ok the sessions are there where they should be wonder if it could be that your  

 

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

 

is protected by the .htaccess??

 

try turning the password protection of and put a no index robots text for google and see and what happens.

 

Regards

Joli

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

Hi

 

I removed the .htaccess password for the /test subdirectory and still get the issue. I have not put a no index robots text for google, but that is just to prevent google from crawling my test site, so shouldn't affect anything else?

The problem is very unpredictable - unable to find a pattern for when it happens :(

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...