caboose-cms 0.5.136 → 0.5.137

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZGFkZTczZWFhYmQzMjA1N2EwMjA1MjM3ZWQ5YzQwZTQ3MDAwZTI2Mg==
4
+ YmUwYjU0OGY4YjY2MTQzNDQwMGFkNjE3ZjIzMDk0NDIxN2E2M2IyMg==
5
5
  data.tar.gz: !binary |-
6
- YTRjZGQ0NGQ5ODY3ZWE0ZWUzZmNlMjg4YzUyMDhlNDBlNjU1MzFkNA==
6
+ YWQwNDA0OGYxY2YxYWNhZTU5MmEyMjljMGJhNDM5MDk0YjI4NjllZA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- M2YzMmMzYzAyYzIwZThjYTA3ZjZlZTc4ZTAxMWIyNzQ3MDcyOTNkYzJhMGFh
10
- MTZiZDU1YzczNzVhZGJhMGY1ZjJkZDNkMDExZTU3OGE4MTg0NmM3ZmZkZDc3
11
- N2JhYWMyNGJlNDc4NmNjNzhmNzAxYzdjZWQyNWU0ZjZjZWIxNDI=
9
+ ZDE2MzRlZGQwMzEzZDNlZTBhN2NlZTY4MjlhMWQ4OTUzOWQ0NzI0OTkzYzQx
10
+ YWNlOTlhN2E5ZWU5ZTI4NDQ2MjMwMzMyYWFiNDJjYmI4ZjQwMDJmOTZjZDFi
11
+ NTE2YmJjMGNjZDBjOTFkNzIzYjhlYjM0MGQzMjY2Yzg3NGU0MDA=
12
12
  data.tar.gz: !binary |-
13
- ZDYzZTNiMDVkNmY1MzY1MDJhZDNjMzkyOThhMDUzNjc4M2Y1NDhmZGFkNWU3
14
- OGViNzczNjYyZjRlZWIzODVmNTI3NzQyOWZmNjdhMjA2YjQxNDAyZjQyZmRm
15
- N2JkNDhhZjcxM2EzNzUwNzk1MzU4MGY4MGIxOWVlMTU0YmQzNWE=
13
+ YmRmZTVkNzVmZDMzZGIzZmRkYTAzYmU0YmQ5OTVhMGVkZGY2ZmY2ZmE2NTEz
14
+ YTU0YTA1YWQ0NDA3NTlkNGQ4NmY4OWE1ODU1OWIxY2ZlNWQ0YjY0ZmFmNzFj
15
+ MDEwYzc2YjkzNjE4ZmJkYTZlYzAyOWI1OTAxOTRiYWQ1N2U4YTA=
@@ -163,8 +163,8 @@ module Caboose
163
163
  arr << { :image => image, :fit => [40, 40], :borders => [:top, :bottom, :left], :width => 50 }
164
164
  arr << { :content => "#{li.variant.product.title}\n#{li.variant.sku}", :borders => [:top, :right, :bottom], :width => 100 }
165
165
  arr << { :content => options }
166
- arr << { :content => "#{li.quantity}" , :align => :right }
167
- arr << { :content => "$" + sprintf("%.2f", li.price) , :align => :right }
166
+ arr << { :content => "#{li.quantity}" , :align => :right }
167
+ arr << { :content => "$" + sprintf("%.2f", li.unit_price) , :align => :right }
168
168
  arr << { :content => "$" + sprintf("%.2f", li.subtotal) , :align => :right }
169
169
 
170
170
  tbl << arr
@@ -1,3 +1,95 @@
1
+ <p><img src='<%= @order.site.logo.url(:thumb) %>' /></p>
2
+
1
3
  <h1>Thank you for your order!</h1>
2
4
 
