Supplies octaprenyl diphosphate, the precursor for the side chain of the isoprenoid quinones ubiquinone and menaquinone. (2E,6E)-farnesyl diphosphate + 5 isopentenyl diphosphate = all-trans-octaprenyl diphosphate + 5 diphosphate Binds 2 Mg(2+) ions per subunit. Belongs to the FPP/GGPP synthase family.