Error While Creating New Shipment

Hello there,



We are licensed user of cs cart, www.dotestudio.com [color=#000000]CS-Cart: version [/color]3.0.2 PROFESSION



last time i have updated all security plugins which suggested by cs cart.



from this point, whenever i trying to create new shipment, it shows error massage

[color=#9C3535][font=Tahoma, Arial, Verdana,]Error[/font][/color]

[color=#9C3535][font=Tahoma, Arial, Verdana,]Products for shipment were not selected[/font][/color]



i don't what is problem. please help to solve this problem.



i have attached screen shot of error massage page.

error.PNG

Edit this



controllers/admin/shipments.php



Replace this



function fn_check_shipped_products($products)
{
$allow = true;
$total_amount = 0;

if (!empty($products) && is_array($products)) {
foreach ($products as $product) {
$total_amount += empty($product['amount']) ? 0 : $product['amount'];
}

if ($total_amount == 0) {
$allow = false;
}

} else {
$allow = false;
}

return $allow;
}




With this



function fn_check_shipped_products($products)
{
$allow = true;
$total_amount = 0;

if (!empty($products) && is_array($products)) {
foreach ($products as $key => $amount) {
$total_amount += empty($amount) ? 0 : $amount;
}

if ($total_amount == 0) {
$allow = false;
}

} else {
$allow = false;
}

return $allow;
}