Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Break when adding to cart!


Guest

Recommended Posts

Posted

Hi all,

 

I have been modifying a previously made site and I get this error only when adding an item to the cart:

 

CODE

Not Found

 

The requested URL /jb/. $url was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

 

My URL looks like this: http://dev.piermarketing.com/jb/.%20$url

 

I am not using any SEO mods.

 

This may have happened once I installed the TrustCommerce payment module, but I am not sure.

 

Any help is appreciated!

Posted
I have been modifying a previously made site and I get this error only when adding an item to the cart:

 

CODE

Not Found

 

The requested URL /jb/. $url was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

My URL looks like this: http://dev.piermarketing.com/jb/.%20$url

 

I am not using any SEO mods.

 

This may have happened once I installed the TrustCommerce payment module, but I am not sure.

What a strange error. When you add a product to the cart from the products page, it is actually the code in application_top that does the adding:

	  // customer adds a product from the products page
  case 'add_product' :	if (isset($HTTP_POST_VARS['products_id']) && is_numeric($HTTP_POST_VARS['products_id'])) {
							$cart->add_cart($HTTP_POST_VARS['products_id'], $cart->get_quantity(tep_get_uprid($HTTP_POST_VARS['products_id'], $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);
						  }
						  tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
						  break;

It now looks the tep_redirect (includes/functions/general.php top of the page) takes $url literally:

// Redirect to another page or site
 function tep_redirect($url) {
global $logger;

if ( (strstr($url, "\n") != false) || (strstr($url, "\r") != false) ) {
  tep_redirect(tep_href_link(FILENAME_DEFAULT, '', 'NONSSL', false));
}

header('Location: ' . $url);

You don't happen to have a backslash in front of $url? header('Location: ' . \$url);

Archived

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

×
×
  • Create New...