From b9432741528dd1ae5bda94cc08dfb45c8f3979d5 Mon Sep 17 00:00:00 2001 From: mariano-mejuri <83985323+mariano-mejuri@users.noreply.github.com> Date: Fri, 24 Sep 2021 12:48:12 -0300 Subject: [PATCH] [DL-685] Add support for samples shipping value (#67) * [DL-685] Add support for samples shipping value * [DL-685] Rubocop fix --- app/models/spree/calculator/shipping/flow_io.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/spree/calculator/shipping/flow_io.rb b/app/models/spree/calculator/shipping/flow_io.rb index c068a6d6..00ba11dc 100644 --- a/app/models/spree/calculator/shipping/flow_io.rb +++ b/app/models/spree/calculator/shipping/flow_io.rb @@ -6,6 +6,7 @@ module Shipping class FlowIo < ShippingCalculator preference :lower_boundary, :decimal, default: 100 preference :charge_default, :decimal, default: 15 + preference :sample_product_cost, :decimal, default: 9 def self.description 'FlowIO Calculator' @@ -26,6 +27,10 @@ def threshold preferred_lower_boundary end + def default_sample_charge + preferred_sample_product_cost + end + private def flow_order(package)