Sha256: bbd451e2af1dbf95f69be4a4f065760c99dfe9871cd9e7bf1bcf0f6a9a199c43

Contents?: true

Size: 410 Bytes

Versions: 1

Compression:

Stored size: 410 Bytes

Contents

class Plugins::Ecommerce::ProductVariationDecorator < Draper::Decorator
  delegate_all
  def the_price
    "#{h.current_site.current_unit}#{sprintf('%.2f', 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

1 entries across 1 versions & 1 rubygems

Version Path
camaleon_ecommerce-1.2 app/decorators/plugins/ecommerce/product_variation_decorator.rb