radiant-shop-extension 0.11.5 → 0.11.6
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -1
- data/VERSION +1 -1
- data/app/controllers/admin/shop/discounts/discountables_controller.rb +44 -0
- data/app/controllers/admin/shop/discounts_controller.rb +64 -0
- data/app/controllers/admin/shop/orders_controller.rb +19 -3
- data/app/controllers/admin/shop/packages_controller.rb +1 -3
- data/app/controllers/admin/shop/products_controller.rb +1 -2
- data/app/controllers/admin/shop/variants_controller.rb +3 -4
- data/app/models/form_address.rb +4 -2
- data/app/models/form_discount.rb +39 -0
- data/app/models/form_line_item.rb +1 -11
- data/app/models/shop_category.rb +3 -0
- data/app/models/shop_customer.rb +0 -9
- data/app/models/shop_discount.rb +37 -0
- data/app/models/shop_discountable.rb +64 -0
- data/app/models/shop_line_item.rb +24 -1
- data/app/models/shop_order.rb +41 -28
- data/app/models/shop_product.rb +11 -0
- data/app/models/shop_product_variant.rb +3 -0
- data/app/models/shop_variant.rb +1 -3
- data/app/views/admin/shop/discounts/edit.html.haml +11 -0
- data/app/views/admin/shop/discounts/edit/_foot.html.haml +16 -0
- data/app/views/admin/shop/discounts/edit/_form.html.haml +15 -0
- data/app/views/admin/shop/discounts/edit/_head.html.haml +4 -0
- data/app/views/admin/shop/discounts/edit/_inputs.html.haml +2 -0
- data/app/views/admin/shop/discounts/edit/_meta.html.haml +8 -0
- data/app/views/admin/shop/discounts/edit/_parts.html.haml +9 -0
- data/app/views/admin/shop/discounts/edit/_popups.html.haml +4 -0
- data/app/views/admin/shop/discounts/edit/buttons/_browse_categories.html.haml +1 -0
- data/app/views/admin/shop/discounts/edit/buttons/_browse_products.html.haml +1 -0
- data/app/views/admin/shop/discounts/edit/inputs/_amount.html.haml +3 -0
- data/app/views/admin/shop/discounts/edit/inputs/_code.html.haml +3 -0
- data/app/views/admin/shop/discounts/edit/inputs/_name.html.haml +3 -0
- data/app/views/admin/shop/discounts/edit/meta/_finish.html.haml +5 -0
- data/app/views/admin/shop/discounts/edit/meta/_start.html.haml +5 -0
- data/app/views/admin/shop/discounts/edit/parts/_categories.html.haml +3 -0
- data/app/views/admin/shop/discounts/edit/parts/_products.html.haml +3 -0
- data/app/views/admin/shop/discounts/edit/popups/_browse_categories.html.haml +6 -0
- data/app/views/admin/shop/discounts/edit/popups/_browse_products.html.haml +6 -0
- data/app/views/admin/shop/discounts/edit/shared/_category.html.haml +11 -0
- data/app/views/admin/shop/discounts/edit/shared/_product.html.haml +12 -0
- data/app/views/admin/shop/discounts/index.html.haml +13 -0
- data/app/views/admin/shop/discounts/index/_discount.html.haml +13 -0
- data/app/views/admin/shop/discounts/index/_foot.html.haml +5 -0
- data/app/views/admin/shop/discounts/index/_head.html.haml +2 -0
- data/app/views/admin/shop/discounts/index/buttons/_new_discount.html.haml +1 -0
- data/app/views/admin/shop/discounts/new.html.haml +11 -0
- data/app/views/admin/shop/discounts/remove.html.haml +12 -0
- data/app/views/admin/shop/orders/index.html.haml +1 -1
- data/app/views/admin/shop/orders/index/_foot.html.haml +3 -1
- data/app/views/admin/shop/orders/index/_head.html.haml +1 -3
- data/app/views/admin/shop/packages/index.html.haml +1 -1
- data/app/views/admin/shop/packages/index/_foot.html.haml +3 -2
- data/app/views/admin/shop/packages/index/_head.html.haml +1 -3
- data/app/views/admin/shop/packages/index/buttons/_new_package.html.haml +1 -0
- data/app/views/admin/shop/products/index.html.haml +1 -1
- data/app/views/admin/shop/products/index/_foot.html.haml +3 -2
- data/app/views/admin/shop/products/index/_head.html.haml +1 -3
- data/app/views/admin/shop/products/index/buttons/_add_category.html.haml +1 -0
- data/app/views/admin/shop/products/index/buttons/_variants.html.haml +1 -1
- data/app/views/admin/shop/variants/index.html.haml +1 -1
- data/app/views/admin/shop/variants/index/_foot.html.haml +3 -2
- data/app/views/admin/shop/variants/index/_head.html.haml +1 -3
- data/app/views/admin/shop/variants/index/buttons/_add_variant.html.haml +1 -0
- data/app/views/admin/shop/variants/index/buttons/_categories.html.haml +1 -0
- data/config/routes.rb +11 -5
- data/db/migrate/20101010071143_create_discounts.rb +29 -0
- data/db/migrate/20101010072225_modify_categories_remove_variant.rb +9 -0
- data/db/migrate/20101010130034_change_discountables_add_observer.rb +15 -0
- data/db/migrate/20101011063133_change_orders_set_limits_to_null.rb +11 -0
- data/lib/shop/interface/discounts.rb +34 -0
- data/lib/shop/interface/orders.rb +2 -2
- data/lib/shop/interface/packages.rb +2 -2
- data/lib/shop/interface/products.rb +2 -2
- data/lib/shop/interface/variants.rb +2 -2
- data/lib/shop/models/form_extension.rb +12 -1
- data/lib/shop/models/user.rb +18 -0
- data/lib/shop/tags/cart.rb +24 -0
- data/lib/shop/tags/helpers.rb +1 -1
- data/lib/shop/tags/item.rb +26 -11
- data/lib/shop/tags/tax.rb +73 -0
- data/lib/tasks/shop_extension_tasks.rake +1 -1
- data/mockups/discounts/new-edit.bmml +49 -49
- data/public/javascripts/admin/extensions/shop/discounts/edit.js +76 -0
- data/public/stylesheets/sass/admin/extensions/shop/discounts/edit.sass +125 -0
- data/public/stylesheets/sass/admin/extensions/shop/index.sass +14 -40
- data/radiant-shop-extension.gemspec +70 -7
- data/shop_extension.rb +23 -12
- data/spec/controllers/admin/shop/discounts/discountables_controller_spec.rb +73 -0
- data/spec/controllers/admin/shop/discounts_controller_spec.rb +81 -0
- data/spec/controllers/admin/shop/orders_controller_spec.rb +35 -0
- data/spec/datasets/forms.rb +23 -12
- data/spec/datasets/shop_discountables.rb +22 -0
- data/spec/datasets/shop_discounts.rb +29 -0
- data/spec/lib/shop/tags/cart_spec.rb +75 -1
- data/spec/lib/shop/tags/item_spec.rb +4 -7
- data/spec/lib/shop/tags/tax_spec.rb +201 -0
- data/spec/models/form_discount_spec.rb +63 -0
- data/spec/models/shop_category_spec.rb +8 -0
- data/spec/models/shop_discount_spec.rb +130 -0
- data/spec/models/shop_discountable_spec.rb +114 -0
- data/spec/models/shop_line_item_spec.rb +9 -1
- data/spec/models/shop_order_spec.rb +253 -199
- data/spec/models/shop_product_spec.rb +31 -2
- data/spec/models/shop_variant_spec.rb +0 -15
- metadata +97 -21
- data/app/views/admin/shop/products/index/buttons/_discounts.html.haml +0 -1
- data/app/views/admin/shop/products/index/buttons/_packages.html.haml +0 -1
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'spec/spec_helper'
|
2
2
|
|
3
3
|
describe ShopProduct do
|
4
|
-
dataset :shop_products, :shop_line_items
|
4
|
+
dataset :shop_products, :shop_line_items, :shop_discountables
|
5
5
|
|
6
6
|
describe 'relationships' do
|
7
7
|
before :each do
|
@@ -53,6 +53,15 @@ describe ShopProduct do
|
|
53
53
|
it 'should have many variants' do
|
54
54
|
@product.variants.is_a?(Array).should be_true
|
55
55
|
end
|
56
|
+
|
57
|
+
it 'should have many discountables' do
|
58
|
+
@product.discountables.is_a?(Array).should be_true
|
59
|
+
end
|
60
|
+
|
61
|
+
it 'should have many discounts' do
|
62
|
+
@product.discounts.is_a?(Array).should be_true
|
63
|
+
end
|
64
|
+
|
56
65
|
end
|
57
66
|
|
58
67
|
describe 'validations' do
|
@@ -173,6 +182,7 @@ describe ShopProduct do
|
|
173
182
|
@product.page.slug.should === 'delicious_______________bread'
|
174
183
|
end
|
175
184
|
end
|
185
|
+
|
176
186
|
context 'breadcrumb' do
|
177
187
|
context 'has not been set' do
|
178
188
|
it 'should generate from the slug on validation' do
|
@@ -191,6 +201,25 @@ describe ShopProduct do
|
|
191
201
|
end
|
192
202
|
end
|
193
203
|
end
|
204
|
+
|
205
|
+
context 'discounts' do
|
206
|
+
context 'after_create' do
|
207
|
+
it 'should assign its categories discounts to itself' do
|
208
|
+
@product = ShopProduct.new(
|
209
|
+
:price => 11.11,
|
210
|
+
:page_attributes => {
|
211
|
+
:title => 'New Page With Discounts',
|
212
|
+
:slug => 'new_page_with_discounts',
|
213
|
+
:parent_id => shop_categories(:bread).id
|
214
|
+
}
|
215
|
+
)
|
216
|
+
@product.discounts.empty?.should === true
|
217
|
+
@product.save
|
218
|
+
|
219
|
+
ShopProduct.find(@product).discounts.should === shop_categories(:bread).discounts
|
220
|
+
end
|
221
|
+
end
|
222
|
+
end
|
194
223
|
end
|
195
224
|
|
196
225
|
describe '#attrs' do
|
@@ -211,4 +240,4 @@ describe ShopProduct do
|
|
211
240
|
end
|
212
241
|
end
|
213
242
|
|
214
|
-
end
|
243
|
+
end
|
@@ -3,21 +3,6 @@ require 'spec/spec_helper'
|
|
3
3
|
describe ShopVariant do
|
4
4
|
|
5
5
|
dataset :shop_variants, :shop_categories
|
6
|
-
|
7
|
-
describe 'relationships' do
|
8
|
-
before :each do
|
9
|
-
@variant = shop_variants(:bread_states)
|
10
|
-
end
|
11
|
-
context 'categories' do
|
12
|
-
before :each do
|
13
|
-
@breads = shop_categories(:bread)
|
14
|
-
end
|
15
|
-
it 'should have many' do
|
16
|
-
@variant.categories << @breads
|
17
|
-
@variant.categories.include?(@breads).should === true
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
6
|
|
22
7
|
describe 'validations' do
|
23
8
|
before :each do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-shop-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 63
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 11
|
9
|
-
-
|
10
|
-
version: 0.11.
|
9
|
+
- 6
|
10
|
+
version: 0.11.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dirk Kelly
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-10-
|
19
|
+
date: 2010-10-14 00:00:00 +08:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -52,9 +52,25 @@ dependencies:
|
|
52
52
|
type: :runtime
|
53
53
|
version_requirements: *id002
|
54
54
|
- !ruby/object:Gem::Dependency
|
55
|
-
name:
|
55
|
+
name: fastercsv
|
56
56
|
prerelease: false
|
57
57
|
requirement: &id003 !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
hash: 5
|
63
|
+
segments:
|
64
|
+
- 1
|
65
|
+
- 5
|
66
|
+
- 3
|
67
|
+
version: 1.5.3
|
68
|
+
type: :runtime
|
69
|
+
version_requirements: *id003
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: radiant-layouts-extension
|
72
|
+
prerelease: false
|
73
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
58
74
|
none: false
|
59
75
|
requirements:
|
60
76
|
- - ">="
|
@@ -66,11 +82,11 @@ dependencies:
|
|
66
82
|
- 1
|
67
83
|
version: 0.9.1
|
68
84
|
type: :runtime
|
69
|
-
version_requirements: *
|
85
|
+
version_requirements: *id004
|
70
86
|
- !ruby/object:Gem::Dependency
|
71
87
|
name: radiant-settings-extension
|
72
88
|
prerelease: false
|
73
|
-
requirement: &
|
89
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
74
90
|
none: false
|
75
91
|
requirements:
|
76
92
|
- - ">="
|
@@ -82,11 +98,11 @@ dependencies:
|
|
82
98
|
- 1
|
83
99
|
version: 1.1.1
|
84
100
|
type: :runtime
|
85
|
-
version_requirements: *
|
101
|
+
version_requirements: *id005
|
86
102
|
- !ruby/object:Gem::Dependency
|
87
103
|
name: radiant-images-extension
|
88
104
|
prerelease: false
|
89
|
-
requirement: &
|
105
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
90
106
|
none: false
|
91
107
|
requirements:
|
92
108
|
- - ">="
|
@@ -98,11 +114,11 @@ dependencies:
|
|
98
114
|
- 2
|
99
115
|
version: 0.3.2
|
100
116
|
type: :runtime
|
101
|
-
version_requirements: *
|
117
|
+
version_requirements: *id006
|
102
118
|
- !ruby/object:Gem::Dependency
|
103
119
|
name: radiant-forms-extension
|
104
120
|
prerelease: false
|
105
|
-
requirement: &
|
121
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
106
122
|
none: false
|
107
123
|
requirements:
|
108
124
|
- - ">="
|
@@ -114,27 +130,27 @@ dependencies:
|
|
114
130
|
- 1
|
115
131
|
version: 3.1.1
|
116
132
|
type: :runtime
|
117
|
-
version_requirements: *
|
133
|
+
version_requirements: *id007
|
118
134
|
- !ruby/object:Gem::Dependency
|
119
135
|
name: radiant-scoped-extension
|
120
136
|
prerelease: false
|
121
|
-
requirement: &
|
137
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
122
138
|
none: false
|
123
139
|
requirements:
|
124
140
|
- - ">="
|
125
141
|
- !ruby/object:Gem::Version
|
126
|
-
hash:
|
142
|
+
hash: 19
|
127
143
|
segments:
|
128
144
|
- 0
|
129
145
|
- 2
|
130
|
-
-
|
131
|
-
version: 0.2.
|
146
|
+
- 2
|
147
|
+
version: 0.2.2
|
132
148
|
type: :runtime
|
133
|
-
version_requirements: *
|
149
|
+
version_requirements: *id008
|
134
150
|
- !ruby/object:Gem::Dependency
|
135
151
|
name: radiant-drag-extension
|
136
152
|
prerelease: false
|
137
|
-
requirement: &
|
153
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
138
154
|
none: false
|
139
155
|
requirements:
|
140
156
|
- - ">="
|
@@ -146,7 +162,7 @@ dependencies:
|
|
146
162
|
- 0
|
147
163
|
version: 0.1.0
|
148
164
|
type: :runtime
|
149
|
-
version_requirements: *
|
165
|
+
version_requirements: *id009
|
150
166
|
description: Radiant Shop is an attempt at a simple but complete store. It includes Products, Categories, Orders and Credit Card Payments
|
151
167
|
email: dk@dirkkelly.com
|
152
168
|
executables: []
|
@@ -167,6 +183,8 @@ files:
|
|
167
183
|
- app/.DS_Store
|
168
184
|
- app/controllers/admin/shop/categories_controller.rb
|
169
185
|
- app/controllers/admin/shop/customers_controller.rb
|
186
|
+
- app/controllers/admin/shop/discounts/discountables_controller.rb
|
187
|
+
- app/controllers/admin/shop/discounts_controller.rb
|
170
188
|
- app/controllers/admin/shop/orders_controller.rb
|
171
189
|
- app/controllers/admin/shop/packages/packings_controller.rb
|
172
190
|
- app/controllers/admin/shop/packages_controller.rb
|
@@ -179,11 +197,14 @@ files:
|
|
179
197
|
- app/helpers/shop_helper.rb
|
180
198
|
- app/models/form_address.rb
|
181
199
|
- app/models/form_checkout.rb
|
200
|
+
- app/models/form_discount.rb
|
182
201
|
- app/models/form_line_item.rb
|
183
202
|
- app/models/shop_address.rb
|
184
203
|
- app/models/shop_category.rb
|
185
204
|
- app/models/shop_category_page.rb
|
186
205
|
- app/models/shop_customer.rb
|
206
|
+
- app/models/shop_discount.rb
|
207
|
+
- app/models/shop_discountable.rb
|
187
208
|
- app/models/shop_group.rb
|
188
209
|
- app/models/shop_grouping.rb
|
189
210
|
- app/models/shop_line_item.rb
|
@@ -239,6 +260,34 @@ files:
|
|
239
260
|
- app/views/admin/shop/customers/index/_head.html.haml
|
240
261
|
- app/views/admin/shop/customers/new.html.haml
|
241
262
|
- app/views/admin/shop/customers/remove.html.haml
|
263
|
+
- app/views/admin/shop/discounts/edit.html.haml
|
264
|
+
- app/views/admin/shop/discounts/edit/_foot.html.haml
|
265
|
+
- app/views/admin/shop/discounts/edit/_form.html.haml
|
266
|
+
- app/views/admin/shop/discounts/edit/_head.html.haml
|
267
|
+
- app/views/admin/shop/discounts/edit/_inputs.html.haml
|
268
|
+
- app/views/admin/shop/discounts/edit/_meta.html.haml
|
269
|
+
- app/views/admin/shop/discounts/edit/_parts.html.haml
|
270
|
+
- app/views/admin/shop/discounts/edit/_popups.html.haml
|
271
|
+
- app/views/admin/shop/discounts/edit/buttons/_browse_categories.html.haml
|
272
|
+
- app/views/admin/shop/discounts/edit/buttons/_browse_products.html.haml
|
273
|
+
- app/views/admin/shop/discounts/edit/inputs/_amount.html.haml
|
274
|
+
- app/views/admin/shop/discounts/edit/inputs/_code.html.haml
|
275
|
+
- app/views/admin/shop/discounts/edit/inputs/_name.html.haml
|
276
|
+
- app/views/admin/shop/discounts/edit/meta/_finish.html.haml
|
277
|
+
- app/views/admin/shop/discounts/edit/meta/_start.html.haml
|
278
|
+
- app/views/admin/shop/discounts/edit/parts/_categories.html.haml
|
279
|
+
- app/views/admin/shop/discounts/edit/parts/_products.html.haml
|
280
|
+
- app/views/admin/shop/discounts/edit/popups/_browse_categories.html.haml
|
281
|
+
- app/views/admin/shop/discounts/edit/popups/_browse_products.html.haml
|
282
|
+
- app/views/admin/shop/discounts/edit/shared/_category.html.haml
|
283
|
+
- app/views/admin/shop/discounts/edit/shared/_product.html.haml
|
284
|
+
- app/views/admin/shop/discounts/index.html.haml
|
285
|
+
- app/views/admin/shop/discounts/index/_discount.html.haml
|
286
|
+
- app/views/admin/shop/discounts/index/_foot.html.haml
|
287
|
+
- app/views/admin/shop/discounts/index/_head.html.haml
|
288
|
+
- app/views/admin/shop/discounts/index/buttons/_new_discount.html.haml
|
289
|
+
- app/views/admin/shop/discounts/new.html.haml
|
290
|
+
- app/views/admin/shop/discounts/remove.html.haml
|
242
291
|
- app/views/admin/shop/orders/edit.html.haml
|
243
292
|
- app/views/admin/shop/orders/edit/_foot.html.haml
|
244
293
|
- app/views/admin/shop/orders/edit/_form.html.haml
|
@@ -279,6 +328,7 @@ files:
|
|
279
328
|
- app/views/admin/shop/packages/index/_foot.html.haml
|
280
329
|
- app/views/admin/shop/packages/index/_head.html.haml
|
281
330
|
- app/views/admin/shop/packages/index/_package.html.haml
|
331
|
+
- app/views/admin/shop/packages/index/buttons/_new_package.html.haml
|
282
332
|
- app/views/admin/shop/packages/new.html.haml
|
283
333
|
- app/views/admin/shop/packages/remove.html.haml
|
284
334
|
- app/views/admin/shop/products/edit.html.haml
|
@@ -313,8 +363,7 @@ files:
|
|
313
363
|
- app/views/admin/shop/products/index/_foot.html.haml
|
314
364
|
- app/views/admin/shop/products/index/_head.html.haml
|
315
365
|
- app/views/admin/shop/products/index/_product.html.haml
|
316
|
-
- app/views/admin/shop/products/index/buttons/
|
317
|
-
- app/views/admin/shop/products/index/buttons/_packages.html.haml
|
366
|
+
- app/views/admin/shop/products/index/buttons/_add_category.html.haml
|
318
367
|
- app/views/admin/shop/products/index/buttons/_variants.html.haml
|
319
368
|
- app/views/admin/shop/products/new.html.haml
|
320
369
|
- app/views/admin/shop/products/remove.html.haml
|
@@ -332,6 +381,8 @@ files:
|
|
332
381
|
- app/views/admin/shop/variants/index/_foot.html.haml
|
333
382
|
- app/views/admin/shop/variants/index/_head.html.haml
|
334
383
|
- app/views/admin/shop/variants/index/_variant.html.haml
|
384
|
+
- app/views/admin/shop/variants/index/buttons/_add_variant.html.haml
|
385
|
+
- app/views/admin/shop/variants/index/buttons/_categories.html.haml
|
335
386
|
- app/views/admin/shop/variants/new.html.haml
|
336
387
|
- app/views/admin/shop/variants/remove.html.haml
|
337
388
|
- app/views/shop/categories/show.html.haml
|
@@ -358,6 +409,10 @@ files:
|
|
358
409
|
- db/migrate/20101005231713_create_page_ids.rb
|
359
410
|
- db/migrate/20101006051214_create_pages_for_products_and_categories.rb
|
360
411
|
- db/migrate/20101007111845_add_default_position_to_attachment.rb
|
412
|
+
- db/migrate/20101010071143_create_discounts.rb
|
413
|
+
- db/migrate/20101010072225_modify_categories_remove_variant.rb
|
414
|
+
- db/migrate/20101010130034_change_discountables_add_observer.rb
|
415
|
+
- db/migrate/20101011063133_change_orders_set_limits_to_null.rb
|
361
416
|
- db/seed.rb
|
362
417
|
- db/seeds/forms.rb
|
363
418
|
- db/seeds/layouts.rb
|
@@ -368,6 +423,7 @@ files:
|
|
368
423
|
- lib/shop/controllers/site_controller.rb
|
369
424
|
- lib/shop/interface/categories.rb
|
370
425
|
- lib/shop/interface/customers.rb
|
426
|
+
- lib/shop/interface/discounts.rb
|
371
427
|
- lib/shop/interface/orders.rb
|
372
428
|
- lib/shop/interface/packages.rb
|
373
429
|
- lib/shop/interface/products.rb
|
@@ -375,6 +431,7 @@ files:
|
|
375
431
|
- lib/shop/models/form_extension.rb
|
376
432
|
- lib/shop/models/image.rb
|
377
433
|
- lib/shop/models/page.rb
|
434
|
+
- lib/shop/models/user.rb
|
378
435
|
- lib/shop/tags/address.rb
|
379
436
|
- lib/shop/tags/card.rb
|
380
437
|
- lib/shop/tags/cart.rb
|
@@ -386,15 +443,18 @@ files:
|
|
386
443
|
- lib/shop/tags/product.rb
|
387
444
|
- lib/shop/tags/product_variant.rb
|
388
445
|
- lib/shop/tags/responses.rb
|
446
|
+
- lib/shop/tags/tax.rb
|
389
447
|
- lib/tasks/shop_extension_tasks.rake
|
390
448
|
- mockups/balsamiq/products-retro_fun_tshirt-more.bmml
|
391
449
|
- mockups/balsamiq/products-retro_fun_tshirt.bmml
|
392
450
|
- mockups/discounts/new-edit.bmml
|
393
451
|
- public/images/admin/extensions/shop/products/sort.png
|
452
|
+
- public/javascripts/admin/extensions/shop/discounts/edit.js
|
394
453
|
- public/javascripts/admin/extensions/shop/edit.js
|
395
454
|
- public/javascripts/admin/extensions/shop/packages/edit.js
|
396
455
|
- public/javascripts/admin/extensions/shop/products/edit.js
|
397
456
|
- public/javascripts/admin/extensions/shop/products/index.js
|
457
|
+
- public/stylesheets/sass/admin/extensions/shop/discounts/edit.sass
|
398
458
|
- public/stylesheets/sass/admin/extensions/shop/edit.sass
|
399
459
|
- public/stylesheets/sass/admin/extensions/shop/index.sass
|
400
460
|
- public/stylesheets/sass/admin/extensions/shop/packages/edit.sass
|
@@ -404,6 +464,8 @@ files:
|
|
404
464
|
- shop_extension.rb
|
405
465
|
- spec/controllers/admin/shop/categories_controller_spec.rb
|
406
466
|
- spec/controllers/admin/shop/customers_controller_spec.rb
|
467
|
+
- spec/controllers/admin/shop/discounts/discountables_controller_spec.rb
|
468
|
+
- spec/controllers/admin/shop/discounts_controller_spec.rb
|
407
469
|
- spec/controllers/admin/shop/orders_controller_spec.rb
|
408
470
|
- spec/controllers/admin/shop/packages/packings_controller_spec.rb
|
409
471
|
- spec/controllers/admin/shop/packages_controller_spec.rb
|
@@ -417,6 +479,8 @@ files:
|
|
417
479
|
- spec/datasets/shop_addresses.rb
|
418
480
|
- spec/datasets/shop_categories.rb
|
419
481
|
- spec/datasets/shop_customers.rb
|
482
|
+
- spec/datasets/shop_discountables.rb
|
483
|
+
- spec/datasets/shop_discounts.rb
|
420
484
|
- spec/datasets/shop_groups.rb
|
421
485
|
- spec/datasets/shop_line_items.rb
|
422
486
|
- spec/datasets/shop_orders.rb
|
@@ -440,14 +504,18 @@ files:
|
|
440
504
|
- spec/lib/shop/tags/product_spec.rb
|
441
505
|
- spec/lib/shop/tags/product_variant_spec.rb
|
442
506
|
- spec/lib/shop/tags/responses_spec.rb
|
507
|
+
- spec/lib/shop/tags/tax_spec.rb
|
443
508
|
- spec/matchers/comparison.rb
|
444
509
|
- spec/matchers/render_matcher.rb
|
445
510
|
- spec/models/form_address_spec.rb
|
446
511
|
- spec/models/form_checkout_spec.rb
|
512
|
+
- spec/models/form_discount_spec.rb
|
447
513
|
- spec/models/shop_address_spec.rb
|
448
514
|
- spec/models/shop_category_page_spec.rb
|
449
515
|
- spec/models/shop_category_spec.rb
|
450
516
|
- spec/models/shop_customer_spec.rb
|
517
|
+
- spec/models/shop_discount_spec.rb
|
518
|
+
- spec/models/shop_discountable_spec.rb
|
451
519
|
- spec/models/shop_group_spec.rb
|
452
520
|
- spec/models/shop_line_item_spec.rb
|
453
521
|
- spec/models/shop_order_spec.rb
|
@@ -502,6 +570,8 @@ summary: Shop Extension for Radiant CMS
|
|
502
570
|
test_files:
|
503
571
|
- spec/controllers/admin/shop/categories_controller_spec.rb
|
504
572
|
- spec/controllers/admin/shop/customers_controller_spec.rb
|
573
|
+
- spec/controllers/admin/shop/discounts/discountables_controller_spec.rb
|
574
|
+
- spec/controllers/admin/shop/discounts_controller_spec.rb
|
505
575
|
- spec/controllers/admin/shop/orders_controller_spec.rb
|
506
576
|
- spec/controllers/admin/shop/packages/packings_controller_spec.rb
|
507
577
|
- spec/controllers/admin/shop/packages_controller_spec.rb
|
@@ -515,6 +585,8 @@ test_files:
|
|
515
585
|
- spec/datasets/shop_addresses.rb
|
516
586
|
- spec/datasets/shop_categories.rb
|
517
587
|
- spec/datasets/shop_customers.rb
|
588
|
+
- spec/datasets/shop_discountables.rb
|
589
|
+
- spec/datasets/shop_discounts.rb
|
518
590
|
- spec/datasets/shop_groups.rb
|
519
591
|
- spec/datasets/shop_line_items.rb
|
520
592
|
- spec/datasets/shop_orders.rb
|
@@ -538,14 +610,18 @@ test_files:
|
|
538
610
|
- spec/lib/shop/tags/product_spec.rb
|
539
611
|
- spec/lib/shop/tags/product_variant_spec.rb
|
540
612
|
- spec/lib/shop/tags/responses_spec.rb
|
613
|
+
- spec/lib/shop/tags/tax_spec.rb
|
541
614
|
- spec/matchers/comparison.rb
|
542
615
|
- spec/matchers/render_matcher.rb
|
543
616
|
- spec/models/form_address_spec.rb
|
544
617
|
- spec/models/form_checkout_spec.rb
|
618
|
+
- spec/models/form_discount_spec.rb
|
545
619
|
- spec/models/shop_address_spec.rb
|
546
620
|
- spec/models/shop_category_page_spec.rb
|
547
621
|
- spec/models/shop_category_spec.rb
|
548
622
|
- spec/models/shop_customer_spec.rb
|
623
|
+
- spec/models/shop_discount_spec.rb
|
624
|
+
- spec/models/shop_discountable_spec.rb
|
549
625
|
- spec/models/shop_group_spec.rb
|
550
626
|
- spec/models/shop_line_item_spec.rb
|
551
627
|
- spec/models/shop_order_spec.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
=# link_to t("discounts"), admin_shop_packages_path, :class => 'button'
|
@@ -1 +0,0 @@
|
|
1
|
-
= link_to t("packages"), admin_shop_packages_path, :class => "button #{controller.controller_name == 'packages' ? 'active' : ''}"
|