Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
change condition placement
Szymon Iwacz3eda488e10d5
diff --git a/frontend/app/views/spree/checkout/_payment.html.erb b/frontend/app/views/spree/checkout/_payment.html.erbindex e8dd5cb914..7cce4c0f17 100644--- a/frontend/app/views/spree/checkout/_payment.html.erb+++ b/frontend/app/views/spree/checkout/_payment.html.erb@@ -21,7 +21,7 @@</ul><div class="payment-sources">- <%= render partial: 'payment_sources' %>+ <%= render partial: 'payment_sources' if @payment_sources.present? %><ul id="payment-methods" class="list-unstyled position-relative mb-0 payment-sources-add-form" data-hook><% checkout_available_payment_methods.each do |method| %>diff --git a/frontend/app/views/spree/checkout/_payment_sources.html.erb b/frontend/app/views/spree/checkout/_payment_sources.html.erbindex 502cf85f0c..0b405e3dca 100644--- a/frontend/app/views/spree/checkout/_payment_sources.html.erb+++ b/frontend/app/views/spree/checkout/_payment_sources.html.erb@@ -1,19 +1,17 @@-<% if @payment_sources.present? %>- <div id="existing_cards" class="payment-sources-existing-cards" style="display:none;">- <%= radio_button_tag 'use_existing_card', 'yes', true, class: 'd-none' %>- <div class="form-group" data-hook="existing_cards">- <div class="d-flex flex-column payment-sources-list">- <% @payment_sources.each do |card| %>- <%= render partial: 'credit_card', locals: { card: card } %>- <% end %>- <div>- <label class="form-check-label spree-radio-label col-6 mb-2">- <%= radio_button_tag 'use_existing_card', 'no' %>- <span class="spree-radio-label-custom-input"></span>- <span><%= Spree.t(:add_new_credit_card) %></span>- </label>- </div>+<div id="existing_cards" class="payment-sources-existing-cards" style="display:none;">+ <%= radio_button_tag 'use_existing_card', 'yes', true, class: 'd-none' %>+ <div class="form-group" data-hook="existing_cards">+ <div class="d-flex flex-column payment-sources-list">+ <% @payment_sources.each do |card| %>+ <%= render partial: 'credit_card', locals: { card: card } %>+ <% end %>+ <div>+ <label class="form-check-label spree-radio-label col-6 mb-2">+ <%= radio_button_tag 'use_existing_card', 'no' %>+ <span class="spree-radio-label-custom-input"></span>+ <span><%= Spree.t(:add_new_credit_card) %></span>+ </label></div></div></div>-<% end %>+</div>