I had changed the database tables to make them closer to the tutorial. Just deleted the matrix and added an s but other than that they were the same. I renamed the tables to what they were and used the file you linked to and I'm still getting the same problem. You can see it at store.php
Here is the file again with the modifications.