spree_frontend 2.2.2 → 2.2.3

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: 895597d448eeccc9c9933889d9a6f4beaae9ff44
4
- data.tar.gz: 4a898e6a87968ed4cdf3a0cbcd323c08c7cabbcf
3
+ metadata.gz: 340b0d616e5cba3a9a7fae4893da2b80f3f9fff7
4
+ data.tar.gz: 25b42e08e336643d49011dcad36f6babf8aff47f
5
5
  SHA512:
6
- metadata.gz: 348f93aa386b4135d33bcd530578d587e97d4617d7afc21a4c75eecffa2ea5a011648ca4ec43819165b2c29b7732747e87ee878273654c81297a0aab49af949c
7
- data.tar.gz: 15f9c9b63e059e88ea43ef5b4e7cdd459be53a7b6cc4d7d97229ddd3bdcb0e56c09e0f87d475365fb11a42710e5c37b0e23f3948b2d0aa91fda9ec547b12041a
6
+ metadata.gz: e2768c7a9c80fe04622a720996f954a404df2e7e7a865ff42f4053e8fe5096477f5447cae1770c8601a8a68cdc85799a3bcf522cdbb82fc987719df3a82c6812
7
+ data.tar.gz: 346dee1608ee99d0a5806c635feef09283045ce2a4b5967af93e0cd0a0c6df76038b36fca78fb26392ed4ef6b72c60f7f70c4f052e19face7f81dee818b6b704
@@ -12,4 +12,4 @@ Spree.fetch_cart = ->
12
12
  $.ajax
13
13
  url: Spree.routes.cart_link,
14
14
  success: (data) ->
15
- $('#link-to-cart').html data
15
+ $('#link-to-cart').html data
@@ -8,4 +8,4 @@ Spree.disableSaveOnClick = ->
8
8
  ($ this).find(':submit, :image').attr('disabled', true).removeClass('primary').addClass 'disabled'
9
9
 
10
10
  Spree.ready ($) ->
11
- Spree.Checkout = {}
11
+ Spree.Checkout = {}
@@ -1,83 +1,83 @@
1
- Spree.onAddress = () ->
2
- if ($ '#checkout_form_address').is('*')
3
- ($ '#checkout_form_address').validate()
1
+ Spree.ready ($) ->
2
+ Spree.onAddress = () ->
3
+ if ($ '#checkout_form_address').is('*')
4
+ ($ '#checkout_form_address').validate()
4
5
 
5
- getCountryId = (region) ->
6
- $('#' + region + 'country select').val()
6
+ getCountryId = (region) ->
7
+ $('#' + region + 'country select').val()
7
8
 
8
- Spree.updateState = (region) ->
9
- countryId = getCountryId(region)
10
- if countryId?
11
- unless Spree.Checkout[countryId]?
12
- $.get Spree.routes.states_search, {country_id: countryId}, (data) ->
13
- Spree.Checkout[countryId] =
14
- states: data.states
15
- states_required: data.states_required
9
+ Spree.updateState = (region) ->
10
+ countryId = getCountryId(region)
11
+ if countryId?
12
+ unless Spree.Checkout[countryId]?
13
+ $.get Spree.routes.states_search, {country_id: countryId}, (data) ->
14
+ Spree.Checkout[countryId] =
15
+ states: data.states
16
+ states_required: data.states_required
17
+ Spree.fillStates(Spree.Checkout[countryId], region)
18
+ else
16
19
  Spree.fillStates(Spree.Checkout[countryId], region)
17
- else
18
- Spree.fillStates(Spree.Checkout[countryId], region)
19
20
 
20
- Spree.fillStates = (data, region) ->
21
- statesRequired = data.states_required
22
- states = data.states
21
+ Spree.fillStates = (data, region) ->
22
+ statesRequired = data.states_required
23
+ states = data.states
23
24
 
