17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# File 'lib/locomotive/ecommerce/plugin/engine.rb', line 17
def self.config_or_default(key)
defaults = {
'cart_url' => '/cart',
'checkout_url' => '/checkout',
'post_checkout_url' => '/complete',
'confirm_order_url' => '/confirm',
'purchases_url' => '/purchases',
'estimated_tax_rate' => '15',
'country_slug' => 'country',
'province_slug' => 'province',
'percentage_slug' => 'percentage',
'shipping_name_slug' => 'name',
'shipping_over_slug' => 'over',
'shipping_under_slug' => 'under',
'price_break' => '100',
'shop_name' => "<insert name>",
'shop_inventory' => "inventory_itemsUpdate",
'contact' => "[email protected]",
'require_user' => false
}
hash = defaults.merge(config_hash)
hash[key]
end
|