solidus_volume_pricing 0.2.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +35 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +8 -4
- data/.rubocop_todo.yml +126 -0
- data/CHANGELOG.md +57 -0
- data/Gemfile +18 -4
- data/Guardfile +3 -1
- data/README.md +53 -48
- data/Rakefile +2 -0
- data/app/assets/javascripts/spree/backend/solidus_volume_pricing.js +1 -15
- data/app/controllers/spree/admin/volume_price_models_controller.rb +2 -1
- data/app/controllers/spree/admin/volume_prices_controller.rb +3 -1
- data/app/decorators/controllers/solidus_volume_pricing/spree/admin/variants_controller_decorator.rb +42 -0
- data/app/decorators/helpers/solidus_volume_pricing/spree/base_helper_decorator.rb +31 -0
- data/app/decorators/models/solidus_volume_pricing/spree/line_item_decorator.rb +18 -0
- data/app/decorators/models/solidus_volume_pricing/spree/user_decorator.rb +17 -0
- data/app/decorators/models/solidus_volume_pricing/spree/variant_decorator.rb +21 -0
- data/app/models/solidus_volume_pricing/price_display.rb +47 -0
- data/app/models/solidus_volume_pricing/pricer.rb +95 -0
- data/app/models/solidus_volume_pricing/pricing_options.rb +20 -0
- data/app/models/spree/volume_price.rb +43 -26
- data/app/models/spree/volume_price_model.rb +6 -4
- data/app/overrides/spree/admin/shared/_settings_sub_menu/add_volume_price_model_admin_menu_links.html.erb.deface +5 -0
- data/app/overrides/views_decorator.rb +2 -0
- data/app/views/spree/admin/shared/_vp_product_tab.html.erb +2 -2
- data/app/views/spree/admin/variants/_edit_fields.html.erb +5 -32
- data/app/views/spree/admin/variants/volume_prices.html.erb +9 -36
- data/app/views/spree/admin/volume_price_models/_form.html.erb +6 -2
- data/app/views/spree/admin/volume_price_models/_list.html.erb +8 -4
- data/app/views/spree/admin/volume_price_models/_select.html.erb +17 -0
- data/app/views/spree/admin/volume_price_models/edit.html.erb +7 -6
- data/app/views/spree/admin/volume_price_models/index.html.erb +7 -5
- data/app/views/spree/admin/volume_price_models/new.html.erb +5 -5
- data/app/views/spree/admin/volume_prices/_table.html.erb +26 -0
- data/app/views/spree/admin/volume_prices/_volume_price_fields.html.erb +6 -6
- data/app/views/spree/products/_volume_pricing.html.erb +8 -8
- data/bin/rails +3 -2
- data/config/locales/de.yml +17 -3
- data/config/locales/en.yml +21 -2
- data/config/locales/pt.yml +6 -2
- data/config/locales/ru.yml +6 -2
- data/config/locales/sv.yml +6 -2
- data/config/locales/tr.yml +6 -2
- data/config/routes.rb +3 -1
- data/db/migrate/20081119145604_create_volume_prices.rb +3 -1
- data/db/migrate/20110203174010_change_display_name_for_volume_prices.rb +3 -1
- data/db/migrate/20111206173307_prefix_volume_pricing_table_names.rb +3 -1
- data/db/migrate/20121115043422_add_discount_type_column.rb +3 -1
- data/db/migrate/20150513200904_add_role_to_volume_price.rb +3 -1
- data/db/migrate/20150603143015_create_spree_volume_price_models.rb +3 -1
- data/lib/generators/solidus_volume_pricing/install/install_generator.rb +3 -5
- data/lib/solidus_volume_pricing.rb +5 -1
- data/lib/solidus_volume_pricing/engine.rb +5 -22
- data/lib/solidus_volume_pricing/range_from_string.rb +36 -0
- data/lib/solidus_volume_pricing/version.rb +5 -3
- data/solidus_volume_pricing.gemspec +6 -14
- data/spec/controllers/spree/admin/variants_controller_spec.rb +18 -15
- data/spec/factories/volume_price_factory.rb +7 -5
- data/spec/features/manage_volume_price_models_feature_spec.rb +5 -3
- data/spec/features/manage_volume_prices_feature_spec.rb +6 -4
- data/spec/helpers/base_helper_spec.rb +3 -1
- data/spec/lib/solidus_volume_pricing/range_from_string_spec.rb +61 -0
- data/spec/models/solidus_volume_pricing/pricer_spec.rb +673 -0
- data/spec/models/solidus_volume_pricing/pricing_options_spec.rb +57 -0
- data/spec/models/spree/line_item_spec.rb +24 -21
- data/spec/models/spree/order_spec.rb +4 -2
- data/spec/models/spree/variant_spec.rb +3 -303
- data/spec/models/spree/volume_price_spec.rb +153 -49
- data/spec/spec_helper.rb +5 -38
- data/spec/support/shoulda.rb +11 -0
- metadata +37 -173
- data/.hound.yml +0 -40
- data/.travis.yml +0 -12
- data/CONTRIBUTING.md +0 -81
- data/app/controllers/spree/admin/variants_controller_decorator.rb +0 -32
- data/app/helpers/spree/base_helper_decorator.rb +0 -19
- data/app/models/spree/line_item_decorator.rb +0 -13
- data/app/models/spree/user_decorator.rb +0 -10
- data/app/models/spree/variant_decorator.rb +0 -104
- data/app/overrides/spree/admin/shared/sub_menu/_configuration/add_volume_price_model_admin_menu_links.html.erb.deface +0 -3
- data/app/views/spree/admin/volume_prices/_edit_fields.html.erb +0 -31
- data/spec/support/capybara.rb +0 -12
- data/spec/support/database_cleaner.rb +0 -21
- data/spec/support/factory_girl.rb +0 -7
- data/spec/support/spree.rb +0 -10
@@ -1,3 +1,3 @@
|
|
1
|
-
<%= content_tag :li, class: ('active' if current ==
|
2
|
-
<%=
|
1
|
+
<%= content_tag :li, class: ('active' if current == t('spree.volume_pricing')) do %>
|
2
|
+
<%= link_to t('spree.volume_pricing'), volume_prices_admin_product_variant_url(@product, @product.master) %>
|
3
3
|
<% end %>
|
@@ -1,33 +1,6 @@
|
|
1
|
-
|
2
|
-
<
|
3
|
-
<%= button_link_to Spree.t(:add_volume_price), 'javascript:;', {
|
4
|
-
icon: 'add', :'data-target' => 'tbody#volume_prices', class: 'btn-success spree_add_fields', id: 'add_volume_price' } %>
|
5
|
-
</span>
|
6
|
-
<% end %>
|
1
|
+
<fieldset>
|
2
|
+
<legend><%= t('spree.volume_prices') %></legend>
|
7
3
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
<tr>
|
12
|
-
<th><%= Spree.t(:name) %></th>
|
13
|
-
<th><%= Spree.t(:discount_type) %></th>
|
14
|
-
<th><%= Spree.t(:range) %></th>
|
15
|
-
<th><%= Spree.t(:amount) %></th>
|
16
|
-
<th><%= Spree.t(:position) %></th>
|
17
|
-
<th><%= Spree.t(:role) %></th>
|
18
|
-
<th><%= Spree.t(:action) %></th>
|
19
|
-
</tr>
|
20
|
-
</thead>
|
21
|
-
<tbody id="volume_prices">
|
22
|
-
<%= f.fields_for :volume_prices do |vp_form| %>
|
23
|
-
<%= render partial: 'spree/admin/volume_prices/volume_price_fields', locals: { f: vp_form } %>
|
24
|
-
<% end %>
|
25
|
-
</tbody>
|
26
|
-
<tbody id="volume_price_models">
|
27
|
-
<%= f.field_container :volume_price_model, class: ['form-group'] do %>
|
28
|
-
<%= f.label :volume_price_model_id, Spree.t(:volume_price_model) %>
|
29
|
-
<%= f.collection_select(:volume_price_model_ids, Spree::VolumePriceModel.all, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2', disabled: (cannot? :edit, Spree::VolumePriceModel) }) %>
|
30
|
-
<%= f.error_message_on :volume_price_model %>
|
31
|
-
<% end %>
|
32
|
-
</tbody>
|
33
|
-
</table>
|
4
|
+
<%= render 'spree/admin/volume_price_models/select', f: f %>
|
5
|
+
<%= render 'spree/admin/volume_prices/table', f: f %>
|
6
|
+
</fieldset>
|
@@ -1,39 +1,12 @@
|
|
1
|
-
<%= render 'spree/admin/shared/product_tabs', current:
|
1
|
+
<%= render 'spree/admin/shared/product_tabs', current: t('spree.volume_pricing') %>
|
2
2
|
<%= render 'spree/shared/error_messages', target: @variant %>
|
3
3
|
|
4
|
-
|
5
|
-
<
|
6
|
-
<%= button_link_to Spree.t(:add_volume_price), 'javascript:;', {
|
7
|
-
icon: 'add', :'data-target' => 'tbody#volume_prices', class: 'btn-success spree_add_fields', id: 'add_volume_price'} %>
|
8
|
-
</span>
|
9
|
-
<% end %>
|
4
|
+
<fieldset>
|
5
|
+
<legend><%= t('spree.volume_prices') %></legend>
|
10
6
|
|
11
|
-
<%= form_for(@variant, url: admin_product_variant_path(@product, @variant), html: { method: :put }) do |f| %>
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<th><%= Spree.t(:discount_type) %></th>
|
18
|
-
<th><%= Spree.t(:range) %></th>
|
19
|
-
<th><%= Spree.t(:amount) %></th>
|
20
|
-
<th><%= Spree.t(:position) %></th>
|
21
|
-
<th><%= Spree.t(:role) %></th>
|
22
|
-
<th class="actions"></th>
|
23
|
-
</tr>
|
24
|
-
</thead>
|
25
|
-
<tbody id="volume_prices">
|
26
|
-
<%= f.fields_for :volume_prices do |vp_form| %>
|
27
|
-
<%= render partial: 'spree/admin/volume_prices/volume_price_fields', locals: { f: vp_form } %>
|
28
|
-
<% end %>
|
29
|
-
</tbody>
|
30
|
-
<tbody id="volume_price_models">
|
31
|
-
<%= f.field_container :volume_price_model, class: ['form-group'] do %>
|
32
|
-
<%= f.label :volume_price_model_id, Spree.t(:volume_price_model) %>
|
33
|
-
<%= f.collection_select(:volume_price_model_ids, Spree::VolumePriceModel.all, :id, :name, { include_blank: Spree.t('match_choices.none') }, { class: 'select2', disabled: (cannot? :edit, Spree::VolumePriceModel) }) %>
|
34
|
-
<%= f.error_message_on :volume_price_model %>
|
35
|
-
<% end %>
|
36
|
-
</tbody>
|
37
|
-
</table>
|
38
|
-
<%= render 'spree/admin/shared/edit_resource_links' %>
|
39
|
-
<% end %>
|
7
|
+
<%= form_for(@variant, url: admin_product_variant_path(@product, @variant), html: { method: :put }) do |f| %>
|
8
|
+
<%= render 'spree/admin/volume_price_models/select', f: f %>
|
9
|
+
<%= render 'spree/admin/volume_prices/table', f: f %>
|
10
|
+
<%= render 'spree/admin/shared/edit_resource_links' %>
|
11
|
+
<% end %>
|
12
|
+
</fieldset>
|
@@ -1,9 +1,13 @@
|
|
1
1
|
<div data-hook="admin_inside_volume_price_model_form" class="form-group">
|
2
2
|
<%= f.field_container :name, class: ['form-group'] do %>
|
3
|
-
<%= f.label :name,
|
3
|
+
<%= f.label :name, t('spree.name') %> <span class="required">*</span>
|
4
4
|
<%= error_message_on :volume_price_model, :name, :class => 'error-message' %>
|
5
5
|
<%= text_field :volume_price_model, :name, :class => 'form-control' %>
|
6
6
|
<% end %>
|
7
7
|
|
8
|
-
|
8
|
+
<fieldset>
|
9
|
+
<legend><%= t('spree.volume_prices') %></legend>
|
10
|
+
|
11
|
+
<%= render 'spree/admin/volume_prices/table', f: f %>
|
12
|
+
</fieldset>
|
9
13
|
</div>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<table class="table sortable" id='listing_volume_price_models' data-hook
|
1
|
+
<table class="table sortable" id='listing_volume_price_models' data-hook>
|
2
2
|
<thead>
|
3
3
|
<tr data-hook="volume_price_models_header">
|
4
4
|
<th class="no-border"></th>
|
5
|
-
<th><%=
|
5
|
+
<th><%= t('spree.name') %></th>
|
6
6
|
<th class="actions"></th>
|
7
7
|
</tr>
|
8
8
|
</thead>
|
@@ -14,8 +14,12 @@
|
|
14
14
|
</td>
|
15
15
|
<td><%= price_model.name %></td>
|
16
16
|
<td class="actions actions-2 text-right">
|
17
|
-
|
18
|
-
|
17
|
+
<% if can?(:update, price_model) %>
|
18
|
+
<%= link_to_edit price_model, no_text: true %>
|
19
|
+
<% end %>
|
20
|
+
<% if can?(:destroy, price_model) %>
|
21
|
+
<%= link_to_delete price_model, no_text: true %>
|
22
|
+
<% end %>
|
19
23
|
</td>
|
20
24
|
</tr>
|
21
25
|
<% end %>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="row">
|
2
|
+
<div class="col-4">
|
3
|
+
<%= f.field_container :volume_price_model, class: ['form-group'] do %>
|
4
|
+
<%= f.label :volume_price_model_id, t('spree.volume_price_model') %>
|
5
|
+
<%= f.collection_select :volume_price_model_ids,
|
6
|
+
Spree::VolumePriceModel.all, :id, :name,
|
7
|
+
{
|
8
|
+
include_blank: t('spree.match_choices.none')
|
9
|
+
},
|
10
|
+
{
|
11
|
+
class: 'custom-select fullwidth',
|
12
|
+
disabled: cannot?(:edit, Spree::VolumePriceModel)
|
13
|
+
} %>
|
14
|
+
<%= f.error_message_on :volume_price_model %>
|
15
|
+
<% end %>
|
16
|
+
</div>
|
17
|
+
</div>
|
@@ -1,12 +1,13 @@
|
|
1
1
|
<% content_for :page_title do %>
|
2
|
-
<%=
|
2
|
+
<%= t('spree.volume_price_model_edit') %>
|
3
3
|
<% end %>
|
4
4
|
|
5
|
-
|
6
|
-
<fieldset>
|
7
|
-
<%= render partial: 'form', locals: { f: f } %>
|
8
|
-
</fieldset>
|
5
|
+
<% admin_breadcrumb(link_to plural_resource_name(Spree::VolumePriceModel), admin_volume_price_models_path) %>
|
9
6
|
|
10
|
-
|
7
|
+
<%= form_for [:admin, @volume_price_model] do |f| %>
|
8
|
+
<%= render partial: 'form', locals: { f: f } %>
|
11
9
|
|
10
|
+
<% if can?(:update, @volume_price_model) %>
|
11
|
+
<%= render 'spree/admin/shared/edit_resource_links' %>
|
12
|
+
<% end %>
|
12
13
|
<% end %>
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<% content_for :page_title do %>
|
2
|
-
<%=
|
2
|
+
<%= plural_resource_name(Spree::VolumePriceModel) %>
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<%=
|
6
|
+
<%= link_to t('spree.new_volume_price_model'), new_object_url, class: "btn btn-primary", id: 'admin_new_volume_price_model_link' %>
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<% if @volume_price_models.any? %>
|
@@ -11,8 +11,10 @@
|
|
11
11
|
<%= render 'list' %>
|
12
12
|
</div>
|
13
13
|
<% else %>
|
14
|
-
<div class="
|
15
|
-
<%=
|
16
|
-
|
14
|
+
<div class="no-objects-found">
|
15
|
+
<%= t('spree.no_resource_found', resource: plural_resource_name(Spree::VolumePriceModel)) %>,
|
16
|
+
<% if can? :create, Spree::VolumePriceModel %>
|
17
|
+
<%= link_to t('spree.create_one'), new_object_url %>
|
18
|
+
<% end %>
|
17
19
|
</div>
|
18
20
|
<% end %>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<% content_for :page_title do %>
|
2
|
-
<%=
|
2
|
+
<%= t('spree.new_volume_price_model') %>
|
3
3
|
<% end %>
|
4
4
|
|
5
|
+
<% admin_breadcrumb(link_to plural_resource_name(Spree::VolumePriceModel), admin_volume_price_models_path) %>
|
6
|
+
|
5
7
|
<%= form_for [:admin, @volume_price_model] do |f| %>
|
6
|
-
<fieldset>
|
8
|
+
<fieldset class="no-border-top">
|
7
9
|
<%= render partial: 'form', locals: { f: f } %>
|
8
|
-
|
9
|
-
<%= button Spree.t(:create), 'save' %>
|
10
|
-
</div>
|
10
|
+
<%= render partial: 'spree/admin/shared/new_resource_links' %>
|
11
11
|
</fieldset>
|
12
12
|
<% end %>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<table class="table">
|
2
|
+
<thead>
|
3
|
+
<tr>
|
4
|
+
<th><%= t('spree.name') %></th>
|
5
|
+
<th><%= t('spree.discount_type') %></th>
|
6
|
+
<th><%= t('spree.range') %></th>
|
7
|
+
<th><%= t('spree.amount') %></th>
|
8
|
+
<th><%= t('spree.position') %></th>
|
9
|
+
<th><%= t('spree.role') %></th>
|
10
|
+
<th class="actions"></th>
|
11
|
+
</tr>
|
12
|
+
</thead>
|
13
|
+
<tbody id="volume_prices">
|
14
|
+
<%= f.fields_for :volume_prices do |vp_form| %>
|
15
|
+
<%= render partial: 'spree/admin/volume_prices/volume_price_fields', locals: { f: vp_form } %>
|
16
|
+
<% end %>
|
17
|
+
</tbody>
|
18
|
+
</table>
|
19
|
+
|
20
|
+
<span id="new_add_volume_price" data-hook>
|
21
|
+
<%= link_to t(:add_volume_price, scope: :spree), 'javascript:;', {
|
22
|
+
data: { target: 'tbody#volume_prices' },
|
23
|
+
class: 'btn btn-primary spree_add_fields',
|
24
|
+
id: 'add_volume_price'
|
25
|
+
} %>
|
26
|
+
</span>
|
@@ -6,10 +6,10 @@
|
|
6
6
|
<td>
|
7
7
|
<%= error_message_on(f.object, :discount_type) %>
|
8
8
|
<%= f.select :discount_type, [
|
9
|
-
[
|
10
|
-
[
|
11
|
-
[
|
12
|
-
], { include_blank: true }, class: '
|
9
|
+
[t('spree.total_price'), 'price'],
|
10
|
+
[t('spree.percent_discount'), 'percent'],
|
11
|
+
[t('spree.price_discount'), 'dollar']
|
12
|
+
], { include_blank: true }, class: 'custom-select' %>
|
13
13
|
</td>
|
14
14
|
<td>
|
15
15
|
<%= error_message_on(f.object, :range) %>
|
@@ -25,9 +25,9 @@
|
|
25
25
|
</td>
|
26
26
|
<td>
|
27
27
|
<%= error_message_on(f.object, :role_id) %>
|
28
|
-
<%= f.collection_select(:role_id, Spree::Role.all, :id, :name, { include_blank:
|
28
|
+
<%= f.collection_select(:role_id, Spree::Role.all, :id, :name, { include_blank: t('spree.match_choices.none') }, { class: 'custom-select' }) %>
|
29
29
|
</td>
|
30
30
|
<td class="actions">
|
31
|
-
<%= link_to_remove_fields
|
31
|
+
<%= link_to_remove_fields t('spree.remove'), f, no_text: true %>
|
32
32
|
</td>
|
33
33
|
</tr>
|
@@ -1,15 +1,15 @@
|
|
1
1
|
<% display_percent ||= false %>
|
2
2
|
<% if product.price > 0 and product.master.volume_prices.present? %>
|
3
3
|
<div id="bulk-discount">
|
4
|
-
<h6><%=
|
4
|
+
<h6><%= t('spree.bulk_discount') %></h6>
|
5
5
|
<table class="table">
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
<% product.master.volume_prices.each do |v| %>
|
7
|
+
<%= content_tag(:tr) do %>
|
8
|
+
<%= content_tag :td, v.display_range %>
|
9
|
+
<%= content_tag :td, Spree::Money.new(v.amount).to_s %>
|
10
|
+
<%= content_tag(:td, '%i%' % ((1.0 - v.amount / product.master.price) * 100.0).round) if display_percent %>
|
11
|
+
<% end %>
|
12
|
+
<% end %>
|
13
13
|
</table>
|
14
14
|
</div>
|
15
15
|
<% end %>
|
data/bin/rails
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
ENGINE_ROOT = File.expand_path('
|
4
|
-
ENGINE_PATH = File.expand_path('
|
4
|
+
ENGINE_ROOT = File.expand_path('..', __dir__)
|
5
|
+
ENGINE_PATH = File.expand_path('../lib/solidus_volume_pricing/engine', __dir__)
|
5
6
|
|
6
7
|
require 'rails/all'
|
7
8
|
require 'rails/engine/commands'
|
data/config/locales/de.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
de:
|
3
3
|
spree:
|
4
|
-
add_volume_price:
|
4
|
+
add_volume_price: Neuer Staffelpreis
|
5
5
|
position: Position
|
6
6
|
discount_type:
|
7
7
|
range: Bereich
|
@@ -10,9 +10,23 @@ de:
|
|
10
10
|
price_discount:
|
11
11
|
percent_discount:
|
12
12
|
bulk_discount:
|
13
|
+
admin:
|
14
|
+
tab:
|
15
|
+
volume_price_models: Staffelpreismodelle
|
13
16
|
activerecord:
|
17
|
+
models:
|
18
|
+
spree/volume_price:
|
19
|
+
one: Staffelpreis
|
20
|
+
other: Staffelpreise
|
21
|
+
spree/volume_price_model:
|
22
|
+
one: Staffelpreismodell
|
23
|
+
other: Staffelpreismodelle
|
14
24
|
errors:
|
25
|
+
models:
|
26
|
+
spree/volume_price:
|
27
|
+
attributes:
|
28
|
+
discount_type:
|
29
|
+
inclusion: '%{value} ist kein valider Staffelpreistyp'
|
15
30
|
messages:
|
16
|
-
|
17
|
-
is_not_a_valid_volume_price_type:
|
31
|
+
could_not_convert_to_range:
|
18
32
|
must_be_in_format:
|
data/config/locales/en.yml
CHANGED
@@ -5,14 +5,33 @@ en:
|
|
5
5
|
position: Position
|
6
6
|
discount_type: Discount Type
|
7
7
|
range: Range
|
8
|
+
role: Role
|
8
9
|
volume_prices: Volume Prices
|
10
|
+
volume_price_model: Volume Price Model
|
11
|
+
new_volume_price_model: New Volume Price Model
|
12
|
+
volume_price_model_edit: Edit Volume Price Model
|
9
13
|
volume_pricing: Volume Pricing
|
10
14
|
price_discount: Price Discount
|
11
15
|
percent_discount: Percent Discount
|
12
16
|
bulk_discount: Bulk Discount
|
17
|
+
total_price: Total price
|
18
|
+
admin:
|
19
|
+
tab:
|
20
|
+
volume_price_models: Volume Price Models
|
13
21
|
activerecord:
|
22
|
+
models:
|
23
|
+
spree/volume_price:
|
24
|
+
one: Volume Price
|
25
|
+
other: Volume Prices
|
26
|
+
spree/volume_price_model:
|
27
|
+
one: Volume Price Model
|
28
|
+
other: Volume Price Models
|
14
29
|
errors:
|
30
|
+
models:
|
31
|
+
spree/volume_price:
|
32
|
+
attributes:
|
33
|
+
discount_type:
|
34
|
+
inclusion: '%{value} is not a valid Volume Price Type'
|
15
35
|
messages:
|
16
|
-
|
17
|
-
is_not_a_valid_volume_price_type: '%{value} is not a valid Volume Price Type'
|
36
|
+
could_not_convert_to_range: "Couldn't convert to Range: %{range_string}"
|
18
37
|
must_be_in_format: 'must be in one of the following formats: (a..b), (a...b), (a+)'
|
data/config/locales/pt.yml
CHANGED
@@ -12,7 +12,11 @@ pt:
|
|
12
12
|
bulk_discount: Desconto por Quantidade
|
13
13
|
activerecord:
|
14
14
|
errors:
|
15
|
+
models:
|
16
|
+
spree/volume_price:
|
17
|
+
attributes:
|
18
|
+
discount_type:
|
19
|
+
inclusion: '%{value} is not a valid Volume Price Type'
|
15
20
|
messages:
|
16
|
-
|
17
|
-
is_not_a_valid_volume_price_type:
|
21
|
+
could_not_convert_to_range:
|
18
22
|
must_be_in_format:
|
data/config/locales/ru.yml
CHANGED
@@ -12,7 +12,11 @@ ru:
|
|
12
12
|
bulk_discount:
|
13
13
|
activerecord:
|
14
14
|
errors:
|
15
|
+
models:
|
16
|
+
spree/volume_price:
|
17
|
+
attributes:
|
18
|
+
discount_type:
|
19
|
+
inclusion: '%{value} is not a valid Volume Price Type'
|
15
20
|
messages:
|
16
|
-
|
17
|
-
is_not_a_valid_volume_price_type:
|
21
|
+
could_not_convert_to_range:
|
18
22
|
must_be_in_format:
|
data/config/locales/sv.yml
CHANGED
@@ -12,7 +12,11 @@ sv:
|
|
12
12
|
bulk_discount: Bulk rabatt
|
13
13
|
activerecord:
|
14
14
|
errors:
|
15
|
+
models:
|
16
|
+
spree/volume_price:
|
17
|
+
attributes:
|
18
|
+
discount_type:
|
19
|
+
inclusion: '%{value} är inte en giltligt typ för volympris'
|
15
20
|
messages:
|
16
|
-
|
17
|
-
is_not_a_valid_volume_price_type: '%{value} är inte en giltligt typ för volympris'
|
21
|
+
could_not_convert_to_range: "Det gick inte att konvertera till omfång: %{range_string}"
|
18
22
|
must_be_in_format: 'måste vara i ett av följande format: (a..b), (a...b), (a+)'
|
data/config/locales/tr.yml
CHANGED
@@ -12,7 +12,11 @@ tr:
|
|
12
12
|
bulk_discount:
|
13
13
|
activerecord:
|
14
14
|
errors:
|
15
|
+
models:
|
16
|
+
spree/volume_price:
|
17
|
+
attributes:
|
18
|
+
discount_type:
|
19
|
+
inclusion: '%{value} is not a valid Volume Price Type'
|
15
20
|
messages:
|
16
|
-
|
17
|
-
is_not_a_valid_volume_price_type:
|
21
|
+
could_not_convert_to_range:
|
18
22
|
must_be_in_format:
|