VolumeRule (delivery_method_rules/volume_rule.rb)

spree · spree/core/app/models/spree/delivery_method_rules/volume_rule.rb · ruby · BSD-3-Clause
pos, tag:knn-classified

Module exposing: VolumeRule, eligible

# Source: https://github.com/spree/spree | License: BSD-3-Clause | Copyright 2024-present, Vendo Sp. z o.o., Vendo Connect Inc
# Provided via justclaw.it.com; keep this notice with the code.
module Spree
  module DeliveryMethodRules
    # Bounds the method by the packed volume of the shipment, in cubic
    # meters. This is what turns a wholesale tier table into configuration: a
    # "Pallet" method takes 1–15 CBM, a "20ft container" 15–33, and the
    # estimator offers whichever one the order actually fills.
    #
    # Unlike {WeightRule}, the compared value is always converted to CBM
    # first. Dimensions are stored in whatever unit the merchant typed, and
    # inches read as centimeters overstate a carton roughly sixteenfold — too
    # large an error to leave to convention.
    c

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key