There are at least two ways to answer this.
First, we can look at the opportunity cost of the consumer who buys the oranges. For that person, the opportunity cost of the oranges is whatever the buyer would have otherwise done with the money that was spent on the oranges. For example, the opportunity cost of the oranges might have been two pounds of apples. Or it might have been 2 songs on iTunes. There is no set opportunity cost because each person who buys a dozen oranges might have had a different second preference for what to do with that money.
Second, we can look at the opportunity cost of the oranges for the producer. The opportunity cost for the producer is whatever he or she could have made using the resources that were used for the oranges. So the opportunity cost of the oranges might have been 2 pineapples or a bunch of bananas. It is whatever that person would have grown (their second choice) if they had not grown the oranges.