mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Set master variant price in products controller
Set master variant price in products controller Code climate tidy up Syntax improvement Revert "Remove non-functional Price field from Edit Product screen" This reverts commit585072302c. Syntax improvement fixing revert Revert "Remove non-functional Price field from Edit Product screen" This reverts commit585072302c. fixing conflicts
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
|
||||
|
||||
Reference in New Issue
Block a user