caboose-cms 0.5.14 → 0.5.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/app/assets/javascripts/caboose/cart.js +11 -4
- data/app/assets/stylesheets/caboose/checkout.css.scss +2 -2
- data/app/views/caboose/cart/index.html.erb +2 -2
- data/app/views/caboose/checkout/step_one.html.erb +33 -40
- data/app/views/caboose/checkout/step_two.html.erb +46 -41
- data/lib/caboose/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YmZkN2Y1OTAyYTUwNjIyM2JhYTA4MjIxMmI4NDYyNDg1OWUxNWFhMw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
YjM1NWE0ZGQyMTg5N2FjOGFjMWM3ODk0N2Q3YzZlYWZhMjE3MzFiNA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTQ5ZDYyOGRkN2ViNDlkZGYyMDQ1N2U1OTk1ZTYzMmNhYTA2NzY5YmQxNTU1
|
10
|
+
NjY5YTlkNmI3OGMwMzBhNzFmMzU3ZmI2M2E1OWRlNWNjMjY5ZDQ0MzkzOWZi
|
11
|
+
YmI5NDBiYzViMDVhZGY0NzdkYjg4MDQ4YmEyMjM3YTVlYzJkYzU=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTdmZTE2NDA2MDc3NmE4NGVmOWIwZGRhZGYzOTYzN2NjMzhmY2EyZGI4MTg3
|
14
|
+
YjUxM2QxNDVhZDJjYWExNzRkN2U5YjBhZmMzZWIzZmIxMjY1YWY3ZWYyOWIy
|
15
|
+
MjRkMTBiYmY3YzczZGQyZGFmOTNhNDEyZjhhYjRhOGU5MjhlMjc=
|
@@ -103,13 +103,20 @@ Caboose.Store.Modules.Cart = (function() {
|
|
103
103
|
if (self.$addToCart.length) self.$addToCart.trigger('added');
|
104
104
|
|
105
105
|
if (!self.$addToCart.find('.message').length) {
|
106
|
-
self.$addToCart
|
106
|
+
self.$addToCart
|
107
|
+
.append($('<div/>').hide().addClass('message')
|
108
|
+
.append($('<p/>').text('Successfully added to cart'))
|
109
|
+
.append($('<p/>')
|
110
|
+
.append($('<a/>').attr('href', '/cart').html('View cart')).append(' | ')
|
111
|
+
.append($('<a/>').attr('href', '/checkout').html('Continue to checkout'))
|
112
|
+
)
|
113
|
+
);
|
107
114
|
self.$addToCart.find('.message').fadeIn();
|
108
115
|
Caboose.Store.Modules.Product.$product.trigger('added-to-cart');
|
109
116
|
|
110
|
-
setTimeout(function() {
|
111
|
-
|
112
|
-
},
|
117
|
+
//setTimeout(function() {
|
118
|
+
// self.$addToCart.find('.message').fadeOut(function() { $(this).remove() });
|
119
|
+
//}, 5000);
|
113
120
|
}
|
114
121
|
} else {
|
115
122
|
alert(response.errors[0]);
|
@@ -151,7 +151,7 @@
|
|
151
151
|
line-height: 1.5;
|
152
152
|
margin: 0;
|
153
153
|
padding: 24px 0;
|
154
|
-
width: percentage(1/
|
154
|
+
width: percentage(1/2);
|
155
155
|
text-align: center;
|
156
156
|
&:last-child { border-right: none }
|
157
157
|
p { margin: 0 0 6px }
|
@@ -166,7 +166,7 @@
|
|
166
166
|
background: #821413;
|
167
167
|
}
|
168
168
|
}
|
169
|
-
}
|
169
|
+
}
|
170
170
|
@media screen and (max-width: 896px) {
|
171
171
|
> li {
|
172
172
|
float: none;
|
@@ -2,49 +2,42 @@
|
|
2
2
|
<h2>Checkout</h2>
|
3
3
|
<%= raw checkout_nav(1) %>
|
4
4
|
|
5
|
-
|
6
|
-
<
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
<
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<section id='checkout-login-form'>
|
15
|
-
<div class="wrapper" id='signin_form_container'>
|
16
|
-
<form action="/login" method="post" id='signin_form'>
|
17
|
-
<input name="username" type="text" placeholder="Email" />
|
18
|
-
<input name="password" type="password" placeholder="Password" />
|
19
|
-
<input type="submit" value="Submit" />
|
20
|
-
</form>
|
5
|
+
<% if @logged_in_user.id == 1 %>
|
6
|
+
<p class='note error'>You are logged in as the admin user. Please <a href='/logout'>logout</a> and complete your order as a different user.</p>
|
7
|
+
<% else %>
|
8
|
+
<section id="checkout-login">
|
9
|
+
<div class="wrapper" class='login-choices'>
|
10
|
+
<ul>
|
11
|
+
<li><p>Already a member? </p><button data-login-action="signin" id='signin_button' >Sign in</button></li>
|
12
|
+
<li><p>Continue as a new customer </p><button data-login-action="register" id='register_button' >New Customer</button></li>
|
13
|
+
</ul>
|
21
14
|
</div>
|
22
15
|
|
23
|
-
<
|
24
|
-
<
|
25
|
-
<
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
</
|
16
|
+
<section id='checkout-login-form'>
|
17
|
+
<div class="constrain" id='signin_form_container'>
|
18
|
+
<form action="/login" method="post" id='signin_form'>
|
19
|
+
<p><input name="username" type="text" placeholder="Email" /></p>
|
20
|
+
<p><input name="password" type="password" placeholder="Password" /></p>
|
21
|
+
<p><input type="submit" value="Continue" /></p>
|
22
|
+
</form>
|
23
|
+
</div>
|
24
|
+
<div class="constrain" id='register_form_container'>
|
25
|
+
<form action="/register" method="post" id='register_form'></p>
|
26
|
+
<p><input name="first_name" type="text" placeholder="First Name" /></p>
|
27
|
+
<p><input name="last_name" type="text" placeholder="Last Name" /></p>
|
28
|
+
<p><input name="email" type="text" placeholder="Email" /></p>
|
29
|
+
<p><input name="phone" type="text" placeholder="Phone" /></p>
|
30
|
+
<p><input name="pass1" type="password" placeholder="Password" /></p>
|
31
|
+
<p><input name="pass2" type="password" placeholder="Confirm Password" /></p>
|
32
|
+
<p><input type="submit" value="Continue" /></p>
|
33
|
+
</form>
|
34
|
+
</div>
|
35
|
+
<div class="wrapper">
|
36
|
+
<div id='message'></div>
|
37
|
+
</div>
|
38
|
+
</section>
|
46
39
|
</section>
|
47
|
-
|
40
|
+
<% end %>
|
48
41
|
|
49
42
|
<section id="checkout-continue">
|
50
43
|
<a href="/">return to the store</a>
|
@@ -2,48 +2,53 @@
|
|
2
2
|
sa = @order.shipping_address
|
3
3
|
ba = @order.billing_address
|
4
4
|
%>
|
5
|
-
|
5
|
+
|
6
|
+
<div id="checkout" class='constrain'>
|
6
7
|
<h2>Checkout</h2>
|
7
|
-
<%= raw checkout_nav(2) %>
|
8
|
-
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
<
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
</
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
<
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
<
|
44
|
-
|
45
|
-
|
46
|
-
|
8
|
+
<%= raw checkout_nav(2) %>
|
9
|
+
<% if @logged_in_user.id == 1 %>
|
10
|
+
<p class='note error'>You are logged in as the admin user. Please <a href='/logout'>logout</a> and complete your order as a different user.</p>
|
11
|
+
<% else %>
|
12
|
+
<form action="/checkout/address" method="put" id='address_form'>
|
13
|
+
<section id="checkout-address">
|
14
|
+
<div class="wrapper">
|
15
|
+
<section>
|
16
|
+
<fieldset id="shipping">
|
17
|
+
<h3>Shipping Address</h3>
|
18
|
+
<label><span>First Name </span> <input name="shipping[first_name]" type="text" value="<%= sa ? sa.first_name : "" %>" /></label>
|
19
|
+
<label><span>Last Name </span> <input name="shipping[last_name]" type="text" value="<%= sa ? sa.last_name : "" %>" /></label>
|
20
|
+
<label><span>Company </span> <input name="shipping[company]" type="text" value="<%= sa ? sa.company : "" %>" /></label>
|
21
|
+
<label><span>Address 1 </span> <input name="shipping[address1]" type="text" value="<%= sa ? sa.address1 : "" %>" /></label>
|
22
|
+
<label><span>Address 2 </span> <input name="shipping[address2]" type="text" value="<%= sa ? sa.address2 : "" %>" /></label>
|
23
|
+
<label><span>City </span> <input name="shipping[city]" type="text" value="<%= sa ? sa.city : "" %>" /></label>
|
24
|
+
<label><span>State </span> <select name="shipping[state]"><% Caboose::States.all.each do |abbr, state| %><option value="<%= abbr %>" <%= sa && sa.state == abbr ? 'selected' : "" %>><%= state %></option><% end %></select></label>
|
25
|
+
<label><span>Zip </span> <input name="shipping[zip]" type="text" value="<%= sa ? sa.zip : "" %>" /></label>
|
26
|
+
<label><input name="use_as_billing" type="checkbox" value="false" /> Use as billing address</label>
|
27
|
+
</fieldset>
|
28
|
+
</section>
|
29
|
+
<section>
|
30
|
+
<fieldset id="billing">
|
31
|
+
<h3>Billing Address</h3>
|
32
|
+
<label><span>First Name </span> <input name="billing[first_name]" type="text" value="<%= ba ? ba.first_name : "" %>" /></label>
|
33
|
+
<label><span>Last Name </span> <input name="billing[last_name]" type="text" value="<%= ba ? ba.last_name : "" %>" /></label>
|
34
|
+
<label><span>Company </span> <input name="billing[company]" type="text" value="<%= ba ? ba.company : "" %>" /></label>
|
35
|
+
<label><span>Address 1 </span> <input name="billing[address1]" type="text" value="<%= ba ? ba.address1 : "" %>" /></label>
|
36
|
+
<label><span>Address 2 </span> <input name="billing[address2]" type="text" value="<%= ba ? ba.address2 : "" %>" /></label>
|
37
|
+
<label><span>City </span> <input name="billing[city]" type="text" value="<%= ba ? ba.city : "" %>" /></label>
|
38
|
+
<label><span>State </span> <select name="billing[state]"><% Caboose::States.all.each do |abbr, state| %><option value="<%= abbr %>" <%= ba && ba.state == abbr ? 'selected' : "" %>><%= state %></option><% end %></select></label>
|
39
|
+
<label><span>Zip </span> <input name="billing[zip]" type="text" value="<%= ba ? ba.zip : "" %>" /></label>
|
40
|
+
</fieldset>
|
41
|
+
</section>
|
42
|
+
</div>
|
43
|
+
</section>
|
44
|
+
<section id="checkout-continue">
|
45
|
+
<div id='message'></div>
|
46
|
+
<button class="blue">Continue</button>
|
47
|
+
<em>or</em>
|
48
|
+
<a href="/">return to the store</a>
|
49
|
+
</section>
|
50
|
+
</form>
|
51
|
+
<% end %>
|
47
52
|
</div>
|
48
53
|
|
49
54
|
<%= content_for :caboose_js do %>
|
data/lib/caboose/version.rb
CHANGED