Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

I found a Bug in v2.2RC2 if Allow Checkout is false


sojomy

Recommended Posts

Can someone please confirm this issue so I know that I'm not going crazy!

 

This only applies to people who are using SSL and their HTTP path is NOT the same as their HTTPS path. You also have to have "Allow Checkout" set to FALSE for out of stock items. If you look in your store's configure.php file, and if your DIR_WS_HTTP_CATALOG and your DIR_WS_HTTPS_CATALOG variables are not the same, then you will have this problem if you turn "Allow Checkout" off.

 

For instance, my configure.php file has the following

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

define('DIR_WS_HTTPS_CATALOG', '/mypcwerks/store/');

 

 

I have a clean install of osCommerce 2.2 RC 2 and I am "page not found" error when checking out. This error only happens when I have "Allow Checkout" of out-of-stock items set to "FALSE" and then I try to order something that is out of stock (or not enough stock). What happens is that it tries to redirect to the shopping cart page, but the URL it redirects to is wrong.

 

If you want to try this on your own store, just go to the "Stock" section of your admin control panel and set "Allow Checkout" to FALSE. Then add an item to your catalog that has a "0" (that's a zero) for "Products Quantity:". Then go to your catalog and add this item to your shopping cart. Then checkout. After you choose your shipping method and choose "continue", it should redirect to your HTTP cart, but it gets a "page not found" error because it tries to go to the HTTPS server with the HTTP webserver path, so the file isn't there.

 

 

 

My Shopping Cart is at

http://www.mypcwerks.com/store/

But my SSL cart is at

https://www.thesiteguard.com/mypcwerks/store/

 

When I am on this page with an out of stock item in my cart

https://www.thesiteguard.com/mypcwerks/stor...ing.php?osCsid=

and I choose a shipping method and click "continue", it should go to this page

http://www.mypcwerks.com/store/shopping_cart.php?osCsid=

but instead it tries to go to

https://www.thesiteguard.com/store/shopping_cart.php?osCsid=

 

The redirect seems to be using the HTTPS_SERVER variable, but the DIR_WS_HTTP_CATALOG variable. It is mixing the HTTP and HTTPS variables together to redirect to a URL that doesn't exist, so I get a "page not found" error.

 

This actual redirect is in the checkout_payment.php file, around line 43 where it says

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART));

 

If I change this line to

tep_redirect(tep_href_link(FILENAME_SHOPPING_CART, '', 'SSL'));

then it will redirect to the shopping cart, but it's the SSL version of the shopping cart. It goes to

https://www.thesiteguard.com/mypcwerks/stor...art.php?osCsid=

instead of where it should go, here

http://www.mypcwerks.com/store/shopping_cart.php?osCsid=

 

 

Can anyone else confirm this issue on their own cart?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...