24
- statePara = ($ '#' + region + 'state')
25
- stateSelect = statePara.find('select')
26
- stateInput = statePara.find('input')
27
- stateSpanRequired = statePara.find('state-required')
28
- if states.length > 0
29
- selected = parseInt stateSelect.val()
30
- stateSelect.html ''
31
- statesWithBlank = [{ name: '', id: ''}].concat(states)
32
- $.each statesWithBlank, (idx, state) ->
33
- opt = ($ document.createElement('option')).attr('value', state.id).html(state.name)
34
- opt.prop 'selected', true if selected is state.id
35
- stateSelect.append opt
25
+ statePara = ($ '#' + region + 'state')
26
+ stateSelect = statePara.find('select')
27
+ stateInput = statePara.find('input')
28
+ stateSpanRequired = statePara.find('state-required')
29
+ if states.length > 0
30
+ selected = parseInt stateSelect.val()
31
+ stateSelect.html ''
32
+ statesWithBlank = [{ name: '', id: ''}].concat(states)
33
+ $.each statesWithBlank, (idx, state) ->
34
+ opt = ($ document.createElement('option')).attr('value', state.id).html(state.name)
35
+ opt.prop 'selected', true if selected is state.id
36
+ stateSelect.append opt
36
37
 
37
- stateSelect.prop('disabled', false).show()
38
- stateInput.hide().prop 'disabled', true
39
- statePara.show()
40
- stateSpanRequired.show()
41
- stateSelect.addClass('required') if statesRequired
42
- stateSelect.removeClass('hidden')
43
- stateInput.removeClass('required')
44
- else
45
- stateSelect.hide().prop 'disabled', true
46
- stateInput.show()
47
- if statesRequired
38
+ stateSelect.prop('disabled', false).show()
39
+ stateInput.hide().prop 'disabled', true
40
+ statePara.show()
48
41
  stateSpanRequired.show()
49
- stateInput.addClass('required')
50
- else
51
- stateInput.val ''
52
- stateSpanRequired.hide()
42
+ stateSelect.addClass('required') if statesRequired
43
+ stateSelect.removeClass('hidden')
53
44
  stateInput.removeClass('required')
54
- statePara.toggle(!!statesRequired)
55
- stateInput.prop('disabled', !statesRequired)
56
- stateInput.removeClass('hidden')
57
- stateSelect.removeClass('required')
45
+ else
46
+ stateSelect.hide().prop 'disabled', true
47
+ stateInput.show()
48
+ if statesRequired
49
+ stateSpanRequired.show()
50
+ stateInput.addClass('required')
51
+ else
52
+ stateInput.val ''
53
+ stateSpanRequired.hide()
54
+ stateInput.removeClass('required')
55
+ statePara.toggle(!!statesRequired)
56
+ stateInput.prop('disabled', !statesRequired)
57
+ stateInput.removeClass('hidden')
58
+ stateSelect.removeClass('required')
58
59
 
59
- ($ '#bcountry select').change ->
60
- Spree.updateState 'b'
60
+ ($ '#bcountry select').change ->
61
+ Spree.updateState 'b'
61
62
 
62
- ($ '#scountry select').change ->
63
- Spree.updateState 's'
63
+ ($ '#scountry select').change ->
64
+ Spree.updateState 's'
64
65
 
65
- Spree.updateState 'b'
66
+ Spree.updateState 'b'
66
67
 
67
- order_use_billing = ($ 'input#order_use_billing')
68
- order_use_billing.change ->
69
- update_shipping_form_state order_use_billing
68
+ order_use_billing = ($ 'input#order_use_billing')
69
+ order_use_billing.change ->
70
+ update_shipping_form_state order_use_billing
70
71
 
71
- update_shipping_form_state = (order_use_billing) ->
72
- if order_use_billing.is(':checked')
73
- ($ '#shipping .inner').hide()
74
- ($ '#shipping .inner input, #shipping .inner select').prop 'disabled', true
75
- else
76
- ($ '#shipping .inner').show()
77
- ($ '#shipping .inner input, #shipping .inner select').prop 'disabled', false
78
- Spree.updateState('s')
72
+ update_shipping_form_state = (order_use_billing) ->
73
+ if order_use_billing.is(':checked')
74
+ ($ '#shipping .inner').hide()
75
+ ($ '#shipping .inner input, #shipping .inner select').prop 'disabled', true
76
+ else
77
+ ($ '#shipping .inner').show()
78
+ ($ '#shipping .inner input, #shipping .inner select').prop 'disabled', false
79
+ Spree.updateState('s')
79
80
 
80
- update_shipping_form_state order_use_billing
81
+ update_shipping_form_state order_use_billing
81
82
 