5
+ <p>Order #<%= @order.order_number %></p>
6
+
7
+ <h2>Order Details</h2>
8
+
9
+ <table>
10
+ <tr>
11
+ <th>Package</th>
12
+ <th>Line Item</th>
13
+ <th>Unit Price</th>
14
+ <th>Quantity</th>
15
+ <th>Subtotal</th>
16
+ </tr>
17
+ <% @order.order_packages.each do |op| %>
18
+ <% op.line_items.each_with_index do |li, i| %>
19
+ <% v = li.variant %>
20
+ <% p = v.product %>
21
+ <tr>
22
+ <% if i == 0 %>
23
+ <td rowspan="<%= op.line_items.count %>">
24
+ <div><%= op.shipping_method.name %></div>
25
+ <div><%= op.status %></div>
26
+ <% if op.tracking_number %><div><%= op.tracking_number %></div><% end %>
27
+ </td>
28
+ <% end %>
29
+ <td>
30
+ <%= p.title %>
31
+ <% if li.is_gift %>
32
+ <p>This item is a gift.</p>
33
+ <ul>
34
+ <li><% if li.gift_wrap %>Gift wrap (<%= number_as_currency(p.gift_wrap_price) %>)<% else %>Do not gift wrap<% end %></li>
35
+ <li><% if li.include_gift_message %>Gift message: <%= li.gift_message %><% else %>No gift message<% end %></li>
36
+ <li><% if li.hide_prices %>Hide all prices<% else %>Show all prices<% end %></li>
37
+ </ul>
38
+ <% end %>
39
+ </td>
40
+ <td align='right'><%= number_as_currency(li.unit_price) %></td>
41
+ <td align='right'><%= li.quantity %></td>
42
+ <td align='right'><%= number_as_currency(li.subtotal) %></td>
43
+ </tr>
44
+ <% end %>
45
+ <% end %>
46
+ <% op.line_items.each do |li| %>
47
+ <% next if li.order_package_id %>
48
+ <% v = li.variant %>
49
+ <% p = v.product %>
50
+ <tr>
51
+ <td>Not assigned to a package</td>
52
+ <td><%= p.title %></td></td>
53
+ <td align='right'><%= number_as_currency(li.unit_price) %></td>
54
+ <td align='right'><%= li.quantity %></td>
55
+ <td align='right'><%= number_as_currency(li.subtotal) %></td>
56
+ </tr>
57
+ <% end %>
58
+ <tr><td colspan="4">Subtotal: </td><td><%= number_as_currency(@order.subtotal) %></td></tr>
59
+ <tr><td colspan="4">Tax: </td><td><%= number_as_currency(@order.tax) %></td></tr>
60
+ <tr><td colspan="4">Shipping and Handling: </td><td><%= number_as_currency(@order.shipping + @order.handling) %></td></tr>
61
+ <% if @order.gift_wrap && @order.gift_wrap > 0 %>
62
+ <tr><td colspan="4">Gift wrap: </td><td><%= number_as_currency(@order.gift_wrap) %></td></tr>
63
+ <% end %>
64
+ <% if @order.discounts %>
65
+ <% @order.discounts.each do |d| %>
66
+ <tr><td colspan="4">"<%= d.gift_card.code %>" gift card: </td><td><%= number_as_currency(d.amount) %></td></tr>
67
+ <% end %>
68
+ <% end %>
69
+ <% if @order.custom_discount %>
70
+ <tr><td colspan="4">Discount: </td><td><%= number_as_currency(d.custom_discount) %></td></tr>
71
+ <% end %>
72
+ <tr><td colspan="4">Total: </td><td><%= number_as_currency(@order.total) %></td></tr>
73
+ </table>
74
+
75
+ <% if @order.shipping_address %>
76
+ <% sa = @order.shipping_address %>
77
+ <h2>Shipping Address</h2>
78
+ <p>
79
+ <%= sa.first_name %> <%= sa.last_name %><br />
80
+ <%= sa.address1 %><br />
81
+ <% if sa.address2 %><%= sa.address2 %><br /><% end %>
82
+ <%= sa.city %>, <%= sa.state %> <%= sa.zip %>
83
+ </p>
84
+ <% end %>
3
85
 
86
+ <% if @order.billing_address %>
87
+ <% ba = @order.billing_address %>
88
+ <h2>Billing Address</h2>
89
+ <p>
90
+ <%= ba.first_name %> <%= ba.last_name %><br />
91
+ <%= ba.address1 %><br />
92
+ <% if ba.address2 %><%= ba.address2 %><br /><% end %>
93
+ <%= ba.city %>, <%= ba.state %> <%= ba.zip %>
94
+ </p>
95
+ <% end %>
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.136'
2
+ VERSION = '0.5.137'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.136
4
+ version: 0.5.137
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry