Posts Tagged ‘database’

Last Week

Posted in General on January 12th, 2009 by Alan – Be the first to comment

Last week I made some changes that may seem small, but should go a long way in making it easier to understand the code and customize the product…

  • Finalize the use of ISO codes as primary keys for country and language tables. This removes the need to follow integer foreign-keys back to these tables; the ISO code should make it easy to tell which language or country you’re dealing with.
  • Create the concept of a country helper — a class that knows which address fields are necessary for specific country, and how to validate and format them.
  • Make state model work with country helper.
  • Work country helper into single page checkout. Add Canada as a proof of concept.
  • Make databased sessions more robust by registering a shutdown function (register_shutdown_function()) and closing the session in there, rather than in the destructor of our controller class.
  • Rename address fields to work better with international addressing.
  • Simplify and comment flow of logic in single-page checkout code