82
- Spree.ready ($) ->
83
- Spree.onAddress()
83
+ Spree.onAddress()
@@ -1,79 +1,79 @@
1
- Spree.onPayment = () ->
2
- if ($ '#checkout_form_payment').is('*')
3
-
4
- if ($ '#existing_cards').is('*')
5
- ($ '#payment-method-fields').hide()
6
- ($ '#payment-methods').hide()
1
+ Spree.ready ($) ->
2
+ Spree.onPayment = () ->
3
+ if ($ '#checkout_form_payment').is('*')
7
4
 
8
- ($ '#use_existing_card_yes').click ->
5
+ if ($ '#existing_cards').is('*')
9
6
  ($ '#payment-method-fields').hide()
10
7
  ($ '#payment-methods').hide()
11
- ($ '.existing-cc-radio').prop("disabled", false)
12
8
 
13
- ($ '#use_existing_card_no').click ->
14
- ($ '#payment-method-fields').show()
15
- ($ '#payment-methods').show()
16
- ($ '.existing-cc-radio').prop("disabled", true)
9
+ ($ '#use_existing_card_yes').click ->
10
+ ($ '#payment-method-fields').hide()
11
+ ($ '#payment-methods').hide()
12
+ ($ '.existing-cc-radio').prop("disabled", false)
17
13
 
14
+ ($ '#use_existing_card_no').click ->
15
+ ($ '#payment-method-fields').show()
16
+ ($ '#payment-methods').show()
17
+ ($ '.existing-cc-radio').prop("disabled", true)
18
18
 
19
- $(".cardNumber").payment('formatCardNumber')
20
- $(".cardExpiry").payment('formatCardExpiry')
21
- $(".cardCode").payment('formatCardCVC')
22
19
 
23
- $(".cardNumber").change ->
24
- $(this).parent().siblings(".ccType").val($.payment.cardType(@value))
20
+ $(".cardNumber").payment('formatCardNumber')
21
+ $(".cardExpiry").payment('formatCardExpiry')
22
+ $(".cardCode").payment('formatCardCVC')
25
23
 
26
- ($ 'input[type="radio"][name="order[payments_attributes][][payment_method_id]"]').click(->
27
- ($ '#payment-methods li').hide()
28
- ($ '#payment_method_' + @value).show() if @checked
29
- )
24
+ $(".cardNumber").change ->
25
+ $(this).parent().siblings(".ccType").val($.payment.cardType(@value))
30
26
 
31
- ($ document).on('click', '#cvv_link', (event) ->
32
- windowName = 'cvv_info'
33
- windowOptions = 'left=20,top=20,width=500,height=500,toolbar=0,resizable=0,scrollbars=1'
34
- window.open(($ this).attr('href'), windowName, windowOptions)
35
- event.preventDefault()
36
- )
27
+ ($ 'input[type="radio"][name="order[payments_attributes][][payment_method_id]"]').click(->
28
+ ($ '#payment-methods li').hide()
29
+ ($ '#payment_method_' + @value).show() if @checked
30
+ )
37
31
 
38
- # Activate already checked payment method if form is re-rendered
39
- # i.e. if user enters invalid data
40
- ($ 'input[type="radio"]:checked').click()
32
+ ($ document).on('click', '#cvv_link', (event) ->
33
+ windowName = 'cvv_info'
34
+ windowOptions = 'left=20,top=20,width=500,height=500,toolbar=0,resizable=0,scrollbars=1'
35
+ window.open(($ this).attr('href'), windowName, windowOptions)
36
+ event.preventDefault()
37
+ )
41
38
 
42
- $('#checkout_form_payment').submit ->
43
- # Coupon code application may take a number of seconds.
44
- # Informing the user that this is happening is a good way to indicate some progress to them.
45
- # In addition to this, if the coupon code FAILS then they don't lose their just-entered payment data.
46
- coupon_code_field = $('#order_coupon_code')
47
- coupon_code = $.trim(coupon_code_field.val())
48
- if (coupon_code != '')
49
- if $('#coupon_status').length == 0
50
- coupon_status = $("<div id='coupon_status'></div>")
51
- coupon_code_field.parent().append(coupon_status)
52
- else
53
- coupon_status = $("#coupon_status")
39
+ # Activate already checked payment method if form is re-rendered
40
+ # i.e. if user enters invalid data
41
+ ($ 'input[type="radio"]:checked').click()
54
42
 
