A couple things here that are going to apply to the entire PR, but I'll say them at the top here.  I'm going to nit-pick, but only because nits are made for picking :)

* [Coding Standards](https://github.com/wp-e-commerce/WP-e-Commerce/wiki/Coding-Standards-and-Code-Quality).  Whitespace, especially.  Also, documentation standards (e.g. WordPress, not wordpress)
* I get what you're doing here in the THINGAMABOB idea, what with the template and all - but I have to think there's a better way for us to do this.  This whole file copying/string replacing deal feels janky.
* These functions don't technically use the $wpdb global.