Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"Buy now" not working right


JoeH

Recommended Posts

It used to work. But now only if logged on first.

 

If not logged on, you get a message that the shopping cart is empty. If you login and then click on "buy now" the product is added to the cart.

 

Then at other times it seems to work just fine

Link to comment
Share on other sites

well you need to post more info for the problem. What customizations and contributions you installed that changed the behavior of the add to cart.

 

Mine works like that from the 1st time I installed osCommerce.

 

Works here

http://demo.oscommerce.com/

Link to comment
Share on other sites

It used to work. But now only if logged on first.

 

If not logged on, you get a message that the shopping cart is empty. If you login and then click on "buy now" the product is added to the cart.

 

Then at other times it seems to work just fine

 

First of all you need to check the last modifications you have done to application_top.php, shopping_cart.php, and the shopping_cart.php in the classes directory. The error you have could also be caused by improper cookies handling (especially if you use 'Force cookie usage' set to true)m so check out your `cookie_domain` and `cookie_path` to be set properly to your domain and root catalog path.

 

In any case, you need to post some more info on that. Try Netscape browser, it have the best cookie handler I ever seen.

Link to comment
Share on other sites

First of all you need to check the last modifications you have done to application_top.php, shopping_cart.php, and the shopping_cart.php in the classes directory. The error you have could also be caused by improper cookies handling (especially if you use 'Force cookie usage' set to true)m so check out your `cookie_domain` and `cookie_path` to be set properly to your domain and root catalog path.

 

In any case, you need to post some more info on that. Try Netscape browser, it have the best cookie handler I ever seen.

 

 

Thanks !

 

What should the cookie_path and cookie_domain look like ?

Link to comment
Share on other sites

Thanks !

 

What should the cookie_path and cookie_domain look like ?

 

e.g. for configure.php if the store is located in the root of the domain:

 

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

define('HTTP_COOKIE_PATH', '/');

 

note here that the www.domain.com and domain.com (without www) is different for a cookie,

so if initially set for domain.com it will not be read from www.domain.com. Set exactly as your domain look like.

Link to comment
Share on other sites

e.g. for configure.php if the store is located in the root of the domain:

 

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

define('HTTP_COOKIE_PATH', '/');

 

note here that the www.domain.com and domain.com (without www) is different for a cookie,

so if initially set for domain.com it will not be read from www.domain.com. Set exactly as your domain look like.

 

 

so if its in public_html it should be

 

define('HTTP_COOKIE_PATH', '/public_html/catalog');

Link to comment
Share on other sites

so if its in public_html it should be

 

define('HTTP_COOKIE_PATH', '/public_html/catalog');

 

no, no, no

if your shop is located in the root of the domain (accessed directly by 'www.domain.com' then it must be

define('HTTP_COOKIE_PATH', '/');

and if in some directory of the root, e.g. `catalog` - and accessed by `www.domain.com/catalog` then it must be

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

 

nothing related to 'public_html' dir.

Link to comment
Share on other sites

no, no, no

if your shop is located in the root of the domain (accessed directly by 'www.domain.com' then it must be

define('HTTP_COOKIE_PATH', '/');

and if in some directory of the root, e.g. `catalog` - and accessed by `www.domain.com/catalog` then it must be

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

 

nothing related to 'public_html' dir.

 

 

ok here's what I have

 

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

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

 

still doesn't work

Link to comment
Share on other sites

ok here's what I have

 

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

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

 

still doesn't work

 

hey, you have troubles here. The Oscid value is adding to each link on the site is changing from each

page loading, thats why nothing is added to cart. Could you post me a full config file you have, except

the secure info like db_name, pass and root path?

Link to comment
Share on other sites

hey, you have troubles here. The Oscid value is adding to each link on the site is changing from each

page loading, thats why nothing is added to cart. Could you post me a full config file you have, except

the secure info like db_name, pass and root path?

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://carolinapetsupply.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://carolinapetsupply.com'); // eg, https://localhost - should not be empty for productive servers

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

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

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

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

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

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

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

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', '/home/cps/public_html/catalog/');

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

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

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', '');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', '');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

Link to comment
Share on other sites

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://carolinapetsupply.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://carolinapetsupply.com'); // eg, https://localhost - should not be empty for productive servers

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

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

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

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

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

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

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

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', '/home/cps/public_html/catalog/');

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

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

 

// define our database connection

define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', '');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', '');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql'

?>

 

Seems to be ok, except try this

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

instead of

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

Link to comment
Share on other sites

Seems to be ok, except try this

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

instead of

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

 

 

Well I'll be......

 

That worked!!!!!!

 

Can't thank you enough !!!!

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...