55
- url = Spree.url(Spree.routes.apply_coupon_code(Spree.current_order_id),
56
- {
57
- order_token: Spree.current_order_token,
58
- coupon_code: coupon_code
59
- }
60
- )
43
+ $('#checkout_form_payment').submit ->
44
+ # Coupon code application may take a number of seconds.
45
+ # Informing the user that this is happening is a good way to indicate some progress to them.
46
+ # In addition to this, if the coupon code FAILS then they don't lose their just-entered payment data.
47
+ coupon_code_field = $('#order_coupon_code')
48
+ coupon_code = $.trim(coupon_code_field.val())
49
+ if (coupon_code != '')
50
+ if $('#coupon_status').length == 0
51
+ coupon_status = $("<div id='coupon_status'></div>")
52
+ coupon_code_field.parent().append(coupon_status)
53
+ else
54
+ coupon_status = $("#coupon_status")
61
55
 
62
- coupon_status.removeClass();
63
- $.ajax({
64
- async: false,
65
- method: "PUT",
66
- url: url,
67
- success: (data) ->
68
- coupon_code_field.val('')
69
- coupon_status.addClass("success").html("Coupon code applied successfully.")
70
- return true
71
- error: (xhr) ->
72
- handler = JSON.parse(xhr.responseText)
73
- coupon_status.addClass("error").html(handler["error"])
74
- $('.continue').attr('disabled', false)
75
- return false
76
- })
56
+ url = Spree.url(Spree.routes.apply_coupon_code(Spree.current_order_id),
57
+ {
58
+ order_token: Spree.current_order_token,
59
+ coupon_code: coupon_code
60
+ }
61
+ )
62
+
63
+ coupon_status.removeClass();
64
+ $.ajax({
65
+ async: false,
66
+ method: "PUT",
67
+ url: url,
68
+ success: (data) ->
69
+ coupon_code_field.val('')
70
+ coupon_status.addClass("success").html("Coupon code applied successfully.")
71
+ return true
72
+ error: (xhr) ->
73
+ handler = JSON.parse(xhr.responseText)
74
+ coupon_status.addClass("error").html(handler["error"])
75
+ $('.continue').attr('disabled', false)
76
+ return false
77
+ })
77
78
 
78
- Spree.ready ($) ->
79
79
  Spree.onPayment()
@@ -37,8 +37,9 @@ $ ->
37
37
  radios = ($ '#product-variants input[type="radio"]')
38
38
 
39
39
  if radios.length > 0
40
- Spree.showVariantImages ($ '#product-variants input[type="radio"]').eq(0).attr('value')
41
- Spree.updateVariantPrice radios.first()
40
+ selectedRadio = ($ '#product-variants input[type="radio"][checked="checked"]')
41
+ Spree.showVariantImages selectedRadio.attr('value')
42
+ Spree.updateVariantPrice selectedRadio
42
43
 
43
44
  Spree.addImageHandlers()
44
45
 
@@ -74,7 +74,7 @@ module Spree
74
74
  end
75
75
 
76
76
  def check_authorization
77
- session[:access_token] ||= params[:token]
77
+ session[:access_token] = params[:token] if params[:token]
78
78
  order = Spree::Order.find_by_number(params[:id]) || current_order
79
79
 
80
80
  if order
@@ -12,7 +12,7 @@
12
12
  <% order.line_item_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
13
13
  <tr class="total">
14
14
  <td><%= label %></td>
15
- <td><%= Spree::Money.new(adjustments.sum(&:amount)).to_html %></td>
15
+ <td><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency).to_html %></td>
16
16
  </tr>
17
17
  <% end %>
18
18
  </tbody>
@@ -22,7 +22,7 @@
22
22
  <% order.all_adjustments.tax.eligible.group_by(&:label).each do |label, adjustments| %>
23
23
  <tr class="total">
24
24
  <td><%= label %></td>
25
- <td><%= Spree::Money.new(adjustments.sum(&:amount)).to_html %></td>
25
+ <td><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency).to_html %></td>
26
26
  </tr>
27
27
  <% end %>
28
28
  </tbody>
@@ -30,7 +30,7 @@
30
30
  <% if order.checkout_steps.include?("delivery") && order.shipments.any? %>
31
31
  <tr data-hook="shipping_total">
32
32
  <td><%= Spree.t(:shipping_total) %></td>
33
- <td><%= Spree::Money.new(order.shipments.to_a.sum(&:cost)).to_html %></td>
33
+ <td><%= Spree::Money.new(order.shipments.to_a.sum(&:cost), currency: order.currency).to_html %></td>
34
34
  </tr>
35
35
 
