Skip to content

Commit

Permalink
Merge pull request #2875 from jacobherrington/bug/ui-update-product-sku
Browse files Browse the repository at this point in the history
Add a Master SKU field to the products form
  • Loading branch information
kennyadsl authored Nov 13, 2018
2 parents 25c118f + 0e178ad commit 35010c2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
14 changes: 7 additions & 7 deletions backend/app/views/spree/admin/products/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,13 @@
<% end %>
</div>

<div data-hook="admin_product_form_sku">
<%= f.field_container :sku do %>
<%= f.label :sku, t('spree.master_sku') %>
<%= f.text_field :sku, size: 16 %>
<% end %>
</div>

<% if @product.has_variants? %>
<div data-hook="admin_product_form_multiple_variants">
<%= f.label :skus, t('spree.skus') %>
Expand All @@ -102,13 +109,6 @@
<% end %>
</div>
</div>
<% else %>
<div data-hook="admin_product_form_sku">
<%= f.field_container :sku do %>
<%= f.label :sku, Spree::Variant.human_attribute_name(:sku) %>
<%= f.text_field :sku, size: 16 %>
<% end %>
</div>

<div id="shipping_specs" class="row">
<% [:height, :width, :depth, :weight].each_with_index do |field, index| %>
Expand Down
1 change: 1 addition & 0 deletions core/config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1455,6 +1455,7 @@ en:
manual_intervention_required: Manual intervention required
manage_variants: Manage Variants
master_price: Master Price
master_sku: Master SKU
master_variant: Master Variant
match_choices:
all: All
Expand Down

0 comments on commit 35010c2

Please sign in to comment.