Hi, I just did test upgrade from 4.3.9 to 4.5.2.SP2 and one of the addons stopped working - it shows "Undefined index: cart, Error at app/addons/qty_minimums/func.php, line: 23".
The addon page: http://forum.cs-cart.com/topic/21933-qty-minimums-addon-satisfy-minimum-quantities-with-product-options/
Below is the func.php file, and separately line 23:
foreach ($_SESSION['cart']['products'] as $k => $v) {
<?phpif ( !defined(‘AREA’) ) { die(‘Access denied’); }
/** [HOOKS] **/
function fn_qty_minimums_check_amount_in_stock (&$product_id, &$amount, &$product_options, &$cart_id, &$is_edp, &$original_amount, &$min_qty)
{
$_SESSION[‘temp_amount’] = $amount;if ($_REQUEST['dispatch'] == 'checkout.update') { $new_amount = $amount; foreach ($_REQUEST['cart_products'] as $k => $v) { if (($v['product_id'] == $product_id) && ($k != $cart_id)) { $new_amount += $v['amount']; } } } else { $new_amount = $amount; foreach ($_SESSION['cart']['products'] as $k => $v) { if (($v['product_id'] == $product_id) && ($k != $cart_id)) { $new_amount += $v['amount']; } } } if ($new_amount >= $min_qty) { $min_qty = $amount; }
}
function fn_qty_minimums_check_amount_in_stock_minimum (&$product_id, &$amount, &$product_options, &$cart_id, &$is_edp, &$original_amount, &$min_qty)
{
$_SESSION[‘notifications’] = fn_array_unique($_SESSION[‘notifications’]);
if ($_REQUEST[‘dispatch’] == ‘checkout.place_order’) {
$min_qty = 0;
} else {
$min_qty = $_SESSION[‘temp_amount’];
}
}/** [/HOOKS] **/
?>
Can you help me?