Skip to content

armgit / spree

Public Imported from GitHub
0

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.

Move Checkout terms and conditions into partial (#13104)

Damian Legawiec0afe63dc32be
diff --git a/storefront/app/views/spree/checkout/_payment_methods.html.erb b/storefront/app/views/spree/checkout/_payment_methods.html.erb
index b4d5f3fc5f..462a28ad33 100644
--- a/storefront/app/views/spree/checkout/_payment_methods.html.erb
+++ b/storefront/app/views/spree/checkout/_payment_methods.html.erb
@@ -54,11 +54,7 @@
<% end %>
<% end %>
- <p id="payment-and-conditions" class="text-xs mt-2 mb-4">
- <%= Spree.t('storefront.checkout.by_placing_this_order_you_agree_to') %>
- <%= link_to Spree.t(:terms_of_service), policy_path('terms_of_service'), target: :_blank, class: 'text-primary' %><%= I18n.t('support.array.two_words_connector') %>
- <%= link_to Spree.t(:privacy_policy), policy_path('privacy_policy'), target: :_blank, class: 'text-primary' %>.
- </p>
+ <%= render 'spree/checkout/terms_and_conditions' %>
<div class="flex justify-end w-full">
<button type="submit"
diff --git a/storefront/app/views/spree/checkout/_terms_and_conditions.html.erb b/storefront/app/views/spree/checkout/_terms_and_conditions.html.erb
new file mode 100644
index 0000000000..0961d8be0b
--- /dev/null
+++ b/storefront/app/views/spree/checkout/_terms_and_conditions.html.erb
@@ -0,0 +1,5 @@
+ <p id="payment-and-conditions" class="text-xs mt-2 mb-4">
+ <%= Spree.t('storefront.checkout.by_placing_this_order_you_agree_to') %>
+ <%= link_to Spree.t(:terms_of_service), policy_path('terms_of_service'), target: :_blank, class: 'text-primary' %><%= I18n.t('support.array.two_words_connector') %>
+ <%= link_to Spree.t(:privacy_policy), policy_path('privacy_policy'), target: :_blank, class: 'text-primary' %>.
+ </p>
\ No newline at end of file