$products['ean'][$thisid][] = $i['products_ean']; } //for($x=1;$x<=3;$x++) $products['ean'][$thisid][] = $i['products_ean']; if ($i['waitingbox'] == '1') { $inwb[] = $spanid; } else { $infb[] = $spanid; } } } $products['wb'] = implode(', ', $inwb); $products['fb'] = implode(', ', $infb); $result .= printCollectionRequest($products, $box_date, $sp_name); } else { //If not all products are finish, suggest waiting box $class_jo->updateItem2WaitingBox($item['jng_sp_orders_items_id']); $result .= printPackageTip('W', $box_date, '', $sp_name); } } } elseif ($item['status'] == $new_status) { //If product is already in package (reshow the information) $sp_id = $order['jng_sp_id']; if (in_array($sp_id, $order_show_sp_info)) { use_class('jng_sp'); $class_sp = new jng_sp(); $sp = $class_sp->retrieveDetail($sp_id); $sp_name = $sp['package_prefix']; } $result .= printPackageTip('P', '', '', $sp_name, $sp_class); } else { //If product is already sent