Remove @voucher_adjustment instance variable

This commit is contained in:
Matt-Yorkley
2023-06-02 21:31:20 +01:00
parent 7a0b83076b
commit 55bce9f1b2
2 changed files with 1 additions and 3 deletions

View File

@@ -30,8 +30,6 @@ module CheckoutCallbacks
@order.manual_shipping_selection = true
@order.checkout_processing = true
@voucher_adjustment = @order.voucher_adjustments.first
redirect_to(main_app.shop_path) && return if redirect_to_shop?
redirect_to_cart_path && return unless valid_order_line_items?
end

View File

@@ -1,7 +1,7 @@
.medium-6
- if @order.distributor.vouchers.present?
%div.checkout-substep
= render partial: "split_checkout/voucher_section", locals: { order: @order, voucher_adjustment: @voucher_adjustment }
= render partial: "split_checkout/voucher_section", locals: { order: @order, voucher_adjustment: @order.voucher_adjustments.first }
= form_with url: checkout_update_path(checkout_step), model: @order, method: :put, data: { remote: "true" } do |f|
%div.checkout-substep{"data-controller": "paymentmethod"}