app/models/spree/product_decorator.rb
# If a product doesn't have a supplier
# then it cannot be drop shipped.
# In a future it may have some other conditions
If a product doesn't have a supplier
then it cannot be drop shipped.
In a future it may have some other conditions
If a product doesn ' t have a supplier then it cannot be drop shipped . In a future it may have some other conditions
def drop_shippeable?
      supplier &&
        supplier.shipping_methods.any? &&
        supplier.stock_location.stock_items.find_by(variant_id: master.id).count_on_hand > 0
    end
def drop_shippeable? supplier && supplier . shipping_methods . any? && supplier . stock_location . stock_items . find_by ( variant_id : master . id ) . count_on_hand > 0 end
If a product doesn't have a supplier
then it cannot be drop shipped.
If a product doesn ' t have a supplier then it cannot be drop shipped .