This issue is caused by the way the nested repeat region plugin you are using works.
the recordset used by the add cart button, and also by the nested repeat creates an intial empty data set on page load.
to correct this, edit line 46:
$query_detail2menu = "SELECT * FROM menu WHERE cid=123456789 ORDER BY itemname";
to:
$query_detail2menu = "SELECT * FROM menu ORDER BY itemname";
then change line 126:
$nested_query_detail2menu = str_replace("123456789", $row_master1menucategories['id'], $query_detail2menu);
to:
$query_detail2menu = "SELECT * FROM menu WHERE cid=123456789 ORDER BY itemname";
$nested_query_detail2menu = str_replace("123456789", $row_master1menucategories['id'], $query_detail2menu);