restoring sppree 2.1 compatible code temporary for now so gem works with spree 2.4