spree_ajax_cart 1.0.1 → 1.2.0
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.
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
<div id="cart">
|
2
2
|
<h3 id="cart-title" style="width: 660px;"><%= t(:shopping_cart) %></h3>
|
3
3
|
|
4
|
-
<% if current_order.empty? && current_order.line_items.empty? %>
|
4
|
+
<% if !current_order && current_order.empty? && current_order.line_items.empty? %>
|
5
5
|
<div data-hook="empty_cart">
|
6
6
|
<p><%= t(:your_cart_is_empty) %></p>
|
7
7
|
<p><%= link_to t(:continue_shopping), products_path, :class => 'button continue' %></p>
|
@@ -12,8 +12,8 @@
|
|
12
12
|
|
13
13
|
<div data-hook="inside_cart_form">
|
14
14
|
<div data-hook="cart_items">
|
15
|
-
<% current_order.line_items.each do |
|
16
|
-
<% variant =
|
15
|
+
<% current_order.line_items.each do |line_item| %>
|
16
|
+
<% variant = line_item.variant %>
|
17
17
|
<table id="cart-detail" data-hook>
|
18
18
|
<thead>
|
19
19
|
<tr data-hook="cart_items_headers">
|
@@ -41,13 +41,13 @@
|
|
41
41
|
<%= truncate(strip_tags(variant.product.description), :length => 30, :omission => "...") %>
|
42
42
|
</td>
|
43
43
|
<td data-hook="cart_item_price">
|
44
|
-
<%=
|
44
|
+
<%= money(line_item.price) %>
|
45
45
|
</td>
|
46
46
|
<td data-hook="cart_item_quantity">
|
47
|
-
<%=
|
47
|
+
<%= line_item.quantity %>
|
48
48
|
</td>
|
49
49
|
<td data-hook="cart_item_total">
|
50
|
-
<%=
|
50
|
+
<%= money(line_item.price * line_item.quantity) unless line_item.quantity.nil?%>
|
51
51
|
</td>
|
52
52
|
</tr>
|
53
53
|
</tbody>
|
@@ -56,7 +56,7 @@
|
|
56
56
|
</div>
|
57
57
|
|
58
58
|
<div id="subtotal" data-hook>
|
59
|
-
<h3><%= "#{t(:subtotal)}: #{
|
59
|
+
<h3><%= "#{t(:subtotal)}: #{money(current_order.item_total)}" if current_order %></h3>
|
60
60
|
<div class="links" data-hook="cart_buttons">
|
61
61
|
<%= link_to "Procedi al carrello" , cart_path, :class => 'button checkout primary', :id => 'checkout-link' %>
|
62
62
|
</div>
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_ajax_cart
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -64,7 +64,7 @@ files:
|
|
64
64
|
- app/assets/stylesheets/store/qtip-ajax_cart.css
|
65
65
|
- app/assets/stylesheets/store/spree_ajax_cart.css
|
66
66
|
- app/controllers/spree/orders_controller_decorator.rb
|
67
|
-
- app/helpers/spree/
|
67
|
+
- app/helpers/spree/base_helper_decorator.rb
|
68
68
|
- app/views/spree/orders/_ajax_cart.html.erb
|
69
69
|
- app/views/spree/orders/populate.js.erb
|
70
70
|
- config/locales/en.yml
|