I have added support for attributes into this contribution and also fixed a bug with the select statement for products. If the product existed in more than one category, the price was being updated multiple times. I simply added a distinct to the product selection to avoid this.

P.S. This is my first contribution, so I hope I have done everything correctly.

More...