Updated for being used with Spree2.0