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 ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| 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 |
|
#2
| ||||
| ||||
| 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. |
|
#3
| |||
| |||
| 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'); |
|
#4
| ||||
| ||||
| All of these are wrong: Code: define('HTTP_COOKIE_DOMAIN', 'www.sjleather.com');
define('HTTPS_COOKIE_DOMAIN', '');
define('HTTPS_COOKIE_PATH', ''); Code: define('HTTP_COOKIE_DOMAIN', 'sjleather.com');
define('HTTPS_COOKIE_DOMAIN', 'sjleather.com');
define('HTTPS_COOKIE_PATH', '/osCommerce/');
__________________ 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. |
|
#5
| |||
| |||
| 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) |
|
#6
| ||||
| ||||
| 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. |
|
#7
| |||
| |||
| 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) |
|
#8
| |||
| |||
| 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. |
|
#9
| |||
| |||
| I would help if you told people what contribution you used for the fix. |
| Thread Tools | |
| |
| ||||
| 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 |