Make marmalade: Heat oil in nonstick pan or heavy skillet over medium heat. Add onion and sprinkle with salt to taste. Stir and cook until tender and translucent, 5 to 7 minutes. Add 1 cup water and cook until onion is very soft and water has cooked off, 10 minutes more. Add vinegar and sprinkle onion with sugar. Stir well and cook until vinegar has cooked off completely, 2 to 3 minutes more. Season with salt and set aside.
Make fritters: Heat oven to 375°F. Add beans to food processor and pulse until resembling thick paste. Transfer beans to large bowl and add onion and zucchini. Use clean hands to mix well, then form mixture into 10 cakes. Set aside. On plate, combine flour and salt. Gently dredge each cake in flour, patting onto all sides of cake.
Heat enough vegetable oil to cover bottom of heavy pan or skillet over medium-high heat. Add 3 or 4 cakes at a time and cook until cakes are golden, 2 to 3 minutes on each side. Transfer cakes to sheet pan and bake until hot and a deeper golden colour, 10 to 15 minutes.
Serve hot with marmalade.