spree_frontend 2.2.1 → 2.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/spree/products_controller.rb +6 -0
- data/app/views/spree/address/_form.html.erb +4 -4
- data/app/views/spree/orders/_line_item.html.erb +1 -1
- data/app/views/spree/orders/edit.html.erb +26 -24
- data/app/views/spree/products/_cart_form.html.erb +2 -2
- data/app/views/spree/shared/_order_details.html.erb +11 -10
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 895597d448eeccc9c9933889d9a6f4beaae9ff44
|
4
|
+
data.tar.gz: 4a898e6a87968ed4cdf3a0cbcd323c08c7cabbcf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 348f93aa386b4135d33bcd530578d587e97d4617d7afc21a4c75eecffa2ea5a011648ca4ec43819165b2c29b7732747e87ee878273654c81297a0aab49af949c
|
7
|
+
data.tar.gz: 15f9c9b63e059e88ea43ef5b4e7cdd459be53a7b6cc4d7d97229ddd3bdcb0e56c09e0f87d475365fb11a42710e5c37b0e23f3948b2d0aa91fda9ec547b12041a
|
@@ -1,6 +1,8 @@
|
|
1
1
|
module Spree
|
2
2
|
class ProductsController < Spree::StoreController
|
3
3
|
before_filter :load_product, :only => :show
|
4
|
+
before_filter :load_taxon, :only => :index
|
5
|
+
|
4
6
|
rescue_from ActiveRecord::RecordNotFound, :with => :render_404
|
5
7
|
helper 'spree/taxons'
|
6
8
|
|
@@ -33,5 +35,9 @@ module Spree
|
|
33
35
|
end
|
34
36
|
@product = @products.friendly.find(params[:id])
|
35
37
|
end
|
38
|
+
|
39
|
+
def load_taxon
|
40
|
+
@taxon = Spree::Taxon.find(params[:taxon]) if params[:taxon].present?
|
41
|
+
end
|
36
42
|
end
|
37
43
|
end
|
@@ -59,12 +59,12 @@
|
|
59
59
|
<% end %>
|
60
60
|
|
61
61
|
<p class="field" id=<%="#{address_id}zipcode" %>>
|
62
|
-
<%= form.label :zipcode, Spree.t(:zip) %><span class="required">*</span><br
|
63
|
-
<%= form.text_field :zipcode, :class => 'required' %>
|
62
|
+
<%= form.label :zipcode, Spree.t(:zip) %><% if address.require_zipcode? %><span class="required">*</span><br /><% end %>
|
63
|
+
<%= form.text_field :zipcode, :class => "#{'required' if address.require_zipcode?}" %>
|
64
64
|
</p>
|
65
65
|
<p class="field" id=<%="#{address_id}phone" %>>
|
66
|
-
<%= form.label :phone, Spree.t(:phone) %><span class="required">*</span><br
|
67
|
-
<%= form.phone_field :phone, :class => 'required' %>
|
66
|
+
<%= form.label :phone, Spree.t(:phone) %><% if address.require_phone? %><span class="required">*</span><br /><% end %>
|
67
|
+
<%= form.phone_field :phone, :class => "#{'required' if address.require_phone?}" %>
|
68
68
|
</p>
|
69
69
|
<% if Spree::Config[:alternative_shipping_phone] %>
|
70
70
|
<p class="field" id=<%="#{address_id}altphone" %>>
|
@@ -11,7 +11,7 @@
|
|
11
11
|
<td class="cart-item-description" data-hook="cart_item_description">
|
12
12
|
<h4><%= link_to line_item.name, product_path(variant.product) %></h4>
|
13
13
|
<%= variant.options_text %>
|
14
|
-
<% if
|
14
|
+
<% if line_item.insufficient_stock? %>
|
15
15
|
<span class="out-of-stock">
|
16
16
|
<%= Spree.t(:out_of_stock) %> <br />
|
17
17
|
</span>
|
@@ -10,36 +10,38 @@
|
|
10
10
|
</div>
|
11
11
|
|
12
12
|
<% else %>
|
13
|
+
|
13
14
|
<div data-hook="outside_cart_form">
|
14
|
-
|
15
|
-
|
15
|
+
<%= form_for @order, :url => update_cart_path, :html => {:id => 'update-cart'} do |order_form| %>
|
16
|
+
<div data-hook="inside_cart_form">
|
17
|
+
|
18
|
+
<div data-hook="cart_items">
|
19
|
+
<%= render :partial => 'form', :locals => { :order_form => order_form } %>
|
20
|
+
</div>
|
16
21
|
|
17
|
-
|
18
|
-
|
19
|
-
|
22
|
+
<div class="links columns sixteen alpha omega" data-hook="cart_buttons">
|
23
|
+
<%= order_form.text_field :coupon_code, :size => 10, :placeholder => Spree.t(:coupon_code) %>
|
24
|
+
<%= button_tag :class => 'primary', :id => 'update-button' do %>
|
25
|
+
<%= Spree.t(:update) %>
|
26
|
+
<% end %>
|
27
|
+
<%= button_tag :class => 'button checkout primary', :id => 'checkout-link', :name => 'checkout' do %>
|
28
|
+
<%= Spree.t(:checkout) %>
|
29
|
+
<% end %>
|
30
|
+
</div>
|
20
31
|
|
21
|
-
|
22
|
-
<%= order_form.text_field :coupon_code, :size => 10, :placeholder => Spree.t(:coupon_code) %>
|
23
|
-
<%= button_tag :class => 'primary', :id => 'update-button' do %>
|
24
|
-
<%= Spree.t(:update) %>
|
32
|
+
</div>
|
25
33
|
<% end %>
|
26
|
-
|
27
|
-
|
34
|
+
</div>
|
35
|
+
|
36
|
+
<div id="empty-cart" data-hook>
|
37
|
+
<%= form_tag empty_cart_path, :method => :put do %>
|
38
|
+
<p id="clear_cart_link" data-hook>
|
39
|
+
<%= submit_tag Spree.t(:empty_cart), :class => 'button gray' %>
|
40
|
+
<%= Spree.t(:or) %>
|
41
|
+
<%= link_to Spree.t(:continue_shopping), products_path, :class => 'continue button gray' %>
|
42
|
+
</p>
|
28
43
|
<% end %>
|
29
|
-
</div>
|
30
44
|
</div>
|
31
|
-
<% end %>
|
32
|
-
</div>
|
33
|
-
|
34
|
-
<div id="empty-cart" data-hook>
|
35
|
-
<%= form_tag empty_cart_path, :method => :put do %>
|
36
|
-
<p id="clear_cart_link" data-hook>
|
37
|
-
<%= submit_tag Spree.t(:empty_cart), :class => 'button gray' %>
|
38
|
-
<%= Spree.t(:or) %>
|
39
|
-
<%= link_to Spree.t(:continue_shopping), products_path, :class => 'continue button gray' %>
|
40
|
-
</p>
|
41
|
-
<% end %>
|
42
|
-
</div>
|
43
45
|
|
44
46
|
<% end %>
|
45
47
|
</div>
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<% @product.variants_and_option_values(current_currency).each_with_index do |variant, index| %>
|
9
9
|
<li>
|
10
10
|
<%= radio_button_tag "variant_id", variant.id, index == 0, 'data-price' => Spree::Money.new(variant.price, with_currency: true).to_s %>
|
11
|
-
<%= label_tag "
|
11
|
+
<%= label_tag "variant_id_#{ variant.id }" do %>
|
12
12
|
<span class="variant-description">
|
13
13
|
<%= variant_options variant %>
|
14
14
|
</span>
|
@@ -42,7 +42,7 @@
|
|
42
42
|
|
43
43
|
<% if @product.master.can_supply? %>
|
44
44
|
<link itemprop="availability" href="http://schema.org/InStock" />
|
45
|
-
<%
|
45
|
+
<% elsif @product.variants.empty? %>
|
46
46
|
<br />
|
47
47
|
<span class="out-of-stock"><%= Spree.t(:out_of_stock) %></span>
|
48
48
|
<% end %>
|
@@ -20,8 +20,8 @@
|
|
20
20
|
<div class="delivery">
|
21
21
|
<% order.shipments.each do |shipment| %>
|
22
22
|
<div>
|
23
|
-
<i class='
|
24
|
-
<%= Spree.t(:shipment_details, :stock_location => shipment.stock_location.name, :shipping_method => shipment.
|
23
|
+
<i class='fa fa-truck'></i>
|
24
|
+
<%= Spree.t(:shipment_details, :stock_location => shipment.stock_location.name, :shipping_method => shipment.selected_shipping_rate.name) %>
|
25
25
|
</div>
|
26
26
|
<% end %>
|
27
27
|
</div>
|
@@ -107,6 +107,15 @@
|
|
107
107
|
<% end %>
|
108
108
|
<% end %>
|
109
109
|
|
110
|
+
<tfoot id='shipment-total'>
|
111
|
+
<% order.shipments.group_by { |s| s.selected_shipping_rate.name }.each do |name, shipments| %>
|
112
|
+
<tr class="total" data-hook='shipment-row'>
|
113
|
+
<td colspan="4"><%= Spree.t(:shipping) %>: <strong><%= name %></strong></td>
|
114
|
+
<td class="total"><span><%= Spree::Money.new(shipments.sum(&:discounted_cost)).to_html %></span></td>
|
115
|
+
</tr>
|
116
|
+
<% end %>
|
117
|
+
</tfoot>
|
118
|
+
|
110
119
|
<% if order.all_adjustments.tax.exists? %>
|
111
120
|
<tfoot id="tax-adjustments" data-hook="order_details_tax_adjustments">
|
112
121
|
<% order.all_adjustments.tax.group_by(&:label).each do |label, adjustments| %>
|
@@ -117,14 +126,6 @@
|
|
117
126
|
<% end %>
|
118
127
|
</tfoot>
|
119
128
|
<% end %>
|
120
|
-
<tfoot id='shipment-total'>
|
121
|
-
<% order.shipments.group_by { |s| s.shipping_method.name }.each do |name, shipments| %>
|
122
|
-
<tr class="total" data-hook='shipment-row'>
|
123
|
-
<td colspan="4"><%= Spree.t(:shipping) %>: <strong><%= name %></strong></td>
|
124
|
-
<td class="total"><span><%= Spree::Money.new(shipments.sum(&:discounted_cost)).to_html %></span></td>
|
125
|
-
</tr>
|
126
|
-
<% end %>
|
127
|
-
</tfoot>
|
128
129
|
|
129
130
|
<tfoot id="order-charges" data-hook="order_details_adjustments">
|
130
131
|
<% @order.adjustments.eligible.each do |adjustment| %>
|
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.2.
|
4
|
+
version: 2.2.2
|
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-
|
11
|
+
date: 2014-05-15 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.2.
|
19
|
+
version: 2.2.2
|
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.2.
|
26
|
+
version: 2.2.2
|
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.2.
|
33
|
+
version: 2.2.2
|
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.2.
|
40
|
+
version: 2.2.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: canonical-rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -538,7 +538,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
538
538
|
requirements:
|
539
539
|
- none
|
540
540
|
rubyforge_project: spree_frontend
|
541
|
-
rubygems_version: 2.2.
|
541
|
+
rubygems_version: 2.2.0
|
542
542
|
signing_key:
|
543
543
|
specification_version: 4
|
544
544
|
summary: Frontend e-commerce functionality for the Spree project.
|