spree_repeat_order 2.1.8 → 2.1.9
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04436e609fc6f705279b8e3b507e5fd48bffbe4b
|
4
|
+
data.tar.gz: d103b903923a36eb621f78a02ea4f3a202577642
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 605549dd0a3fabc6fc0bb1d6c5e7d31bcebcc6e454b367d1b3a6a4f3ca9c6934b5147189b43407be69e261877389c5eaea23f23ca9bad0108a175326606ef847
|
7
|
+
data.tar.gz: 0dfa769e43efcb4354b86f710c482198cd77e48cf14509a5d73b365c73d259da729868101f252bebb2bd5e4054a1724502fb04a38b8fe3e93ac59a53e5ba6fca
|
@@ -6,7 +6,11 @@ module Spree
|
|
6
6
|
def duplicate_order(past_order, new_order)
|
7
7
|
new_line_items = []
|
8
8
|
past_order.line_items.each do |line_item|
|
9
|
-
|
9
|
+
if (line_item.product && line_item.product.available? && !line_item.product.deleted?)
|
10
|
+
new_line_item = line_item.dup
|
11
|
+
new_line_item.reload_price
|
12
|
+
new_line_items << new_line_item
|
13
|
+
end
|
10
14
|
end
|
11
15
|
|
12
16
|
new_order.line_items = new_line_items
|
@@ -35,6 +35,8 @@ describe Spree::Admin::RepeatedOrdersController do
|
|
35
35
|
|
36
36
|
before :each do
|
37
37
|
Spree::Order.stub(:find_by).and_return(past_order)
|
38
|
+
line_item_clone_1.stub(:reload_price)
|
39
|
+
line_item_clone_2.stub(:reload_price)
|
38
40
|
end
|
39
41
|
|
40
42
|
it 'should create new order with old order items' do
|
data/spree_repeat_order.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.platform = Gem::Platform::RUBY
|
4
4
|
s.name = 'spree_repeat_order'
|
5
|
-
s.version = '2.1.
|
5
|
+
s.version = '2.1.9'
|
6
6
|
s.summary = 'Makes it possible to repeat an existing order with one click'
|
7
7
|
s.description = ''
|
8
8
|
s.required_ruby_version = '>= 2.0.0'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_repeat_order
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Francisco Trindade
|
@@ -210,6 +210,7 @@ files:
|
|
210
210
|
- app/assets/stylesheets/store/spree_repeat_order.css
|
211
211
|
- app/controllers/spree/admin/repeated_orders_controller.rb
|
212
212
|
- app/controllers/spree/repeated_orders_controller.rb
|
213
|
+
- app/models/spree/line_item_decorator.rb
|
213
214
|
- app/overrides/my_account_table.rb
|
214
215
|
- app/overrides/repeat_order_button.rb
|
215
216
|
- app/views/spree/admin/orders/_repeat_button.haml
|