United Airlines has Basic Economy tickets from San Francisco SFO to Barcelona BCN priced at $296 in August and September to $321 in October. Prices rise to upper $300s/low $400s from late October. These cheap flights tend to have long outbound layovers in Newark or IAD or Zurich. Personally, I look at a potential 12 hour daytime layover in Zurich as a bonus feature of the cheap ticket.
United Airlines San Francisco SFO – Washington IAD (10.5 hours) – Barcelona BCN – Zurich ZRH (5.5 hr layover) – SFO
$295.53 round trip Monday Aug 19 – Wed Aug 28
The main problem I see with this August itinerary is a 6:25am flight out of Barcelona. I hate early morning flights at that time since it seems like a wasted hotel night.
United Airlines San Francisco SFO – Zurich ZRH (10.5 hours) – Barcelona BCN – Zurich ZRH (5.5 hr layover) – SFO
This itinerary has an all day layover in Zurich arriving at 10:20am and departing 9:00pm. That is plenty of time to take the airport train into downtown Zurich and spend 8 hours touring the city.
Still have to deal with that 6:25am flight out of Barcelona though to get back to SFO.