I don't seem able to reproduce this myself, but I had 20 logged errors last night and about 15 from the day before. I'm not sure how this is being caused.
Whats the easiest way of trapping this. I have a table called log that I can post messages to, but how to I post the error message.
To answer your questions....
What version of Zen Cart are you using? 1.3.6
What addons/mods have been applied? PriceList and IH2
What was the IP address? Does that match the IP address on any of your orders, esp for the date on which the warning occurred.
No orders are logged that match this.
Below is the actual function, its on the "while" that is the problem. When does this method get called? Might help if I knew how I should try and replicate it.
function actionMultipleAddProduct($goto, $parameters) {
global $messageStack;
while ( list( $key, $val ) = each($_POST['products_id']) ) {
if ($val > 0) {
$adjust_max = false;
$prodId = $key;
$qty = $val;
$add_max = zen_get_products_quantity_order_max($prodId);
$cart_qty = $this->in_cart_mixed($prodId);
// $new_qty = $qty;
//echo 'I SEE actionMultipleAddProduct: ' . $prodId . '<br>';
$new_qty = $this->adjust_quantity($qty, $prodId, 'shopping_cart');
if (($add_max == 1 and $cart_qty == 1)) {
// do not add
$adjust_max= 'true';
} else {
// adjust quantity if needed
if (($new_qty + $cart_qty > $add_max) and $add_max != 0) {
$adjust_max= 'true';
$new_qty = $add_max - $cart_qty;
}
$this->add_cart($prodId, $this->get_quantity($prodId)+($new_qty));
}
if ($adjust_max == 'true') {
$messageStack->add_session('shopping_cart', ERROR_MAXIMUM_QTY . ' C: - ' . zen_get_products_name($prodId), 'caution');
}
}
}
// display message if all is good and not on shopping_cart page
if (DISPLAY_CART == 'false' && $_GET['main_page'] != FILENAME_SHOPPING_CART) {
$messageStack->add_session('header', SUCCESS_ADDED_TO_CART_PRODUCTS, 'success');
}
zen_redirect(zen_href_link($goto, zen_get_all_get_params($parameters)));
}