Sha256: 93aa4e62b2dbc369022efce1dcf93f76a7c10be469e3a5a4ecc281fb4a528952

Contents?: true

Size: 375 Bytes

Versions: 6

Compression:

Stored size: 375 Bytes

Contents

class Plugins::Ecommerce::ProductVariationDecorator < Draper::Decorator
  delegate_all
  def the_price
    h.e_parse_price(object.amount)
  end

  def the_title
    get_product.the_variation_title(object.id)
  end

  def the_weight
    "#{h.current_site.current_weight} #{object.weight}"
  end

  def get_product
    @_cache_get_product ||= object.product.decorate
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
camaleon_ecommerce-2.0.4 app/decorators/plugins/ecommerce/product_variation_decorator.rb
camaleon_ecommerce-2.0.3 app/decorators/plugins/ecommerce/product_variation_decorator.rb
camaleon_ecommerce-2.0.2 app/decorators/plugins/ecommerce/product_variation_decorator.rb
camaleon_ecommerce-2.0.1 app/decorators/plugins/ecommerce/product_variation_decorator.rb
camaleon_ecommerce-2.0.0 app/decorators/plugins/ecommerce/product_variation_decorator.rb
camaleon_ecommerce-1.2.1 app/decorators/plugins/ecommerce/product_variation_decorator.rb