mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove @voucher_adjustment instance variable
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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"}
|
||||
|
||||
Reference in New Issue
Block a user