2) Combine the vinegar, granulated sugar, salt and pepper in a small saucepan and bring to a boil. Cook until the granulated sugar is dissolved, about 2 minutes. Remove from the heat, let cool slightly then pour the mixture over the onions. Cover and refrigerate for at least 4 hours. Stir in thyme before serving.
3) For the sauce:
Put the orange juice in a medium nonreactive saucepan and bring to a boil. Using a paring knife, make a small slit in the center of the habanero and add to the orange juice along with the allspice berries. Cook until thickened and reduced to about 240ml. Strain into a bowl and let cool slightly. Add the zest and vinegar and season with salt, pepper and honey, to taste, if needed.
4) For the basil oil:
Combine the oil and basil in a blender and blend for 2 minutes. Strain into a bowl and season with salt and pepper.
5) For the fish:
Whisk together the plain flour, salt, pepper and enough water to make a batter with the consistency of crepe batter. Let sit 5 minutes.
6) Heat 3.5cm of oil in a medium high-sided saute pan over high heat until it begins to shimmer. Put the plain flour in a large shallow bowl and season with salt and pepper. Season the fish with salt and pepper and dredged lightly in the plain flour, tapping off excess. dip the fish in the batter and let excess drip off. Fry until golden brown. Drain on kitchen towels. Transfer to a platter, drizzle with the vinegar sauce and basil oil and top with some of the pickled red onions. Garnish with basil leaves.