Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Cross sell Products error when add to cart


jaystreater

Recommended Posts

Hi,

 

Appears to be a problem with the cross sell module. It is bringing up this error.

 

-------------------------------------------

Warning: Invalid argument supplied for foreach() in /homepages/10/d125497342/htdocs/proav/includes/application_top.php on line 368

 

Warning: Cannot modify header information - headers already sent by (output started at /homepages/10/d125497342/htdocs/proav/includes/application_top.php:368) in /homepages/10/d125497342/htdocs/proav/includes/functions/general.php on line 29.

 

---------------------------------------------

 

Looked at application top line 368. It is part of the cross sell.

 

----------------------------------------------------

//customer adds products from the products page, with x-sell products

case 'add_products' :

if (ereg('^[0-9]+$', $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']);

}

foreach ($HTTP_POST_VARS['add_recommended'] as $value) { (LINE 368 HERE)

if (ereg('^[0-9]+$', $value)) {

$cart->add_cart($value, $cart->get_quantity(tep_get_uprid($value, $HTTP_POST_VARS['id']))+1, $HTTP_POST_VARS['id']);

}

}

tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));

 

break;

 

------------------------------------------------------------------

 

I have identified line 368 in the code. Any help on how to correct these errors.

 

Kind regards. J

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...