osCommerce and osCMax shopping cart software forums

Shopping Cart Software

osCommerce with teeth!

 

Can not add items to shopping cart

This is a discussion on Can not add items to shopping cart within the osCMax v1.7 Installation forums, part of the osCMax v1.7 Forums category; I've been working with a new installation for about a month now and I've been unable to get ...


Go Back   osCommerce and osCMax shopping cart software forums > osCMax v1.7 Forums > osCMax v1.7 Installation

Register FAQ Members List Calendar Mark Forums Read


Free community membership! Fast easy FREE membership
Closed Thread

 

LinkBack Thread Tools
  #1  
Old 05-15-2005, 07:24 PM
New Member
 
Join Date: May 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
sjleather
Default Can not add items to shopping cart

I've been working with a new installation for about a month now and I've been unable to get items to add to the shopping cart at all. No matter what changes I've made to configure.php or my supporting server's directory security, I always get "Your Shopping Cart is empty!" when I try to add an item via buy now or add to cart. I get no errors in my browser or in my log files.

All my files are currently in my https directory and my configure.php file reflects this.

osCommerce 2.2-MS2
PHP Version 4.3.2 (Zend: 1.3.0)
Apache/2.0.46 (Red Hat)
MySQL 3.23.58
using Plesk 7.0.4 to manage server which auto-installed osCommerce
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #2  
Old 05-15-2005, 08:38 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,247
Thanks: 66
Thanked 294 Times in 280 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default RE: Can not add items to shopping cart

This is a common symptom if your session settings are incorrect for your server, or your cookie domain settings are wrong.

What is your servers root path, your home path? Post a copy of your configure.php (minus the database info).
__________________
Michael Sasek
osCMax Developer


osCMax Templates - Hundreds of premium quality templates. New designs every month!

xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience


osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #3  
Old 05-16-2005, 05:06 PM
New Member
 
Join Date: May 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
sjleather
Default RE: Can not add items to shopping cart

Server's root path
/home/httpd/vhosts/sjleather.com/httpsdocs/osCommerce/
Home path
/home/httpd/vhosts/sjleather.com/

My configure.php files are different, I wasn't sure if I was supposed to match the fields up from one to the other as some of the admin utilities change only one of them. I couldn't find any reference to which one is used when.

I'm currently using a shared ssl certificate for testing.

configure.php from includes directory:
define('HTTP_SERVER', 'https://www.sjleather.com');
define('HTTPS_SERVER', 'https://www.sjleather.com');
define('ENABLE_SSL', 'true');
define('HTTP_COOKIE_DOMAIN', 'www.sjleather.com');
define('HTTPS_COOKIE_DOMAIN', '');
define('HTTP_COOKIE_PATH', '/osCommerce/');
define('HTTPS_COOKIE_PATH', '');
define('DIR_WS_HTTP_CATALOG', '/osCommerce/');
define('DIR_WS_HTTPS_CATALOG', '/osCommerce/');
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('STORE_SESSIONS', 'mysql');

configure.php from admin/includes

define('HTTP_SERVER', 'https://www.sjleather.com');
define('HTTPS_SERVER', 'https://www.sjleather.com');
define('HTTP_CATALOG_SERVER', 'https://www.sjleather.com');
define('HTTPS_CATALOG_SERVER', 'https://www.sjleather.com');

define('HTTP_COOKIE_DOMAIN', 'www.sjleather.com');
define('HTTPS_COOKIE_DOMAIN', '');
define('HTTP_COOKIE_PATH', '/osCommerce/');
define('HTTPS_COOKIE_PATH', '');
define('DIR_WS_HTTP_CATALOG', '/osCommerce/');
define('DIR_WS_HTTPS_CATALOG', '/osCommerce/');

define('ENABLE_SSL_CATALOG', 'true');
define('DIR_FS_DOCUMENT_ROOT', '/home/httpd/vhosts/sjleather.com/httpsdocs');
define('DIR_WS_ADMIN', '/osCommerce/admin/');
define('DIR_FS_ADMIN', '/home/httpd/vhosts/sjleather.com/httpsdocs/osCommerce/admin');
define('DIR_WS_CATALOG', '/osCommerce/');
define('DIR_FS_CATALOG', '/home/httpd/vhosts/sjleather.com/httpsdocs/osCommerce/');
define('DIR_WS_IMAGES', 'images/');
define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
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_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

define('STORE_SESSIONS', 'mysql');
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #4  
Old 05-16-2005, 09:35 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,247
Thanks: 66
Thanked 294 Times in 280 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default RE: Can not add items to shopping cart

