Class: Spree::ReturnItem::ExchangeVariantEligibility::SameProduct

Inherits:
Object
  • Object
show all
Defined in:
core/app/models/spree/return_item/exchange_variant_eligibility/same_product.rb

Class Method Summary collapse

Class Method Details

.eligible_variants(variant, stock_locations: nil) ⇒ Object



7
8
9
# File 'core/app/models/spree/return_item/exchange_variant_eligibility/same_product.rb', line 7

def self.eligible_variants(variant, stock_locations: nil)
  Spree::Variant.where(product_id: variant.product_id, is_master: variant.is_master?).in_stock(stock_locations)
end