36
36
  <% if order.shipment_adjustments.exists? %>
@@ -38,7 +38,7 @@
38
38
  <% order.shipment_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
39
39
  <tr class="total">
40
40
  <td><%= label %></td>
41
- <td><%= Spree::Money.new(adjustments.sum(&:amount)).to_html %></td>
41
+ <td><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency).to_html %></td>
42
42
  </tr>
43
43
  <% end %>
44
44
  </tbody>
@@ -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 "variant_id", variant.id, index == 0, 'data-price' => Spree::Money.new(variant.price, with_currency: true).to_s %>
10
+ <%= radio_button_tag "variant_id", variant.id, index == 0, 'data-price' => Spree::Money.new(variant.price, currency: current_currency, with_currency: true).to_s %>
11
11
  <%= label_tag "variant_id_#{ variant.id }" do %>
12
12
  <span class="variant-description">
13
13
  <%= variant_options variant %>
@@ -30,7 +30,7 @@
30
30
 
31
31
  <% if @product.price_in(current_currency) and !@product.price.nil? %>
32
32
  <div data-hook="product_price" class="columns five <% if !@product.has_variants? %> alpha <% else %> omega <% end %>">
33
-
33
+
34
34
  <div id="product-price">
35
35
  <h6 class="product-section-title"><%= Spree.t(:price) %></h6>
36
36
  <div>
@@ -45,7 +45,7 @@
45
45
  <% elsif @product.variants.empty? %>
46
46
  <br />
47
47
  <span class="out-of-stock"><%= Spree.t(:out_of_stock) %></span>
48
- <% end %>
48
+ <% end %>
49
49
  </div>
50
50
 
51
51
  <div class="add-to-cart">
@@ -60,6 +60,6 @@
60
60
  <br>
61
61
  <div><span class="price selling" itemprop="price"><%= Spree.t('product_not_available_in_this_currency') %></span></div>
62
62
  </div>
63
- <% end %>
63
+ <% end %>
64
64
  </div>
65
65
  <% end %>
@@ -1,4 +1,4 @@
1
- <% cache [current_currency, @product] do %>
1
+ <% cache [I18n.locale, current_currency, @product] do %>
2
2
  <div data-hook="product_show" itemscope itemtype="http://schema.org/Product">
3
3
  <% @body_id = 'product-details' %>
4
4
 
@@ -5,19 +5,19 @@
5
5
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
6
6
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');
7
7
 
8
- ga('create', '<%= tracker.analytics_id %>','<%= Spree::Config[:site_url].sub!(/^www./,'') %>');
8
+ ga('create', '<%= tracker.analytics_id %>','<%= Spree::Config[:site_url].sub!(/(^www.)?/,'') %>');
9
9
  ga('send', 'pageview');
10
10
 
11
11
  <% if flash[:commerce_tracking] && @order.present? %>
12
12
  <%# more info: https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce %>
13
13
  ga('require', 'ecommerce', 'ecommerce.js');
14
14
  ga('ecommerce:addTransaction', {
15
- 'id': '<%= j @order.number %>', // Transaction ID. Required.
16
- 'affiliation': '<%= Spree::Config[:site_name] %>', // Affiliation or store name.
17
- 'revenue': '<%= @order.total %>', // Grand Total.
18
- 'shipping': '<%= @order.shipments.sum("cost + promo_total") %>', // Shipping.
19
- 'tax': '<%= @order.all_adjustments.tax.sum(:amount) %>', // Tax.
20
- 'currencyCode': '<%= current_currency %>' // local currency code.
15
+ 'id': '<%= j @order.number %>', // Transaction ID. Required.
16
+ 'affiliation': '<%= Spree::Config[:site_name] %>', // Affiliation or store name.
17
+ 'revenue': '<%= @order.total %>', // Grand Total.
18
+ 'shipping': '<%= @order.ship_total %>', // Shipping.
19
+ 'tax': '<%= @order.additional_tax_total + @order.included_tax_total %>', // Tax.
20
+ 'currency': '<%= current_currency %>' // local currency code.
21
21
  });
22
22
  <% @order.line_items.each do |line_item| %>