All of these are wrong:
Code:
define('HTTP_COOKIE_DOMAIN', 'www.sjleather.com'); 
define('HTTPS_COOKIE_DOMAIN', ''); 
define('HTTPS_COOKIE_PATH', '');
Based on your domain and path info, they should be:

Code:
define('HTTP_COOKIE_DOMAIN', 'sjleather.com'); 
define('HTTPS_COOKIE_DOMAIN', 'sjleather.com'); 
define('HTTPS_COOKIE_PATH', '/osCommerce/');
The admin configure.php is used for the Admin panel and the catalog configure.php file is used for the catalog.
__________________
Michael Sasek
osCMax Developer


osCMax Templates - Hundreds of premium quality templates. New designs every month!

xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience


osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #5  
Old 05-17-2005, 11:20 AM
New Member
 
Join Date: May 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
sjleather
Default

Made those changes and still get an empty cart when trying to add items.

Not sure if it's relevant but I do get sessions stored in the sql sessions table with the session ID that's generated in the browser when I have define('STORE_SESSIONS', 'mysql'); set and I have files appear in the cache directory when I have define('STORE_SESSIONS', ''); set. Either way, I still don't get items in my cart. I'm not quite sure how to read the "value" field in the session database but here's one for a cart I just tried to add an item to:

cart|O:12:"shoppingcart":5:{s:8:"contents";a:0:{}s :5:"total";i:0;s:6:"weight";
i:0;s:6:"cartID";N;s:12:"content_type";b:0;}langua ge|s:7:"english";
languages_id|s:1:"1";currency|s:3:"USD";navigation |O:17:"navigationhistory":
2:{s:4:"path";a:1:{i:0;a:4:{s:4:"page";s:9:"index. html";s:4:"mode";
s:3:"SSL";s:3:"get";a:0:{}s:4:"post";a:0:{}}}s:8:" snapshot";
a:0:{}}new_products_id_in_cart|s:7:"107{3}8";

(carriage returns added for readability)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #6  
Old 05-17-2005, 02:14 PM
michael_s's Avatar
osCMax Developer

 
Join Date: Jul 2002
Location: Phoenix, AZ
Posts: 10,247
Thanks: 66
Thanked 294 Times in 280 Posts
Rep Power: 10
michael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond reputemichael_s has a reputation beyond repute
Default

What are your sessions settings in the admin? Turn force cookies to true and see if that helps. Also, try setting recreate session to true as well. Test it after forcing cookies, if it works, great. If not, then also test the recreate session setting...
__________________
Michael Sasek
osCMax Developer


osCMax Templates - Hundreds of premium quality templates. New designs every month!

xShop for osCMax - Windows Based osCMax administration. Improved workflow, security, speed and convenience


osCMax Hosting - From basic hosting to High Availability, Load Balanced arrays, the most experienced osCMax host.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #7  
Old 05-17-2005, 06:36 PM
New Member
 
Join Date: May 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
sjleather
Default

By default this was my session information:

Session Directory /home/httpd/vhosts/sjleather.com/httpsdocs/tmp/
Force Cookie Use False
Check SSL Session ID False
Check User Agent False
Check IP Address False
Prevent Spider Sessions False
Recreate Session False

I tried alternately changing Force Cookie and Recreate Session and also turned them on together with no luck. Also tried both ways with cache set to mysql and file system.

I have been exiting and restarting my browser and clearing the browser cache inbetween tests to there's no question of browser issues. (Using both IE6 and Firefox 1.04 for testing)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #8  
Old 05-23-2005, 03:26 PM
New Member
 
Join Date: May 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
sjleather
Default

Thanks for all your help.
With the server admin, I finally figured out it was a problem related to register_globals.
I pulled down a fix from the community contributions site and made the code modifications.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
  #9  
Old 10-10-2005, 10:53 AM
New Member
 
Join Date: Oct 2005
Location: Khokolate City
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
HipHopServers
Default

I would help if you told people what contribution you used for the fix.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread



Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Sort the items in shopping cart, in Descending Order sarath26 osCMax v2 Features Discussion 0 12-27-2006 07:37 AM
Template Help "Shopping Cart 0 items" ALElder osCMax v2 Customization/Mods 4 10-22-2006 04:33 PM
Add items to shopping cart outside store. akasharkbow osCMax v2 Customization/Mods 0 03-12-2006 12:16 PM
Cart Items Display Ttownsend osCommerce 2.2 Modification Help 0 11-22-2004 11:54 PM
Cannot add items to cart futuretek osCMax v1.7 Discussion 1 01-08-2004 06:48 PM


All times are GMT -8. The time now is 10:11 PM.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO
Copyright 2008 osCMax