Class: Spree::WishedItem
- Inherits:
-
Object
- Object
- Spree::WishedItem
- Extended by:
- DisplayMoney
- Includes:
- Spree::Webhooks::HasWebhooks
- Defined in:
- app/models/spree/wished_item.rb
Instance Method Summary collapse
Methods included from DisplayMoney
Instance Method Details
#price(currency) ⇒ Object
19 20 21 |
# File 'app/models/spree/wished_item.rb', line 19 def price(currency) variant.amount_in(currency[:currency]) end |
#total(currency) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'app/models/spree/wished_item.rb', line 23 def total(currency) variant_price = variant.amount_in(currency[:currency]) if variant_price.nil? variant_price else quantity * variant_price end end |