-
Notifications
You must be signed in to change notification settings - Fork 2
/
shop_cart_extension.rb
30 lines (27 loc) · 1.21 KB
/
shop_cart_extension.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Uncomment this if you reference any of your controllers in activate
require_dependency 'application_controller'
require_dependency "#{File.expand_path(File.dirname(__FILE__))}/lib/controller_extensions/application_controller_ext"
require_dependency "#{File.expand_path(File.dirname(__FILE__))}/lib/model_extensions/shop_line_item_ext"
require_dependency "#{File.expand_path(File.dirname(__FILE__))}/lib/model_extensions/shop_order_ext"
class ShopCartExtension < Radiant::Extension
version "1.0"
description "Describe your extension here"
url "http://github.com/crankin/radiant-shop_cart-extension"
# define_routes do |map|
# map.namespace :admin, :member => { :remove => :get } do |admin|
# admin.resources :shop_cart
# end
# end
extension_config do |config|
config.gem 'activemerchant', :version => '~> 1.4.2', :source => 'http://gemcutter.org'
config.extension 'shop_tax'
end
def activate
# tab 'Content' do
# add_item "Shop Cart", "/admin/shop_cart", :after => "Pages"
# end
ApplicationController.send(:include, ShopCart::ApplicationControllerExt)
ShopOrder.send(:include, ShopCart::ShopOrderExt)
ShopLineItem.send(:include, ShopCart::ShopLineItemExt)
end
end