caboose-cms 0.5.155 → 0.5.156
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
|
-
|
4
|
+
NzdiZGFiOGM0NGU2ODVjOWI5MjI1ZjNiMGQ0OTU5MjZhOGFhNTBmMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDMwNGExODM4YjdhY2Q5MTJlZjk4Yjk3Y2UwYzRiNDA1MDUxNGI0ZA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MmM4MzVhZDZkZDM5NDQyZjY5MzU0NzliNDlmY2E1OTAzNDhjYzlmYmRhOGUy
|
10
|
+
OGQyZWNlZTFjOTI1ODUwOWM2MmI1NWMwZDQ2MzQyOTZiNzhmMzQ1NDM3NzRk
|
11
|
+
MWY3YTY5MDdhOTY1MGQ2ZGQ2ODFhYzY0YjYxMDYwMjVhMmMxODM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YzEyNmUxZWY3ZTk3Zjg3M2NmZjJiMzQwMTAxMzZiYWI3ZTk1MDJiYjM5YTFk
|
14
|
+
ZTAwMDVjZTgxOTM4OTQyMjYyNTI1MWFlMTJkMDcwMDk3MTUxMTFjMzRhMmM0
|
15
|
+
MmQwYzdhYzU4ZWRhYTVjODg2MWQwNjk1MjU3NDQ0Mjc5MTg0ODg=
|
@@ -71,7 +71,8 @@ module Caboose
|
|
71
71
|
def payment
|
72
72
|
redirect_to '/checkout' and return if !logged_in?
|
73
73
|
redirect_to '/checkout/addresses' and return if @order.billing_address.nil? || (@order.has_shippable_items? && @order.shipping_address.nil?)
|
74
|
-
redirect_to '/checkout/shipping' and return if @order.has_shippable_items? && @order.has_empty_shipping_methods?
|
74
|
+
redirect_to '/checkout/shipping' and return if @order.has_shippable_items? && @order.has_empty_shipping_methods?
|
75
|
+
#redirect_to '/checkout/confirm' and return if @order.total == 0.00
|
75
76
|
|
76
77
|
# Make sure all the variants still exist
|
77
78
|
@order.line_items.each do |li|
|
@@ -106,6 +107,24 @@ module Caboose
|
|
106
107
|
end
|
107
108
|
@logged_in_user = logged_in_user
|
108
109
|
end
|
110
|
+
|
111
|
+
# GET /checkout/confirm
|
112
|
+
#def confirm_without_payment
|
113
|
+
# redirect_to '/checkout' and return if !logged_in?
|
114
|
+
# redirect_to '/checkout/addresses' and return if @order.billing_address.nil? || (@order.has_shippable_items? && @order.shipping_address.nil?)
|
115
|
+
# redirect_to '/checkout/shipping' and return if @order.has_shippable_items? && @order.has_empty_shipping_methods?
|
116
|
+
# redirect_to '/checkout/payment' and return if @order.total > 0.00
|
117
|
+
#
|
118
|
+
# # Make sure all the variants still exist
|
119
|
+
# @order.line_items.each do |li|
|
120
|
+
# v = Variant.where(:id => li.variant_id).first
|
121
|
+
# if v.nil? || v.status == 'Deleted'
|
122
|
+
# render :file => 'caboose/checkout/deleted_variant'
|
123
|
+
# return
|
124
|
+
# end
|
125
|
+
# end
|
126
|
+
# @logged_in_user = logged_in_user
|
127
|
+
#end
|
109
128
|
|
110
129
|
# GET /checkout/thanks
|
111
130
|
def thanks
|
@@ -23,6 +23,10 @@ module Caboose
|
|
23
23
|
end
|
24
24
|
|
25
25
|
sa = order.shipping_address
|
26
|
+
if sa.nil? || sa.address1.nil? || sa.city.nil? || sa.state.nil? || sa.zip.nil?
|
27
|
+
sa = order.billing_address
|
28
|
+
end
|
29
|
+
return 0.00 if sa.nil? || sa.address1.nil? || sa.city.nil? || sa.state.nil? || sa.zip.nil?
|
26
30
|
|
27
31
|
TaxCloud.configure do |config|
|
28
32
|
config.api_login_id = sc.taxcloud_api_id
|
@@ -0,0 +1,83 @@
|
|
1
|
+
<%
|
2
|
+
store_config = @site.store_config
|
3
|
+
%>
|
4
|
+
<div id="checkout">
|
5
|
+
<h2>Confirm Order</h2>
|
6
|
+
<section id='checkout-confirm'>
|
7
|
+
<% if @order.has_shippable_items? %>
|
8
|
+
<section id='shipping_address'>
|
9
|
+
<h3>Shipping Address</h3>
|
10
|
+
<% sa = @order.shipping_address %>
|
11
|
+
<address>
|
12
|
+
<%= "#{sa.first_name} #{sa.last_name}" %><br />
|
13
|
+
<%= sa.address1 %><br />
|
14
|
+
<%= "#{sa.address2}<br />" if sa.address2 and not sa.address2.empty? %>
|
15
|
+
<%= "#{sa.city}, #{sa.state} #{sa.zip}" %>
|
16
|
+
</address>
|
17
|
+
<p><a href="/checkout/addresses">Edit</a></p>
|
18
|
+
</section>
|
19
|
+
<% end %>
|
20
|
+
<section id='billing_address'>
|
21
|
+
<h3>Billing Address</h3>
|
22
|
+
<% ba = @order.billing_address %>
|
23
|
+
<address>
|
24
|
+
<%= "#{ba.first_name} #{ba.last_name}" %><br />
|
25
|
+
<%= ba.address1 %><br />
|
26
|
+
<%= "#{ba.address2}<br />" if ba.address2 and not ba.address2.empty? %>
|
27
|
+
<%= "#{ba.city}, #{ba.state} #{ba.zip}" %>
|
28
|
+
</address>
|
29
|
+
<p><a href="/checkout/addresses">Edit</a></p>
|
30
|
+
</section>
|
31
|
+
<% if @order.has_shippable_items? %>
|
32
|
+
<section id='shipping_method'>
|
33
|
+
<h3>Shipping</h3>
|
34
|
+
<% @order.order_packages.all.each do |op| %>
|
35
|
+
<p><%= op.shipping_method.service_name %> - <%= number_to_currency(op.total) %></p>
|
36
|
+
<% end %>
|
37
|
+
<p><a href="/checkout/shipping">Edit</a></p>
|
38
|
+
</section>
|
39
|
+
<% end %>
|
40
|
+
<section id='payment_method'>
|
41
|
+
<h3>Payment Method</h3>
|
42
|
+
<div id='confirm_card'>
|
43
|
+
<p id='confirm_card_number'></p>
|
44
|
+
<p><a href="#" id='edit_payment'>Edit</a></p>
|
45
|
+
</div>
|
46
|
+
</section>
|
47
|
+
<div style='clear: left;'> </div>
|
48
|
+
</section>
|
49
|
+
<section>
|
50
|
+
<div id='cart'></div>
|
51
|
+
</section>
|
52
|
+
<section id="checkout-continue">
|
53
|
+
<div id='message'></div>
|
54
|
+
<button class="blue">Confirm Order</button>
|
55
|
+
<em>or</em>
|
56
|
+
<a href="/">return to the store</a>
|
57
|
+
</section>
|
58
|
+
</div>
|
59
|
+
|
60
|
+
<%= content_for :caboose_js do %>
|
61
|
+
<%= javascript_include_tag 'caboose/cart' %>
|
62
|
+
<%= javascript_include_tag 'caboose/checkout_payment' %>
|
63
|
+
<script type='text/javascript'>
|
64
|
+
|
65
|
+
var cart = false;
|
66
|
+
$(document).ready(function() {
|
67
|
+
cart = new Cart({
|
68
|
+
allow_edit_line_items: false,
|
69
|
+
allow_edit_gift_cards: false
|
70
|
+
});
|
71
|
+
});
|
72
|
+
|
73
|
+
</script>
|
74
|
+
<% end %>
|
75
|
+
<%= content_for :caboose_css do %>
|
76
|
+
<%= stylesheet_link_tag 'caboose/cart' %>
|
77
|
+
<%= stylesheet_link_tag 'caboose/checkout' %>
|
78
|
+
<style type='text/css'>
|
79
|
+
|
80
|
+
#checkout h3 { font-size: 14pt; font-weight: bold; }
|
81
|
+
|
82
|
+
</style>
|
83
|
+
<% end %>
|
data/config/routes.rb
CHANGED
@@ -387,7 +387,8 @@ Caboose::Engine.routes.draw do
|
|
387
387
|
get '/checkout/shipping' => 'checkout#shipping'
|
388
388
|
put '/checkout/shipping' => 'checkout#update_shipping'
|
389
389
|
get '/checkout/gift-cards' => 'checkout#gift_cards'
|
390
|
-
get '/checkout/payment' => 'checkout#payment'
|
390
|
+
get '/checkout/payment' => 'checkout#payment'
|
391
|
+
get '/checkout/confirm' => 'checkout#confirm_without_payment'
|
391
392
|
get '/checkout/thanks' => 'checkout#thanks'
|
392
393
|
get '/checkout/test-email' => 'checkout#test_email'
|
393
394
|
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.156
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|
@@ -740,6 +740,7 @@ files:
|
|
740
740
|
- app/views/caboose/checkout/authnet_relay.html.erb
|
741
741
|
- app/views/caboose/checkout/authnet_response.html.erb
|
742
742
|
- app/views/caboose/checkout/billing.html.erb
|
743
|
+
- app/views/caboose/checkout/confirm_without_payment.html.erb
|
743
744
|
- app/views/caboose/checkout/discount.html.erb
|
744
745
|
- app/views/caboose/checkout/empty.html.erb
|
745
746
|
- app/views/caboose/checkout/error.html.erb
|