Zen Cart Logo
Forums / General Questions / Cannot add items to cart

Cannot add items to cart

Views: 1,398

Results 1 to 5 of 5
22 May 2013, 3:55 AM
#1
rikkitiki avatar

rikkitiki

New Zenner

Join Date:
May 2013
Posts:
3
Plugin Contributions:
0

Cannot add items to cart

This is a new installation of ZC, the first using 1.5.1. Everything works, except pressing any 'add to cart' button just refreshed the page I'm on, and the 'cart' remains empty. Changing the template has no effect, I have messed with the configure.php file to no avail. I never had this problem before using 1.5.1 I have made sure the shopping_cart.php file is not corrupt.

please help!

the store is located at dsrchobbies.com no SSL in place as yet - the only other minor thing I notice is that I had reset the permissions of configure.php to 444 as instructed. I have to change it back to 777 in order to overwrite it using my ftp program, and as soon as I do that, it overwrites the file and then chmods it back to 444 all by itself. Not sure what's up with that, but I have been successful overwriting my changes, it is now back to its original form:

// Define the webserver and path parameters
// HTTP_SERVER is your Main webserver: eg-http://www.your_domain.com
// HTTPS_SERVER is your Secure webserver: eg-https://www.your_domain.com
define('HTTP_SERVER', 'http://dsrchobbies.com');
define('HTTPS_SERVER', 'https://dsrchobbies.com');

// Use secure webserver for checkout procedure?
define('ENABLE_SSL', 'false');

// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes!
// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

define('DIR_WS_IMAGES', 'images/');
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', DIR_WS_CATALOG . 'pub/');
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');

define('DIR_WS_PHPBB', '/');

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', '/home/dsrchobb/public_html/');

//the following path is a COMPLETE path to the /logs/ folder eg: /var/www/vhost/accountname/public_html/store/logs ... and no trailing slash
define('DIR_FS_LOGS', '/home/dsrchobb/public_html/logs');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/');
define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/');

// define our database connection
define('DB_TYPE', 'mysql');
define('DB_PREFIX', '');
define('DB_CHARSET', 'utf8');
define('DB_SERVER', 'localhost');
define('DB_SERVER_USERNAME', DELETED BY ME);
define('DB_SERVER_PASSWORD', DELETED BY ME);
define('DB_DATABASE', 'dsrchobb_store');

// The next 2 "defines" are for SQL cache support.
// For SQL_CACHE_METHOD, you can select from: none, database, or file
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder
// ie: /path/to/your/webspace/public_html/zen/cache -- leave no trailing slash
define('SQL_CACHE_METHOD', 'none');
define('DIR_FS_SQL_CACHE', '/home/dsrchobb/public_html/cache');

// EOF

22 May 2013, 4:46 AM
#2
wmorris avatar

wmorris

Totally Zenned

Join Date:
Aug 2007
Location:
Amarillo, Tx
Posts:
1,683
Plugin Contributions:
0

Re: Cannot add items to cart

Looks like that your configuration file is currect. Try re-upload the orignal shopping cart file from zen cart site and see if that will solve the issue.

22 May 2013, 4:48 AM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Cannot add items to cart

rikkitiki:

then chmods it back to 444 all by itself. Not sure what's up with that

  1. That permissions-reset is normal. The first "click" on your store after the file isn't 444 will reset it to 444 by the store, for security reasons.

  2. Can you create a customer account and login? If you can't put something in your cart and can't log in, then you have a sessions problem. And sessions problems are usually caused by conflicting data in browser cookies, or domain name mismatches.
    http://www.zen-cart.com/content.php?258-i-cant-stay-logged-in-to-my-admin-area-or-php-session-handling-isnt-working-for-me

  3. Also, if you've changed the admin setting which prevents the site from redirecting to the Shopping Cart page after adding to cart, then you should put it back so that it does do that redirect. (Some people turn that off so that it only displays a message across the top that something was added, but confusingly leaves the shopper on the same page. If you've done that, reset it back in order to rule that out as a contributor to your problem.)

  4. Plus you're getting a blank page when clicking on the "Write a Review" button on the product page. So that means you've got a PHP error on your site, which will be detailed in your /logs/ folder, as explained here: http://www.zen-cart.com/content.php?124-blank-page

  5. This last issue, the blank page, can often be caused by incomplete uploads of PHP files. And likewise your inability for add-to-cart to work could be caused by corrupt or incomplete or missing PHP files. Check all the files on the server to be sure every one of them is complete and correct.

22 May 2013, 7:42 AM
#4
rikkitiki avatar

rikkitiki

New Zenner

Join Date:
May 2013
Posts:
3
Plugin Contributions:
0

Re: Cannot add items to cart

DrByte:

  1. That permissions-reset is normal. The first "click" on your store after the file isn't 444 will reset it to 444 by the store, for security reasons.

  2. Can you create a customer account and login? If you can't put something in your cart and can't log in, then you have a sessions problem. And sessions problems are usually caused by conflicting data in browser cookies, or domain name mismatches.
    http://www.zen-cart.com/content.php?258-i-cant-stay-logged-in-to-my-admin-area-or-php-session-handling-isnt-working-for-me

Yes I can, and wrote a review while logged in. It did not give me a blank page with the default template, but DID with the addon template.

  1. Also, if you've changed the admin setting which prevents the site from redirecting to the Shopping Cart page after adding to cart, then you should put it back so that it does do that redirect. (Some people turn that off so that it only displays a message across the top that something was added, but confusingly leaves the shopper on the same page. If you've done that, reset it back in order to rule that out as a contributor to your problem.)

I did not do that, but where whould I check?

  1. Plus you're getting a blank page when clicking on the "Write a Review" button on the product page. So that means you've got a PHP error on your site, which will be detailed in your /logs/ folder, as explained here: http://www.zen-cart.com/content.php?124-blank-page

[15-Apr-2013 05:22:39] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/dsrchobb/public_html/includes/languages/WP Black and Purple 900/english.php:1401) in /home/dsrchobb/public_html/includes/init_includes/init_templates.php on line 78

  1. This last issue, the blank page, can often be caused by incomplete uploads of PHP files. And likewise your inability for add-to-cart to work could be caused by corrupt or incomplete or missing PHP files. Check all the files on the server to be sure every one of them is complete and correct.

This could take some time...

Thank you for your response!

22 May 2013, 10:14 AM
#5
rikkitiki avatar

rikkitiki

New Zenner

Join Date:
May 2013
Posts:
3
Plugin Contributions:
0

Re: Cannot add items to cart

morrisgiftshop:

Looks like that your configuration file is currect. Try re-upload the orignal shopping cart file from zen cart site and see if that will solve the issue.

I did that, did not help.

Thanks for responding!