app/models/shipment.rb
def calculate_seller_shipping_fee
    cost = 0.00

    items.each do |i|
      sr = ProductShippingRate.find_by!(product_id: i.order_item.product_id, destination_country_code: recipient_country, ship_method: :standard)
      cost += sr.get_cost(i.quantity)
    end

    cost
  end
# get shipment cost based on store_product_shipping_rates table
get shipment cost based on store_product_shipping_rates table
get shipment cost based on store_product_shipping_rates table
def calculate_seller_shipping_fee
    cost = 0.00
    items.each do |i|
      sr = ProductShippingRate.find_by!(product_id: i.order_item.product_id, destination_country_code: recipient_country, ship_method: :standard)
      cost += sr.get_cost(i.quantity)
    end
    cost
  end
def calculate_seller_shipping_fee cost = 0.00 items . each do | i | sr = ProductShippingRate . find_by! ( product_id : i . order_item . product_id , destination_country_code : recipient_country , ship_method : :standard ) cost += sr . get_cost ( i . quantity ) end cost end
get shipment cost based on store_product_shipping_rates table
get shipment cost based on store_product_shipping_rates table