spree_store_credits 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +22 -5
- data/app/views/users/_store_credits.html.erb +3 -1
- data/config/locales/ru.yml +21 -0
- data/spree_store_credits.gemspec +1 -1
- metadata +7 -15
data/README.md
CHANGED
@@ -1,13 +1,30 @@
|
|
1
|
-
|
1
|
+
Store Credits
|
2
|
+
=============
|
3
|
+
|
4
|
+
This Spree extension allows admins to issue arbitrary amounts of store credit to users.
|
5
|
+
|
6
|
+
Users can redeem store credit during checkout, as part or full payment for an order.
|
7
|
+
|
8
|
+
Also extends My Account page to display outstanding credit balance, and orders that used store credit.
|
9
|
+
|
10
|
+
Installation
|
2
11
|
============
|
3
12
|
|
4
|
-
|
13
|
+
1. Add the following to your applications Gemfile
|
14
|
+
|
15
|
+
gem 'spree_store_credits'
|
16
|
+
|
17
|
+
2. Run bundler
|
18
|
+
|
19
|
+
bundle install
|
20
|
+
|
21
|
+
3. Copy assests / migrations (note: this will change after Rails 3.1).
|
5
22
|
|
23
|
+
rails g spree_store_credits:install -f
|
6
24
|
|
7
|
-
|
8
|
-
=======
|
25
|
+
4. Run migrations
|
9
26
|
|
10
|
-
|
27
|
+
rake db:migrate
|
11
28
|
|
12
29
|
|
13
30
|
Copyright (c) 2010 Roman Smirnov, released under the New BSD License
|
@@ -2,6 +2,7 @@
|
|
2
2
|
<p>
|
3
3
|
<%= t('current_store_credit') %>: <strong><%= number_to_currency @user.store_credits_total %></strong>
|
4
4
|
</p>
|
5
|
+
<% if @orders_with_store_credit.present? %>
|
5
6
|
<h3><%= t('orders_with_store_credit') %></h3>
|
6
7
|
<table class="order-summary" width="545">
|
7
8
|
<thead>
|
@@ -22,8 +23,9 @@
|
|
22
23
|
<td><%= t(order.state).titleize %></td>
|
23
24
|
<td><%= order.user.email if order.user %></td>
|
24
25
|
<td><%= number_to_currency order.total %></td>
|
25
|
-
<td><%= number_to_currency order.
|
26
|
+
<td><%= number_to_currency order.store_credit_amount %></td>
|
26
27
|
</tr>
|
27
28
|
<% end %>
|
28
29
|
</tbody>
|
29
30
|
</table>
|
31
|
+
<% end %>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
---
|
2
|
+
ru:
|
3
|
+
add_store_credit: "Дать бонус"
|
4
|
+
current_store_credit: "Текущий бонус"
|
5
|
+
editing_store_credit: "Редактирование бонуса"
|
6
|
+
enter_desired_amount_of_store_credit: "Введите сумму, которую Вы хотите использовать"
|
7
|
+
listing_store_credits: "Бонусы"
|
8
|
+
new_store_credit: "Новый бонус"
|
9
|
+
manage_store_credits: "Управление кредитами магазина (бонусами)"
|
10
|
+
orders_with_store_credit: "Заказы, частично или полностью оплаченные бонусами"
|
11
|
+
remaining_amount: "Remaining amount"
|
12
|
+
store_credit: "Бонус"
|
13
|
+
store_credits: "Бонусы"
|
14
|
+
you_have_store_credit: "Ваш суммарный бонус составляет %{amount}"
|
15
|
+
was_fully_used: "был полностью использован"
|
16
|
+
was_partially_used: "был частично использован"
|
17
|
+
|
18
|
+
activerecord:
|
19
|
+
attributes:
|
20
|
+
order:
|
21
|
+
remove_store_credits: "Отменить использование бонуса"
|
data/spree_store_credits.gemspec
CHANGED
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
|
|
4
4
|
s.platform = Gem::Platform::RUBY
|
5
5
|
|
6
6
|
s.name = 'spree_store_credits'
|
7
|
-
s.version = '1.0.
|
7
|
+
s.version = '1.0.1'
|
8
8
|
s.authors = ["Roman Smirnov", "Brian Quinn"]
|
9
9
|
s.email = 'roman@railsdog.com'
|
10
10
|
s.homepage = 'http://github.com/spree/spree-store-credits'
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_store_credits
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 23
|
5
4
|
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 1
|
8
7
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
8
|
+
- 1
|
9
|
+
version: 1.0.1
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Roman Smirnov
|
@@ -16,18 +15,16 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date:
|
18
|
+
date: 2011-01-26 00:00:00 +03:00
|
20
19
|
default_executable:
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
23
22
|
name: spree_core
|
24
23
|
prerelease: false
|
25
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
26
|
-
none: false
|
27
25
|
requirements:
|
28
26
|
- - ">="
|
29
27
|
- !ruby/object:Gem::Version
|
30
|
-
hash: 101
|
31
28
|
segments:
|
32
29
|
- 0
|
33
30
|
- 30
|
@@ -64,6 +61,7 @@ files:
|
|
64
61
|
- app/views/checkout/_store_credits.html.erb
|
65
62
|
- app/views/users/_store_credits.html.erb
|
66
63
|
- config/locales/en.yml
|
64
|
+
- config/locales/ru.yml
|
67
65
|
- config/routes.rb
|
68
66
|
- lib/generators/spree_store_credits/install_generator.rb
|
69
67
|
- lib/generators/templates/db/migrate/20100928140217_create_store_credits.rb
|
@@ -83,33 +81,27 @@ rdoc_options: []
|
|
83
81
|
require_paths:
|
84
82
|
- lib
|
85
83
|
required_ruby_version: !ruby/object:Gem::Requirement
|
86
|
-
none: false
|
87
84
|
requirements:
|
88
85
|
- - ">="
|
89
86
|
- !ruby/object:Gem::Version
|
90
|
-
hash: 57
|
91
87
|
segments:
|
92
88
|
- 1
|
93
89
|
- 8
|
94
90
|
- 7
|
95
91
|
version: 1.8.7
|
96
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
93
|
requirements:
|
99
94
|
- - ">="
|
100
95
|
- !ruby/object:Gem::Version
|
101
|
-
hash: 3
|
102
96
|
segments:
|
103
97
|
- 0
|
104
98
|
version: "0"
|
105
99
|
requirements: []
|
106
100
|
|
107
101
|
rubyforge_project:
|
108
|
-
rubygems_version: 1.3.
|
102
|
+
rubygems_version: 1.3.6
|
109
103
|
signing_key:
|
110
104
|
specification_version: 3
|
111
105
|
summary: Provides store credits for a Spree store.
|
112
|
-
test_files:
|
113
|
-
|
114
|
-
- spec/models/user_spec.rb
|
115
|
-
- spec/spec_helper.rb
|
106
|
+
test_files: []
|
107
|
+
|