Remove dependency to coupon code logic in checkoutcontroller, ofn doesnt have that feature

This commit is contained in:
luisramos0
2019-04-01 16:16:20 +01:00
parent fc145d472d
commit a8b4037885
2 changed files with 0 additions and 16 deletions

View File

@@ -149,20 +149,6 @@ class Spree::CheckoutController < Spree::StoreController
def check_authorization
authorize!(:edit, current_order, session[:access_token])
end
def apply_coupon_code
if params[:order] && params[:order][:coupon_code]
@order.coupon_code = params[:order][:coupon_code]
coupon_result = Spree::Promo::CouponApplicator.new(@order).apply
if coupon_result[:coupon_applied?]
flash[:success] = coupon_result[:success] if coupon_result[:success].present?
else
flash[:error] = coupon_result[:error]
respond_with(@order) { |format| format.html { render :edit } } and return
end
end
end
####################################
####################################

View File

@@ -102,8 +102,6 @@ class Spree::OrdersController < Spree::StoreController
discard_empty_line_items
with_open_adjustments { update_totals_and_taxes }
render(:edit) && return unless apply_coupon_code
if @order == current_order
fire_event('spree.order.contents_changed')
else