23
23
  ga('ecommerce:addItem', {
@@ -100,7 +100,7 @@
100
100
  <% order.all_adjustments.promotion.eligible.group_by(&:label).each do |label, adjustments| %>
101
101
  <tr class="total">
102
102
  <td colspan="4"><%= Spree.t(:promotion) %>: <strong><%= label %></strong></td>
103
- <td class="total"><span><%= Spree::Money.new(adjustments.sum(&:amount)) %></span></td>
103
+ <td class="total"><span><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency) %></span></td>
104
104
  </tr>
105
105
  <% end %>
106
106
  </tfoot>
@@ -111,7 +111,7 @@
111
111
  <% order.shipments.group_by { |s| s.selected_shipping_rate.name }.each do |name, shipments| %>
112
112
  <tr class="total" data-hook='shipment-row'>
113
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>
114
+ <td class="total"><span><%= Spree::Money.new(shipments.sum(&:discounted_cost), currency: order.currency).to_html %></span></td>
115
115
  </tr>
116
116
  <% end %>
117
117
  </tfoot>
@@ -121,7 +121,7 @@
121
121
  <% order.all_adjustments.tax.group_by(&:label).each do |label, adjustments| %>
122
122
  <tr class="total">
123
123
  <td colspan="4"><%= Spree.t(:tax) %>: <strong><%= label %></strong></td>
124
- <td class="total"><span><%= Spree::Money.new(adjustments.sum(&:amount)) %></span></td>
124
+ <td class="total"><span><%= Spree::Money.new(adjustments.sum(&:amount), currency: order.currency) %></span></td>
125
125
  </tr>
126
126
  <% end %>
127
127
  </tfoot>
@@ -9,18 +9,24 @@
9
9
  <% end %>
10
10
  <% end %>
11
11
 
12
- <% if products.empty? %>
13
- <%= Spree.t(:no_products_found) %>
14
- <% elsif params.key?(:keywords) %>
15
- <h6 class="search-results-title"><%= Spree.t(:search_results, :keywords => h(params[:keywords])) %></h6>
16
- <% end %>
12
+ <div data-hook="products_search_results_heading">
13
+ <% if products.empty? %>
14
+ <div data-hook="products_search_results_heading_no_results_found">
15
+ <%= Spree.t(:no_products_found) %>
16
+ </div>
17
+ <% elsif params.key?(:keywords) %>
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>
20
+ </div>
21
+ <% end %>
22
+ </div>
17
23
 
18
24
  <% if products.any? %>
19
25
  <ul id="products" class="inline product-listing" data-hook>
20
26
  <% products.each do |product| %>
21
27
  <% url = product_url(product, :taxon_id => @taxon.try(:id)) %>
22
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">
23
- <% cache(@taxon.present? ? [current_currency, @taxon, product] : [current_currency, product]) do %>
29
+ <% cache(@taxon.present? ? [I18n.locale, current_currency, @taxon, product] : [I18n.locale, current_currency, product]) do %>
24
30
  <div class="product-image">
25
31
  <%= link_to small_image(product, :itemprop => "image"), url, :itemprop => 'url' %>
26
32
  </div>
@@ -1,7 +1,7 @@
1
1
  <% max_level = Spree::Config[:max_level_in_taxons_menu] || 1 %>
2
2
  <nav id="taxonomies" class="sidebar-item" data-hook>
3
3
  <% @taxonomies.each do |taxonomy| %>
4
- <% cache [taxonomy, max_level] do %>
4
+ <% cache [I18n.locale, taxonomy, max_level] do %>
5
5
  <h6 class='taxonomy-root'><%= Spree.t(:shop_by_taxonomy, :taxonomy => taxonomy.name) %></h6>
6
6
  <%= taxons_tree(taxonomy.root, @taxon, max_level) %>
7
7
  <% end %>
@@ -13,7 +13,7 @@
13
13
 
14
14
  <% unless params[:keywords].present? %>
15
15
  <div data-hook="taxon_children">
16
- <% cache @taxon do %>
16
+ <% cache [I18n.locale, @taxon] do %>
17
17
  <%= render :partial => 'taxon', :collection => @taxon.children %>
18
18
  <% end %>
19
19
  </div>
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.2
4
+ version: 2.2.3
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-05-15 00:00:00.000000000 Z
11
+ date: 2014-07-01 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.2
19
+ version: 2.2.3
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.2
26
+ version: 2.2.3
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.2
33
+ version: 2.2.3
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.2
40
+ version: 2.2.3
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.0
541
+ rubygems_version: 2.2.2
542
542
  signing_key:
543
543
  specification_version: 4
544
544
  summary: Frontend e-commerce functionality for the Spree project.