diff --git a/backend/app/views/spree/admin/promotions/_actions.html.erb b/backend/app/views/spree/admin/promotions/_actions.html.erb index cc4626bf41b..3f054de8a22 100644 --- a/backend/app/views/spree/admin/promotions/_actions.html.erb +++ b/backend/app/views/spree/admin/promotions/_actions.html.erb @@ -7,6 +7,7 @@ <% if can?(:update, @promotion) %>
<%= label_tag :action_type, t('spree.adjustment_type')%> + <%= admin_hint t('spree.adjustment_type'), t(:promotions, scope: [:spree, :hints, "spree/calculator"]) %> <%= select_tag 'action_type', options, include_blank: t(:choose_promotion_action, scope: 'spree'), class: 'custom-select fullwidth' %>
diff --git a/backend/app/views/spree/admin/shared/_calculator_fields.html.erb b/backend/app/views/spree/admin/shared/_calculator_fields.html.erb index 3d078f24f30..477abe2a58a 100644 --- a/backend/app/views/spree/admin/shared/_calculator_fields.html.erb +++ b/backend/app/views/spree/admin/shared/_calculator_fields.html.erb @@ -4,6 +4,11 @@
<%= f.label(:calculator_type, Spree::Calculator.model_name.human) %> + + <% if local_assigns.has_key? :hint %> + <%= admin_hint t("spree.#{hint}"), t(hint, scope: [:spree, :hints, "spree/calculator"]) %> + <% end %> + <%= f.select(:calculator_type, @calculators.map { |c| [c.description, c.name] }, {}, {class: 'custom-select fullwidth js-calculator-type'}) %>
diff --git a/backend/app/views/spree/admin/shipping_methods/_form.html.erb b/backend/app/views/spree/admin/shipping_methods/_form.html.erb index a7d81dc68eb..7e2f07ccc7e 100644 --- a/backend/app/views/spree/admin/shipping_methods/_form.html.erb +++ b/backend/app/views/spree/admin/shipping_methods/_form.html.erb @@ -100,7 +100,7 @@
- <%= render partial: 'spree/admin/shared/calculator_fields', locals: { f: f } %> + <%= render partial: 'spree/admin/shared/calculator_fields', locals: { f: f, hint: :shipping_methods } %>
diff --git a/backend/app/views/spree/admin/tax_rates/_form.html.erb b/backend/app/views/spree/admin/tax_rates/_form.html.erb index 9b4e27ea26e..c2c3f365f71 100644 --- a/backend/app/views/spree/admin/tax_rates/_form.html.erb +++ b/backend/app/views/spree/admin/tax_rates/_form.html.erb @@ -58,5 +58,5 @@
- <%= render 'spree/admin/shared/calculator_fields', f: f %> + <%= render partial: 'spree/admin/shared/calculator_fields', locals: { f: f, hint: :tax_rates } %>
diff --git a/core/config/locales/en.yml b/core/config/locales/en.yml index bc92b20bd43..cedc40575dc 100644 --- a/core/config/locales/en.yml +++ b/core/config/locales/en.yml @@ -1371,6 +1371,14 @@ en: hidden: hidden hide_out_of_stock: Hide out of stock hints: + spree/calculator: + tax_rates: This is used to calculate both sales tax (United States-style taxes) + and value-added tax (VAT). Typically this calculator should be the only tax + calculator required by your store. + shipping_methods: This is used to calculate the shipping rates on a per order or + per package rate. + promotions: This is used to determine the promotional discount to be applied to an + order, an item, or shipping charges. spree/price: country: 'This determines in what country the price is valid.
Default: Any Country'