solidus_frontend 1.0.0.pre2 → 1.0.0.pre3

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of solidus_frontend might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6a6e06ed9140c22fcf312ab7d73c11184bc32f28
4
- data.tar.gz: c992f73902237da237019aa3dc1baaf21a038a8d
3
+ metadata.gz: 085baf546e7975f13d9ff5235b9f3a6056bcb838
4
+ data.tar.gz: 79bcb30a3cb8f77e660fdbc905faa2ea74c18664
5
5
  SHA512:
6
- metadata.gz: 40b42af6e6cbe5c83ec01353341f9814bc0702b97c918127db13b760e05f02b64c590ae26af8e1e86b7ff3350f4e6d59b6d50b041e063b15956734580ec05767
7
- data.tar.gz: 5cdf9492be39d71824fe7ab45dd064eee5568731bd3489343673be9698ac25f3280b6b9792cfce5d6b0d989f9bc7526a4269efb816b9f2eb95818c85d9482fce
6
+ metadata.gz: 4a127ff5986ea7ea33f77094999fc0796e0bb14c54006cce4be4cbb9875b38a6e24aff1f75959c6eec34b9b9fd03e4bd4fbbcf745a1fd73eaa58bfac5d3aced5
7
+ data.tar.gz: 93f19710482d788ab6e29fffa3f90daae9999eaf4623b37bf0dd990429c166a02779d2dda59e5580989a506167f559d49ea666a80dd41f9d22c3dce6c6b5b1fa
@@ -6,7 +6,6 @@ module Spree
6
6
  class CheckoutController < Spree::StoreController
7
7
  before_filter :load_order
8
8
  around_filter :lock_order
9
- before_filter :ensure_valid_state_lock_version, only: [:update]
10
9
  before_filter :set_state_if_present
11
10
 
12
11
  before_action :ensure_order_not_completed
@@ -80,18 +79,6 @@ module Spree
80
79
  redirect_to spree.cart_path and return unless @order
81
80
  end
82
81
 
83
- def ensure_valid_state_lock_version
84
- if params[:order] && params[:order][:state_lock_version]
85
- @order.with_lock do
86
- unless @order.state_lock_version == params[:order].delete(:state_lock_version).to_i
87
- flash[:error] = Spree.t(:order_already_updated)
88
- redirect_to checkout_state_path(@order.state) and return
89
- end
90
- @order.increment!(:state_lock_version)
91
- end
92
- end
93
- end
94
-
95
82
  def set_state_if_present
96
83
  if params[:state]
97
84
  redirect_to checkout_state_path(@order.state) if @order.can_go_to_state?(params[:state]) && !skip_state_validation?
@@ -0,0 +1,12 @@
1
+ <%= form.hidden_field :firstname %>
2
+ <%= form.hidden_field :lastname %>
3
+ <%= form.hidden_field :company %>
4
+ <%= form.hidden_field :address1 %>
5
+ <%= form.hidden_field :address2 %>
6
+ <%= form.hidden_field :city %>
7
+ <%= form.hidden_field :country_id %>
8
+ <%= form.hidden_field :state_id %>
9
+ <%= form.hidden_field :state_name %>
10
+ <%= form.hidden_field :zipcode %>
11
+ <%= form.hidden_field :phone %>
12
+ <%= form.hidden_field :alternative_phone %>
@@ -26,7 +26,7 @@
26
26
  <tbody>
27
27
  <% ship_form.object.manifest.each do |item| %>
28
28
  <tr class="stock-item">
29
- <td class="item-image"><%= mini_image(item.variant) %></td>
29
+ <td class="item-image"><%= image_tag item.variant.display_image.attachment(:mini) %></td>
30
30
  <td class="item-name"><%= item.variant.name %></td>
31
31
  <td class="item-qty"><%= item.quantity %></td>
32
32
  <td class="item-price"><%= display_price(item.variant) %></td>
@@ -72,7 +72,7 @@
72
72
  <tbody>
73
73
  <% @differentiator.missing.each do |variant, quantity| %>
74
74
  <tr class="stock-item">
75
- <td class="item-image"><%= mini_image(variant) %></td>
75
+ <td class="item-image"><%= image_tag variant.display_image.attachment(:mini) %></td>
76
76
  <td class="item-name"><%= variant.name %></td>
77
77
  <td class="item-qty"><%= quantity %></td>
78
78
  <td class="item-price"><%= display_price(variant) %></td>
@@ -15,7 +15,6 @@
15
15
  <%= form.text_field :email %>
16
16
  </p>
17
17
  <% end %>
18
- <%= form.hidden_field :state_lock_version %>
19
18
  <%= render @order.state, :form => form %>
20
19
  <% end %>
21
20
  </div>
@@ -29,4 +29,10 @@
29
29
  <%= link_to "(#{Spree.t(:what_is_this)})", spree.content_path('cvv'), :target => '_blank', "data-hook" => "cvv_link", :id => "cvv_link" %>
30
30
  </p>
31
31
 
32
+ <% if @order.bill_address %>
33
+ <%= fields_for "#{param_prefix}[address_attributes]", @order.bill_address do |f| %>
34
+ <%= render :partial => 'spree/address/form_hidden', :locals => { :form => f } %>
35
+ <% end %>
36
+ <% end %>
37
+
32
38
  <%= hidden_field_tag "#{param_prefix}[cc_type]", '', :id => "cc_type", :class => 'ccType' %>
