Class: OpCart::LineItem

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/op_cart/line_item.rb

Instance Method Summary collapse

Instance Method Details

#totalObject



18
19
20
21
22
23
24
# File 'app/models/op_cart/line_item.rb', line 18

def total
  if sellable.is_a? Plan
    0
  else
    (unit_price || sellable.price) * quantity
  end
end