If you’ve ever worked with WP e-Commerce themes you know the code is pretty terrible. Not only can you not include the template files in your normal WordPress theme and have them work, the code is duplicated all over the place. Want to change the purchase button? Well you need to edit single_product.php, product_list.php, list_view.php and grid_view.php.
Why on earth would any decent programmer want to go into four different files to edit code is beyond me. I’ve got better things to do with my time than edit/re-edit the same files all day.
Today I took the default WP e-Commerce theme and tried to cut out a bunch of duplicate code. I didn’t have the Gold Cart plugin installed (that’s another stupid thing, why can’t it run on localhost without activation????) so I didn’t get to check the function of grid view but the stock views work and we’ve cut a bunch of the duplicate code out through the use of the amazing
include in PHP.
I know it’s totally new which is why WP e-Commerce doesn’t use it but I decided to be cutting edge and use it.
Download the theme from Github.
Use it however you want. I’d appreciate a link to this post instead of offering a direct link to the Github repo, but I have no way of checking, and I have better things to do than checking things like that (like wash my hair).
If you find things that need improving either fork it and submit a pull request or let me know and I’ll see about fixing it.