mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-15 23:57:48 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user