Cody Summer sells tires for tractor trailers. He earns 4.5% commission on the first $6,000 in sales, 8% commission on the next $6,000, and 12% commission on sales over $12,000. Last month he sold $18,000 worth of tires. What was his total commission?