@@ -3,7 +3,7 @@
3
3
  <tr class="<%= cycle('', 'alt') %> line-item">
4
4
  <td class="cart-item-image" data-hook="cart_item_image">
5
5
  <% if variant.images.length == 0 %>
6
- <%= link_to small_image(variant.product), variant.product %>
6
+ <%= link_to image_tag(variant.product.display_image.attachment(:small)), variant.product %>
7
7
  <% else %>
8
8
  <%= link_to image_tag(variant.images.first.attachment.url(:small)), variant.product %>
9
9
  <% end %>
@@ -1,5 +1,5 @@
1
1
  <% if defined?(image) && image %>
2
- <%= image_tag image.attachment.url(:product), :itemprop => "image" %>
2
+ <%= image_tag image.attachment.url(:product), itemprop: "image" %>
3
3
  <% else %>
4
- <%= product_image(@product, :itemprop => "image") %>
4
+ <%= image_tag @product.display_image.attachment(:product), itemprop: "image" %>
5
5
  <% end %>
@@ -62,7 +62,7 @@
62
62
  <tr data-hook="order_details_line_item_row">
63
63
  <td data-hook="order_item_image">
64
64
  <% if item.variant.images.length == 0 %>
65
- <%= link_to small_image(item.variant.product), item.variant.product %>
65
+ <%= link_to image_tag(item.variant.product.display_image.attachment(:small)), item.variant.product %>
66
66
  <% else %>
67
67
  <%= link_to image_tag(item.variant.images.first.attachment.url(:small)), item.variant.product %>
68
68
  <% end %>
@@ -16,29 +16,29 @@
16
16
  </div>
17
17
  <% elsif params.key?(:keywords) %>
18
18
  <div data-hook="products_search_results_heading_results_found">
19
- <h6 class="search-results-title"><%= Spree.t(:search_results, :keywords => h(params[:keywords])) %></h6>
19
+ <h6 class="search-results-title"><%= Spree.t(:search_results, keywords: h(params[:keywords])) %></h6>
20
20
  </div>
21
21
  <% end %>
22
22
  </div>
23
23
 
24
24
  <% if products.any? %>
25
- <ul id="products" class="inline product-listing" data-hook>
26
- <% products.each do |product| %>
27
- <% url = spree.product_path(product, :taxon_id => @taxon.try(:id)) %>
28
- <li id="product_<%= product.id %>" class="columns three <%= cycle("alpha", "secondary", "", "omega secondary", :name => "classes") %>" data-hook="products_list_item" itemscope itemtype="http://schema.org/Product">
29
- <% cache(@taxon.present? ? [I18n.locale, current_currency, @taxon, product] : [I18n.locale, current_currency, product]) do %>
30
- <div class="product-image">
31
- <%= link_to small_image(product, :itemprop => "image"), url, :itemprop => 'url' %>
32
- </div>
33
- <%= link_to truncate(product.name, :length => 50), url, :class => 'info', :itemprop => "name", :title => product.name %>
34
- <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
35
- <span class="price selling" itemprop="price"><%= display_price(product) %>
36
- </span>
37
- <% end %>
38
- </li>
39
- <% end %>
40
- <% reset_cycle("classes") %>
41
- </ul>
25
+ <ul id="products" class="inline product-listing" data-hook>
26
+ <% products.each do |product| %>
27
+ <% url = spree.product_path(product, taxon_id: @taxon.try(:id)) %>
28
+ <li id="product_<%= product.id %>" class="columns three <%= cycle("alpha", "secondary", "", "omega secondary", name: "classes") %>" data-hook="products_list_item" itemscope itemtype="http://schema.org/Product">
29
+ <% cache(@taxon.present? ? [I18n.locale, current_currency, @taxon, product] : [I18n.locale, current_currency, product]) do %>
30
+ <div class="product-image">
31
+ <%= link_to image_tag(product.display_image.attachment(:small), itemprop: "image"), url, itemprop: 'url' %>
32
+ </div>
33
+ <%= link_to truncate(product.name, length: 50), url, class: 'info', itemprop: "name", title: product.name %>
34
+ <span itemprop="offers" itemscope itemtype="http://schema.org/Offer">
35
+ <span class="price selling" itemprop="price"><%= display_price(product) %>
36
+ </span>
37
+ <% end %>
38
+ </li>
39
+ <% end %>
40
+ <% reset_cycle("classes") %>
41
+ </ul>
42
42
  <% end %>
43
43
 
44
44
  <% if paginated_products.respond_to?(:num_pages) %>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_frontend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre2
4
+ version: 1.0.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-20 00:00:00.000000000 Z
11
+ date: 2015-07-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_api
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0.pre2
19
+ version: 1.0.0.pre3
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: 1.0.0.pre2
26
+ version: 1.0.0.pre3
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: solidus_core
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.0.0.pre2
33
+ version: 1.0.0.pre3
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: 1.0.0.pre2
40
+ version: 1.0.0.pre3
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: canonical-rails
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -137,6 +137,7 @@ files:
137
137
  - app/controllers/spree/taxons_controller.rb
138
138
  - app/models/spree/frontend_configuration.rb
139
139
  - app/views/spree/address/_form.html.erb
140
+ - app/views/spree/address/_form_hidden.html.erb
140
141
  - app/views/spree/checkout/_address.html.erb
141
142
  - app/views/spree/checkout/_confirm.html.erb
142
143
  - app/views/spree/checkout/_delivery.html.erb