Class: Locomotive::Ecommerce::Plugin

Inherits:
Object
  • Object
show all
Includes:
InventoryInterface, Plugin
Defined in:
lib/locomotive/ecommerce/plugin.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods included from InventoryInterface

included

Class Method Details

.default_plugin_idObject



24
25
26
# File 'lib/locomotive/ecommerce/plugin.rb', line 24

def self.default_plugin_id
  'ecommerce'
end

.liquid_filtersObject



46
47
48
# File 'lib/locomotive/ecommerce/plugin.rb', line 46

def self.liquid_filters
  EcommerceFilters
end

.liquid_tagsObject



40
41
42
43
44
# File 'lib/locomotive/ecommerce/plugin.rb', line 40

def self.liquid_tags
  {
    stripe:   StripeTag
  }
end

.rack_appObject



28
29
30
# File 'lib/locomotive/ecommerce/plugin.rb', line 28

def self.rack_app
  Engine
end

Instance Method Details

#config_template_fileObject



32
33
34
# File 'lib/locomotive/ecommerce/plugin.rb', line 32

def config_template_file
  File.join(File.dirname(__FILE__), 'plugin', 'config.html')
end

#helperObject



50
51
52
53
54
55
56
# File 'lib/locomotive/ecommerce/plugin.rb', line 50

def helper
  if !@helper
    @helper = PluginHelper.new
    @helper.instance_eval { extend EcommerceHelper }
  end
  return @helper
end

#pathObject



58
59
60
# File 'lib/locomotive/ecommerce/plugin.rb', line 58

def path
  rack_app_full_path('/')
end

#to_liquidObject



36
37
38
# File 'lib/locomotive/ecommerce/plugin.rb', line 36

def to_liquid
  @drop ||= EcommerceDrop.new(self)
end