I can find two different prices for making a Hat of Disguise. Does it just cost half the material cost if all spells are accounted for or what?
The hat of disguise has a price of 1,800 gp. This is the amount that a vendor sells a hat of disguise for if one is for sale. If you already have a hat of disguise and sell it to a vendor, he typically pays you half this price.
The hat of disguise has a cost to create of 900 gp. This is how much a creator pays for raw materials to manufacture a hat on his own instead of just buying one. This cost usually includes the masterwork item that will become the magic item unless otherwise specified (as it is with, for example, magic armor, shields, and weapons).
In addition to the raw materials cost, however, a hat's creator must meet the hat's other creation prerequisites, like possessing the feat Craft Wondrous Item and the ability to create an effect like the spell disguise self each day he's working on the hat. It usually takes a typical creator that meets all the prerequisites 2 days in a lab or shrine to make a hat of disguise and a successful Spellcraft skill check (DC 5 + the item's caster level). You can read more about creating magic items—including, for example, how to avoid fulfilling some prerequisites and still create the magic item you want—in Magic Item Creation.
Note: Be careful not to confuse the typical hat of disguise with the greater hat of disguise on the same page! The latter is a totally different item that creates a different effect (like the alter self spell instead of the disguise self spell), therefore possessing a different cost, a different price, and different prerequisites.