spree_frontend 2.1.4 → 2.1.5

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: 76ad79bf5596bc669d0bfcb35c08f53f6495c697
4
- data.tar.gz: 3edd749c386d6b285cb46ce55f89ff2a4b7164fe
3
+ metadata.gz: e0bc22f90799e08f94cb4816bcc1de8f5b1b3dbd
4
+ data.tar.gz: 94170a3fd43414658ced9faa88910aff9bc49c6f
5
5
  SHA512:
6
- metadata.gz: 631a9178b740d3685ef96490f71442af33c423e0e744a1bffb1e5144b79170e8357731ed791e8b9f9c367b91c6c9c8b5438013bb08c421e8e1fa612899271f68
7
- data.tar.gz: e7c5f2f4fe847578c616662531e2b3b3346061aa65a7d8062c27598fa69a9ec529feff2dcaf3e5bf891e49cd001d9f41b58b420efbbc25d250828baf2f057564
6
+ metadata.gz: 0793edaa0b7c7d07e13b07159cb156ae255a7924e3affb305677066cdde6cd182088847fa12231b3a2eb6eecd69e5b161fbfff555ebbdba99e5257e8b0386cb3
7
+ data.tar.gz: 3cc57d16da77b25604db80777a29202c98b6dd229375e923ec46b66dc2ac258387d1ee8eb271d707e3cfd6858ee73f09698712ef6890376bacb9611338746ce7
@@ -6,7 +6,7 @@ module Spree
6
6
  class CheckoutController < Spree::StoreController
7
7
  ssl_required
8
8
 
9
- before_filter :load_order
9
+ before_filter :load_order_with_lock
10
10
 
11
11
  before_filter :ensure_order_not_completed
12
12
  before_filter :ensure_checkout_allowed
@@ -70,8 +70,8 @@ module Spree
70
70
  false
71
71
  end
72
72
 
73
- def load_order
74
- @order = current_order
73
+ def load_order_with_lock
74
+ @order = current_order(lock: true)
75
75
  redirect_to spree.cart_path and return unless @order
76
76
 
77
77
  if params[:state]
@@ -13,7 +13,7 @@ module Spree
13
13
  end
14
14
 
15
15
  def update
16
- @order = current_order
16
+ @order = current_order(lock: true)
17
17
  unless @order
18
18
  flash[:error] = Spree.t(:order_not_found)
19
19
  redirect_to root_path and return
@@ -49,7 +49,7 @@ module Spree
49
49
 
50
50
  # Adds a new item to the order (creating a new order if none already exists)
51
51
  def populate
52
- populator = Spree::OrderPopulator.new(current_order(true), current_currency)
52
+ populator = Spree::OrderPopulator.new(current_order(create_order_if_necessary: true), current_currency)
53
53
  if populator.populate(params.slice(:products, :variants, :quantity))
54
54
  current_order.ensure_updated_shipments
55
55
 
@@ -39,7 +39,7 @@ module Spree
39
39
 
40
40
  def load_product
41
41
  if try_spree_current_user.try(:has_spree_role?, "admin")
42
- @product = Product.find_by_permalink!(params[:id])
42
+ @product = Product.with_deleted.find_by_permalink!(params[:id])
43
43
  else
44
44
  @product = Product.active(current_currency).find_by_permalink!(params[:id])
45
45
  end
@@ -7,7 +7,7 @@
7
7
  <ul>
8
8
  <% @product.variants_and_option_values(current_currency).each_with_index do |variant, index| %>
9
9
  <li>
10
- <%= radio_button_tag "products[#{@product.id}]", variant.id, index == 0, 'data-price' => display_price(variant) %>
10
+ <%= radio_button_tag "products[#{@product.id}]", variant.id, index == 0, 'data-price' => Spree::Money.new(variant.price, with_currency: true).to_s %>
11
11
  <label for="<%= ['products', @product.id, variant.id].join('_') %>">
12
12
  <span class="variant-description">
13
13
  <%= variant_options variant %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.4
4
+ version: 2.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Schofield
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-23 00:00:00.000000000 Z
11
+ date: 2014-02-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 2.1.4
19
+ version: 2.1.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 2.1.4
26
+ version: 2.1.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: spree_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 2.1.4
33
+ version: 2.1.5
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 2.1.4
40
+ version: 2.1.5
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: canonical-rails
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 3.0.0
61
+ version: 3.1.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 3.0.0
68
+ version: 3.1.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: stringex
71
71
  requirement: !ruby/object:Gem::Requirement