spree_promo 0.60.6 → 0.70.RC1
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE +26 -0
- data/app/assets/javascripts/admin/promotions.js +131 -0
- data/app/assets/javascripts/admin/spree_promo.js +3 -0
- data/app/assets/javascripts/store/spree_promo.js +2 -0
- data/{public → app/assets}/stylesheets/admin/promotions.css +19 -29
- data/app/assets/stylesheets/admin/spree_promo.css +5 -0
- data/app/assets/stylesheets/store/spree_promo.css +4 -0
- data/app/controllers/admin/promotion_actions_controller.rb +28 -0
- data/app/controllers/admin/promotions_controller.rb +2 -2
- data/app/controllers/content_controller_decorator.rb +8 -0
- data/app/controllers/orders_controller_decorator.rb +14 -5
- data/app/models/adjustment_decorator.rb +3 -0
- data/app/models/order_decorator.rb +24 -0
- data/app/models/product_decorator.rb +10 -0
- data/app/models/product_group_decorator.rb +3 -0
- data/app/models/promotion.rb +61 -41
- data/app/models/promotion/actions/create_adjustment.rb +28 -0
- data/app/models/promotion/actions/create_line_items.rb +29 -0
- data/app/models/promotion/rules/first_order.rb +1 -1
- data/app/models/promotion/rules/item_total.rb +3 -2
- data/app/models/promotion/rules/landing_page.rb +17 -0
- data/app/models/promotion/rules/product.rb +1 -1
- data/app/models/promotion/rules/user.rb +1 -1
- data/app/models/promotion/rules/user_logged_in.rb +13 -0
- data/app/models/promotion_action.rb +19 -0
- data/app/models/promotion_action_line_item.rb +6 -0
- data/app/models/promotion_rule.rb +3 -16
- data/app/overrides/promo_admin_tabs.rb +5 -0
- data/app/overrides/promo_coupon_code_field.rb +5 -0
- data/app/overrides/promo_product_properties.rb +5 -0
- data/app/views/admin/promotion_actions/create.js.erb +7 -0
- data/app/views/admin/promotion_actions/destroy.js.erb +2 -0
- data/app/views/admin/promotions/_actions.html.erb +32 -0
- data/app/views/admin/promotions/_form.html.erb +17 -17
- data/app/views/admin/promotions/_promotion_action.html.erb +12 -0
- data/app/views/admin/promotions/_promotion_rule.html.erb +2 -2
- data/app/views/admin/promotions/_rules.html.erb +32 -0
- data/app/views/admin/promotions/actions/_create_adjustment.html.erb +19 -0
- data/app/views/admin/promotions/actions/_create_line_items.html.erb +52 -0
- data/app/views/admin/promotions/actions/_give_store_credit.html.erb +6 -0
- data/app/views/admin/promotions/edit.html.erb +4 -38
- data/app/views/admin/promotions/index.html.erb +5 -7
- data/app/views/admin/promotions/rules/_landing_page.html.erb +8 -0
- data/app/views/admin/promotions/rules/_user_logged_in.html.erb +3 -0
- data/app/views/checkout/_coupon_code_field.html.erb +1 -1
- data/config/locales/en.yml +27 -5
- data/config/routes.rb +1 -0
- data/db/migrate/20101026184833_migrate_adjustments.rb +9 -0
- data/db/migrate/20110331094351_promotion_changes_to_subclass_of_activator.rb +22 -0
- data/db/migrate/20110404123358_create_promotion_actions.rb +13 -0
- data/db/migrate/20110601202923_create_promotion_action_line_items.rb +12 -0
- data/lib/spree_promo.rb +24 -100
- metadata +77 -26
- data/app/models/promotion_credit.rb +0 -9
- data/db/migrate/20100419194457_fix_existing_coupon_credits.rb +0 -9
- data/lib/spree_promo_hooks.rb +0 -11
- data/lib/tasks/install.rake +0 -26
- data/public/javascripts/admin/promotions.js +0 -26
@@ -5,42 +5,8 @@
|
|
5
5
|
<%= render "admin/shared/edit_resource_links" %>
|
6
6
|
<% end %>
|
7
7
|
|
8
|
-
|
9
|
-
<legend><%= t(:rules) %></legend>
|
8
|
+
<%= render 'rules' %>
|
10
9
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<label><%= f.radio_button :match_policy, policy %> <%= t "promotion_form.match_policies.#{policy}" %></label>
|
15
|
-
<% end %>
|
16
|
-
</p>
|
17
|
-
<div id="rules" class="filter_list">
|
18
|
-
<% if @promotion.rules.any? %>
|
19
|
-
<%= render :partial => 'promotion_rule', :collection => @promotion.rules %>
|
20
|
-
<% else %>
|
21
|
-
<!-- <p><%= t('no_rules_added') %></p> -->
|
22
|
-
<% end %>
|
23
|
-
</div>
|
24
|
-
<p class="form-buttons">
|
25
|
-
<%= button t("update") %>
|
26
|
-
</p>
|
27
|
-
<% end %>
|
28
|
-
|
29
|
-
<%= form_tag(admin_promotion_promotion_rules_path(@promotion), 'data-remote' => true,
|
30
|
-
:id => 'new_product_rule_form') do %>
|
31
|
-
<% options = options_for_select( PromotionRule.rule_class_names.map {|name| [ t("promotion_rule_types.#{name.demodulize.underscore}.name"), name] } ) %>
|
32
|
-
<p>
|
33
|
-
<label for="promotion_rule_type"><%= t('add_rule_of_type') %></label>
|
34
|
-
<%= select_tag("promotion_rule[type]", options) %>
|
35
|
-
<input type="submit" value="<%= t('add') %>" />
|
36
|
-
</p>
|
37
|
-
<% end %>
|
38
|
-
|
39
|
-
</fieldset>
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<% content_for :head do %>
|
44
|
-
<%= javascript_include_tag 'admin/promotions.js' %>
|
45
|
-
<%= stylesheet_link_tag 'admin/promotions.css' %>
|
46
|
-
<% end %>
|
10
|
+
<div id="actions_container">
|
11
|
+
<%= render 'actions' %>
|
12
|
+
</div>
|
@@ -12,29 +12,27 @@
|
|
12
12
|
<table class="index">
|
13
13
|
<thead>
|
14
14
|
<tr>
|
15
|
+
<th><%= t("name") %></th>
|
15
16
|
<th><%= t("code") %></th>
|
16
17
|
<th><%= t("description") %></th>
|
17
|
-
<th><%= t("combine") %></th>
|
18
18
|
<th><%= t("usage_limit") %></th>
|
19
19
|
<th><%= t("expiration") %></th>
|
20
|
-
<th><%= t("calculator") %></th>
|
21
20
|
<th width="150"><%= t("action") %></th>
|
22
21
|
</tr>
|
23
22
|
</thead>
|
24
23
|
<tbody>
|
25
24
|
<% for promotion in @promotions %>
|
26
25
|
<tr id="<%= dom_id promotion %>">
|
26
|
+
<td><%= promotion.name %></td>
|
27
27
|
<td><%= promotion.code %></td>
|
28
28
|
<td><%= promotion.description %></td>
|
29
|
-
<td><%= promotion.combine ? t(:yes) : t(:no) %></td>
|
30
29
|
<td><%= promotion.usage_limit %></td>
|
31
30
|
<td><%= promotion.expires_at.to_date.to_s(:short_date) if promotion.expires_at %></td>
|
32
|
-
<td><%= promotion.calculator.description if promotion.calculator %></td>
|
33
31
|
<td>
|
34
|
-
|
35
|
-
|
32
|
+
<%= link_to_edit promotion %>
|
33
|
+
<%= link_to_delete promotion %>
|
36
34
|
</td>
|
37
35
|
</tr>
|
38
36
|
<% end %>
|
39
37
|
</tbody>
|
40
|
-
</table>
|
38
|
+
</table>
|
@@ -0,0 +1,8 @@
|
|
1
|
+
<p class="field">
|
2
|
+
<label for="<%= "#{param_prefix}_preferred_path" %>">
|
3
|
+
User must have visited the path:
|
4
|
+
<%= t('landing_page_rule.must_have_visited_path') %>
|
5
|
+
<%= text_field_tag "#{param_prefix}[preferred_path]", promotion_rule.preferred_path, :size => 10 %>
|
6
|
+
</label>
|
7
|
+
</p>
|
8
|
+
|
data/config/locales/en.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
---
|
2
2
|
en:
|
3
|
-
|
3
|
+
activemodel:
|
4
4
|
attributes:
|
5
5
|
promotion:
|
6
6
|
name: "Name"
|
@@ -9,22 +9,34 @@ en:
|
|
9
9
|
usage_limit: "Usage limit"
|
10
10
|
starts_at: "Starts at"
|
11
11
|
expires_at: "Expires at"
|
12
|
+
add_action_of_type: Add action of type
|
12
13
|
add_rule_of_type: Add rule of type
|
14
|
+
advertise: Advertise
|
13
15
|
coupon: Coupon
|
14
16
|
coupon_code: Coupon code
|
15
17
|
editing_promotion: Editing Promotion
|
16
18
|
expiry: Expiry
|
17
19
|
free_shipping: Free Shipping
|
18
|
-
may_be_combined_with_other_promotions: May be combined with other promotions
|
19
20
|
new_promotion: New Promotion
|
20
21
|
no_rules_added: No rules added
|
21
22
|
promotion: Promotion
|
23
|
+
promotion_actions: Actions
|
22
24
|
promotions: Promotions
|
23
25
|
promotion_form:
|
24
26
|
match_policies:
|
25
|
-
all: Match
|
26
|
-
any: Match
|
27
|
+
all: Match all of these rules
|
28
|
+
any: Match any of these rules
|
27
29
|
promotions_description: Manage offers and coupons with promotions
|
30
|
+
promotion_action_types:
|
31
|
+
create_adjustment:
|
32
|
+
name: Create adjustment
|
33
|
+
description: Creates a promotion credit adjustment on the order
|
34
|
+
create_line_items:
|
35
|
+
name: Create line items
|
36
|
+
description: Populates the cart with the specified variants and quantities
|
37
|
+
give_store_credit:
|
38
|
+
name: Give store credit
|
39
|
+
description: Gives the user store credit of the amount specified
|
28
40
|
promotion_rule_types:
|
29
41
|
user:
|
30
42
|
name: User
|
@@ -37,7 +49,13 @@ en:
|
|
37
49
|
description: Order total meets these criteria
|
38
50
|
first_order:
|
39
51
|
name: First order
|
40
|
-
description: Must be the customer's first order
|
52
|
+
description: "Must be the customer's first order"
|
53
|
+
landing_page:
|
54
|
+
name: Landing Page
|
55
|
+
description: Customer must have visited the specified page
|
56
|
+
user_logged_in:
|
57
|
+
name: User Logged In
|
58
|
+
description: Available only to logged in users
|
41
59
|
product_rule:
|
42
60
|
choose_products: Choose products
|
43
61
|
label: "Order must contain %{select} of these products"
|
@@ -53,3 +71,7 @@ en:
|
|
53
71
|
operators:
|
54
72
|
gt: greater than
|
55
73
|
gte: greater than or equal to
|
74
|
+
landing_page_rule:
|
75
|
+
path: Path
|
76
|
+
promotion_action: Promotion Action
|
77
|
+
promotion_rule: Promotion Rule
|
data/config/routes.rb
CHANGED
@@ -0,0 +1,22 @@
|
|
1
|
+
class PromotionChangesToSubclassOfActivator < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
drop_table :promotions
|
4
|
+
rename_column :promotion_rules, :promotion_id, :activator_id
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.down
|
8
|
+
create_table "promotions", :force => true do |t|
|
9
|
+
t.string "name"
|
10
|
+
t.string "code"
|
11
|
+
t.string "description"
|
12
|
+
t.integer "usage_limit"
|
13
|
+
t.boolean "combine"
|
14
|
+
t.datetime "expires_at"
|
15
|
+
t.datetime "created_at"
|
16
|
+
t.datetime "updated_at"
|
17
|
+
t.datetime "starts_at"
|
18
|
+
t.string "match_policy", :default => "all"
|
19
|
+
end
|
20
|
+
rename_column :promotion_rules, :activator_id, :promotion_id
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
class CreatePromotionActionLineItems < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table "promotion_action_line_items" do |t|
|
4
|
+
t.integer :promotion_action_id, :variant_id
|
5
|
+
t.integer :quantity, :default => 1
|
6
|
+
end
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.down
|
10
|
+
drop_table "promotion_action_line_items"
|
11
|
+
end
|
12
|
+
end
|
data/lib/spree_promo.rb
CHANGED
@@ -1,113 +1,36 @@
|
|
1
1
|
require 'spree_core'
|
2
|
-
require '
|
2
|
+
require 'spree_auth'
|
3
3
|
|
4
4
|
module SpreePromo
|
5
5
|
class Engine < Rails::Engine
|
6
|
-
|
7
|
-
# put class_eval and other logic that depends on classes outside of the engine inside this block
|
8
|
-
Product.class_eval do
|
9
|
-
has_and_belongs_to_many :promotion_rules
|
6
|
+
engine_name 'spree_promo'
|
10
7
|
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
promotion_ids = all_rules.map(&:promotion_id).uniq
|
15
|
-
Promotion.automatic.scoped(:conditions => {:id => promotion_ids})
|
16
|
-
end
|
8
|
+
def self.activate
|
9
|
+
Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c|
|
10
|
+
Rails.application.config.cache_classes ? require(c) : load(c)
|
17
11
|
end
|
18
|
-
|
19
|
-
|
20
|
-
has_many :promotion_rules
|
12
|
+
Dir.glob(File.join(File.dirname(__FILE__), "../app/overrides/*.rb")) do |c|
|
13
|
+
Rails.application.config.cache_classes ? require(c) : load(c)
|
21
14
|
end
|
22
15
|
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
attr_accessible :coupon_code
|
28
|
-
attr_accessor :coupon_code
|
29
|
-
before_save :process_coupon_code, :if => "@coupon_code.present?"
|
30
|
-
|
31
|
-
def finalized?
|
32
|
-
self.class.finalized_states.include?(state)
|
33
|
-
end
|
34
|
-
|
35
|
-
def self.finalized_states
|
36
|
-
["complete", "awaiting_return", "returned"]
|
37
|
-
end
|
38
|
-
|
39
|
-
def promotion_credit_exists?(credit)
|
40
|
-
promotion_credits.reload.detect { |c| c.source_id == credit.id }
|
41
|
-
end
|
42
|
-
|
43
|
-
def process_coupon_code
|
44
|
-
coupon = Promotion.find(:first, :conditions => ["UPPER(code) = ?", @coupon_code.upcase])
|
45
|
-
if coupon
|
46
|
-
coupon.create_discount(self)
|
47
|
-
end
|
48
|
-
end
|
49
|
-
|
50
|
-
def products
|
51
|
-
line_items.map {|li| li.variant.product}
|
52
|
-
end
|
53
|
-
|
54
|
-
def update_totals(force_adjustment_recalculation=false)
|
55
|
-
self.payment_total = payments.completed.map(&:amount).sum
|
56
|
-
self.item_total = line_items.map(&:amount).sum
|
57
|
-
|
58
|
-
process_automatic_promotions unless finalized?
|
59
|
-
|
60
|
-
if force_adjustment_recalculation
|
61
|
-
applicable_adjustments, adjustments_to_destroy = adjustments.partition{|a| a.applicable?}
|
62
|
-
self.adjustments = applicable_adjustments
|
63
|
-
adjustments_to_destroy.each(&:destroy)
|
64
|
-
end
|
65
|
-
|
66
|
-
self.adjustment_total = self.adjustments.map(&:amount).sum
|
67
|
-
self.total = self.item_total + self.adjustment_total
|
68
|
-
end
|
69
|
-
|
70
|
-
|
71
|
-
def process_automatic_promotions
|
72
|
-
# recalculate amount
|
73
|
-
self.promotion_credits.each do |credit|
|
74
|
-
if credit.source.eligible?(self)
|
75
|
-
amount = credit.source.compute(self)
|
76
|
-
if credit.amount != amount
|
77
|
-
# avoid infinite callbacks
|
78
|
-
PromotionCredit.update_all("amount = #{amount}", { :id => credit.id })
|
79
|
-
end
|
80
|
-
else
|
81
|
-
credit.destroy
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
current_promotions = self.promotion_credits.map(&:source)
|
86
|
-
# return if current promotions can not be combined
|
87
|
-
return if current_promotions.any? { |promotion| !promotion.combine? }
|
88
|
-
|
89
|
-
new_promotions = eligible_automatic_promotions - current_promotions
|
90
|
-
new_promotions.each do |promotion|
|
91
|
-
next if current_promotions.present? && !promotion.combine?
|
92
|
-
amount = credit.source.compute(self)
|
93
|
-
if amount > 0
|
94
|
-
self.promotion_credits.create(
|
95
|
-
:source => promotion,
|
96
|
-
:amount => amount,
|
97
|
-
:label => promotion.name
|
98
|
-
)
|
99
|
-
end
|
100
|
-
end
|
101
|
-
end
|
102
|
-
|
103
|
-
def eligible_automatic_promotions
|
104
|
-
@eligible_automatic_coupons ||= Promotion.automatic.select{|c| c.eligible?(self)}
|
16
|
+
# Include list of visited paths in notification payload hash
|
17
|
+
SpreeBase::InstanceMethods.class_eval do
|
18
|
+
def default_notification_payload
|
19
|
+
{:user => current_user, :order => current_order, :visited_paths => session[:visited_paths]}
|
105
20
|
end
|
106
21
|
end
|
107
22
|
|
108
|
-
if
|
109
|
-
# register promotion rules
|
110
|
-
[Promotion::Rules::ItemTotal,
|
23
|
+
if Activator.table_exists?
|
24
|
+
# register promotion rules and actions
|
25
|
+
[Promotion::Rules::ItemTotal,
|
26
|
+
Promotion::Rules::Product,
|
27
|
+
Promotion::Rules::User,
|
28
|
+
Promotion::Rules::FirstOrder,
|
29
|
+
Promotion::Rules::LandingPage,
|
30
|
+
Promotion::Rules::UserLoggedIn,
|
31
|
+
Promotion::Actions::CreateAdjustment,
|
32
|
+
Promotion::Actions::CreateLineItems
|
33
|
+
].each &:register
|
111
34
|
|
112
35
|
# register default promotion calculators
|
113
36
|
[
|
@@ -118,12 +41,13 @@ module SpreePromo
|
|
118
41
|
Calculator::FreeShipping
|
119
42
|
].each{|c_model|
|
120
43
|
begin
|
121
|
-
Promotion.register_calculator(c_model) if c_model.table_exists?
|
44
|
+
Promotion::Actions::CreateAdjustment.register_calculator(c_model) if c_model.table_exists?
|
122
45
|
rescue Exception => e
|
123
46
|
$stderr.puts "Error registering promotion calculator #{c_model}"
|
124
47
|
end
|
125
48
|
}
|
126
49
|
end
|
50
|
+
|
127
51
|
end
|
128
52
|
|
129
53
|
config.autoload_paths += %W(#{config.root}/lib)
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_promo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 11094103
|
5
|
+
prerelease: 5
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
-
|
10
|
-
|
8
|
+
- 70
|
9
|
+
- RC
|
10
|
+
- 1
|
11
|
+
version: 0.70.RC1
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- David North
|
@@ -15,25 +16,43 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date:
|
19
|
+
date: 2011-09-09 00:00:00 Z
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
|
-
|
22
|
-
type: :runtime
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
22
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
23
|
none: false
|
25
24
|
requirements:
|
26
25
|
- - "="
|
27
26
|
- !ruby/object:Gem::Version
|
28
|
-
hash:
|
27
|
+
hash: 11094103
|
29
28
|
segments:
|
30
29
|
- 0
|
31
|
-
-
|
32
|
-
-
|
33
|
-
|
34
|
-
|
30
|
+
- 70
|
31
|
+
- RC
|
32
|
+
- 1
|
33
|
+
version: 0.70.RC1
|
35
34
|
name: spree_core
|
36
|
-
|
35
|
+
type: :runtime
|
36
|
+
prerelease: false
|
37
|
+
requirement: *id001
|
38
|
+
- !ruby/object:Gem::Dependency
|
39
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
|
+
none: false
|
41
|
+
requirements:
|
42
|
+
- - "="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 11094103
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
- 70
|
48
|
+
- RC
|
49
|
+
- 1
|
50
|
+
version: 0.70.RC1
|
51
|
+
name: spree_auth
|
52
|
+
type: :runtime
|
53
|
+
prerelease: false
|
54
|
+
requirement: *id002
|
55
|
+
description: Required dependency for Spree
|
37
56
|
email: david@railsdog.com
|
38
57
|
executables: []
|
39
58
|
|
@@ -42,48 +61,78 @@ extensions: []
|
|
42
61
|
extra_rdoc_files: []
|
43
62
|
|
44
63
|
files:
|
64
|
+
- LICENSE
|
65
|
+
- app/assets/javascripts/admin/promotions.js
|
66
|
+
- app/assets/javascripts/admin/spree_promo.js
|
67
|
+
- app/assets/javascripts/store/spree_promo.js
|
68
|
+
- app/assets/stylesheets/admin/promotions.css
|
69
|
+
- app/assets/stylesheets/admin/spree_promo.css
|
70
|
+
- app/assets/stylesheets/store/spree_promo.css
|
71
|
+
- app/controllers/admin/promotion_actions_controller.rb
|
45
72
|
- app/controllers/admin/promotion_rules_controller.rb
|
46
73
|
- app/controllers/admin/promotions_controller.rb
|
74
|
+
- app/controllers/content_controller_decorator.rb
|
47
75
|
- app/controllers/orders_controller_decorator.rb
|
76
|
+
- app/models/adjustment_decorator.rb
|
48
77
|
- app/models/calculator/free_shipping.rb
|
78
|
+
- app/models/order_decorator.rb
|
79
|
+
- app/models/product_decorator.rb
|
80
|
+
- app/models/product_group_decorator.rb
|
81
|
+
- app/models/promotion/actions/create_adjustment.rb
|
82
|
+
- app/models/promotion/actions/create_line_items.rb
|
49
83
|
- app/models/promotion/rules/first_order.rb
|
50
84
|
- app/models/promotion/rules/item_total.rb
|
85
|
+
- app/models/promotion/rules/landing_page.rb
|
51
86
|
- app/models/promotion/rules/product.rb
|
52
87
|
- app/models/promotion/rules/user.rb
|
88
|
+
- app/models/promotion/rules/user_logged_in.rb
|
53
89
|
- app/models/promotion.rb
|
54
|
-
- app/models/
|
90
|
+
- app/models/promotion_action.rb
|
91
|
+
- app/models/promotion_action_line_item.rb
|
55
92
|
- app/models/promotion_rule.rb
|
93
|
+
- app/overrides/promo_admin_tabs.rb
|
94
|
+
- app/overrides/promo_coupon_code_field.rb
|
95
|
+
- app/overrides/promo_product_properties.rb
|
96
|
+
- app/views/admin/promotion_actions/create.js.erb
|
97
|
+
- app/views/admin/promotion_actions/destroy.js.erb
|
56
98
|
- app/views/admin/promotion_rules/create.js.erb
|
57
99
|
- app/views/admin/promotion_rules/destroy.js.erb
|
100
|
+
- app/views/admin/promotions/_actions.html.erb
|
58
101
|
- app/views/admin/promotions/_form.html.erb
|
102
|
+
- app/views/admin/promotions/_promotion_action.html.erb
|
59
103
|
- app/views/admin/promotions/_promotion_rule.html.erb
|
104
|
+
- app/views/admin/promotions/_rules.html.erb
|
60
105
|
- app/views/admin/promotions/_tab.html.erb
|
106
|
+
- app/views/admin/promotions/actions/_create_adjustment.html.erb
|
107
|
+
- app/views/admin/promotions/actions/_create_line_items.html.erb
|
108
|
+
- app/views/admin/promotions/actions/_give_store_credit.html.erb
|
61
109
|
- app/views/admin/promotions/edit.html.erb
|
62
110
|
- app/views/admin/promotions/index.html.erb
|
63
111
|
- app/views/admin/promotions/new.html.erb
|
64
112
|
- app/views/admin/promotions/rules/_first_order.html.erb
|
65
113
|
- app/views/admin/promotions/rules/_item_total.html.erb
|
114
|
+
- app/views/admin/promotions/rules/_landing_page.html.erb
|
66
115
|
- app/views/admin/promotions/rules/_product.html.erb
|
67
116
|
- app/views/admin/promotions/rules/_user.html.erb
|
117
|
+
- app/views/admin/promotions/rules/_user_logged_in.html.erb
|
68
118
|
- app/views/checkout/_coupon_code_field.html.erb
|
69
119
|
- app/views/products/_promotions.html.erb
|
70
120
|
- config/cucumber.yml
|
71
121
|
- config/locales/en.yml
|
72
122
|
- config/routes.rb
|
73
123
|
- lib/spree_promo.rb
|
74
|
-
- lib/spree_promo_hooks.rb
|
75
|
-
- lib/tasks/install.rake
|
76
124
|
- lib/tasks/promotions.rake
|
77
125
|
- lib/tasks/promotions_extension_tasks.rake
|
78
126
|
- db/migrate/20100419190933_rename_coupons_to_promotions.rb
|
79
|
-
- db/migrate/20100419194457_fix_existing_coupon_credits.rb
|
80
127
|
- db/migrate/20100426100726_create_promotion_rules.rb
|
81
128
|
- db/migrate/20100501084722_match_policy_for_promotions.rb
|
82
129
|
- db/migrate/20100501095202_create_promotion_rules_users.rb
|
83
130
|
- db/migrate/20100502163939_name_for_promotions.rb
|
84
131
|
- db/migrate/20100923095305_update_calculable_type_for_promotions.rb
|
85
|
-
-
|
86
|
-
-
|
132
|
+
- db/migrate/20101026184833_migrate_adjustments.rb
|
133
|
+
- db/migrate/20110331094351_promotion_changes_to_subclass_of_activator.rb
|
134
|
+
- db/migrate/20110404123358_create_promotion_actions.rb
|
135
|
+
- db/migrate/20110601202923_create_promotion_action_line_items.rb
|
87
136
|
homepage: http://spreecommerce.com
|
88
137
|
licenses: []
|
89
138
|
|
@@ -106,16 +155,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
106
155
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
107
156
|
none: false
|
108
157
|
requirements:
|
109
|
-
- - "
|
158
|
+
- - ">"
|
110
159
|
- !ruby/object:Gem::Version
|
111
|
-
hash:
|
160
|
+
hash: 25
|
112
161
|
segments:
|
113
|
-
-
|
114
|
-
|
162
|
+
- 1
|
163
|
+
- 3
|
164
|
+
- 1
|
165
|
+
version: 1.3.1
|
115
166
|
requirements:
|
116
167
|
- none
|
117
168
|
rubyforge_project: spree_promo
|
118
|
-
rubygems_version: 1.8.
|
169
|
+
rubygems_version: 1.8.6
|
119
170
|
signing_key:
|
120
171
|
specification_version: 3
|
121
172
|
summary: Promotion functionality for use with Spree.
|