Merge pull request #3797 from lin-d-hop/variant-master-price

Remove non-functional Price field from Edit Product screen
This commit is contained in:
Luis Ramos
2019-05-28 10:30:05 +01:00
committed by GitHub
2 changed files with 4 additions and 5 deletions

View File

@@ -151,4 +151,8 @@ Spree::Admin::ProductsController.class_eval do
variant.on_demand = on_demand if on_demand.present?
variant.on_hand = on_hand.to_i if on_hand.present?
end
def set_product_master_variant_price_to_zero
@product.price = 0 if @product.price.nil?
end
end

View File

@@ -46,11 +46,6 @@
= f.collection_select(:supplier_id, @producers, :id, :name, {:include_blank => true}, {:class => "select2"})
= f.error_message_on :supplier
= f.field_container :price do
= f.label :price, raw(t(:price) + content_tag(:span, ' *', :class => 'required'))
= f.text_field :price, :value => number_to_currency(@product.price, :unit => '')
= f.error_message_on :price
.clear
- unless @product.has_variants?