Class: Plugins::Ecommerce::ProductVariationDecorator
- Inherits:
-
Draper::Decorator
- Object
- Draper::Decorator
- Plugins::Ecommerce::ProductVariationDecorator
- Defined in:
- app/decorators/plugins/ecommerce/product_variation_decorator.rb
Instance Method Summary collapse
Instance Method Details
#get_product ⇒ Object
15 16 17 |
# File 'app/decorators/plugins/ecommerce/product_variation_decorator.rb', line 15 def get_product @_cache_get_product ||= object.product.decorate end |
#the_price ⇒ Object
3 4 5 |
# File 'app/decorators/plugins/ecommerce/product_variation_decorator.rb', line 3 def the_price h.e_parse_price(object.amount) end |
#the_title ⇒ Object
7 8 9 |
# File 'app/decorators/plugins/ecommerce/product_variation_decorator.rb', line 7 def the_title get_product.the_variation_title(object.id) end |
#the_weight ⇒ Object
11 12 13 |
# File 'app/decorators/plugins/ecommerce/product_variation_decorator.rb', line 11 def the_weight "#{h.current_site.current_weight} #{object.weight}" end |