Skip to content

Instantly share code, notes, and snippets.

Spree::CheckoutController.class_eval do
def ensure_checkout_allowed
check = @order.checkout_allowed?
unless check == true
redirect_to spree.cart_path, :flash => {:error => I18n.t("checkout_allowed_errors.#{check}")}
end
end
end