caboose-cms 0.4.151 → 0.5.1
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/admin_products.js +79 -0
- data/app/assets/javascripts/caboose/application.js +2 -1
- data/app/assets/javascripts/caboose/cart.js +168 -0
- data/app/assets/javascripts/caboose/checkout.js +151 -0
- data/app/assets/javascripts/caboose/checkout_module.js +312 -0
- data/app/assets/javascripts/caboose/checkout_step1.js +179 -0
- data/app/assets/javascripts/caboose/checkout_step2.js +39 -0
- data/app/assets/javascripts/caboose/checkout_step3.js +34 -0
- data/app/assets/javascripts/caboose/checkout_step4.js +97 -0
- data/app/assets/javascripts/caboose/main.js +99 -8
- data/app/assets/javascripts/caboose/product.js +284 -0
- data/app/assets/stylesheets/caboose/admin_products.css +86 -0
- data/app/assets/templates/caboose/cart/add_to_cart.jst.ejs +7 -0
- data/app/assets/templates/caboose/cart/line_items.jst.ejs +41 -0
- data/app/assets/templates/caboose/checkout/address.jst.ejs +53 -0
- data/app/assets/templates/caboose/checkout/forms/guest.jst.ejs +8 -0
- data/app/assets/templates/caboose/checkout/forms/register.jst.ejs +11 -0
- data/app/assets/templates/caboose/checkout/forms/signin.jst.ejs +7 -0
- data/app/assets/templates/caboose/checkout/line_items.jst.ejs +31 -0
- data/app/assets/templates/caboose/checkout/login.jst.ejs +21 -0
- data/app/assets/templates/caboose/checkout/payment.jst.ejs +5 -0
- data/app/assets/templates/caboose/checkout/shipping.jst.ejs +18 -0
- data/app/assets/templates/caboose/product/images.jst.ejs +8 -0
- data/app/assets/templates/caboose/product/options.jst.ejs +19 -0
- data/app/controllers/caboose/application_controller.rb +29 -1
- data/app/controllers/caboose/cart_controller.rb +52 -0
- data/app/controllers/caboose/categories_controller.rb +108 -0
- data/app/controllers/caboose/checkout_controller.rb +325 -0
- data/app/controllers/caboose/orders_controller.rb +439 -0
- data/app/controllers/caboose/product_images_controller.rb +38 -0
- data/app/controllers/caboose/products_controller.rb +737 -0
- data/app/controllers/caboose/reviews_controller.rb +15 -0
- data/app/controllers/caboose/variants_controller.rb +218 -0
- data/app/controllers/caboose/vendors_controller.rb +73 -0
- data/app/helpers/caboose/application_helper.rb +4 -0
- data/app/helpers/caboose/categories_helper.rb +82 -0
- data/app/helpers/caboose/checkout_helper.rb +20 -0
- data/app/helpers/caboose/products_helper.rb +8 -0
- data/app/mailers/caboose/orders_mailer.rb +30 -0
- data/app/models/caboose/address.rb +26 -0
- data/app/models/caboose/category.rb +89 -0
- data/app/models/caboose/category_membership.rb +10 -0
- data/app/models/caboose/core_plugin.rb +15 -37
- data/app/models/caboose/customization_membership.rb +10 -0
- data/app/models/caboose/discount.rb +16 -0
- data/app/models/caboose/line_item.rb +81 -0
- data/app/models/caboose/message.rb +20 -0
- data/app/models/caboose/order.rb +191 -0
- data/app/models/caboose/order_discount.rb +10 -0
- data/app/models/caboose/order_pdf.rb +78 -0
- data/app/models/caboose/payment_processors/authorizenet.rb +53 -0
- data/app/models/caboose/payment_processors/base.rb +39 -0
- data/app/models/caboose/payment_processors/payscape.rb +94 -0
- data/app/models/caboose/product.rb +145 -0
- data/app/models/caboose/product_image.rb +62 -0
- data/app/models/caboose/product_image_variant.rb +10 -0
- data/app/models/caboose/review.rb +13 -0
- data/app/models/caboose/schema.rb +205 -1
- data/app/models/caboose/search_filter.rb +191 -0
- data/app/models/caboose/shipping_calculator.rb +81 -0
- data/app/models/caboose/states.rb +61 -52
- data/app/models/caboose/tax_calculator.rb +23 -0
- data/app/models/caboose/tax_line.rb +9 -0
- data/app/models/caboose/variant.rb +99 -0
- data/app/models/caboose/vendor.rb +22 -0
- data/app/views/caboose/cart/index.html.erb +8 -0
- data/app/views/caboose/categories/admin_edit.html.erb +79 -0
- data/app/views/caboose/categories/admin_index.html.erb +11 -0
- data/app/views/caboose/categories/admin_new.html.erb +62 -0
- data/app/views/caboose/checkout/_address_form.html.erb +111 -0
- data/app/views/caboose/checkout/_billing_form.html.erb +47 -0
- data/app/views/caboose/checkout/_cart.html.erb +52 -0
- data/app/views/caboose/checkout/_confirm.html.erb +61 -0
- data/app/views/caboose/checkout/_order_discount.html.erb +40 -0
- data/app/views/caboose/checkout/_shipping_address.html.erb +10 -0
- data/app/views/caboose/checkout/_shipping_method.html.erb +2 -0
- data/app/views/caboose/checkout/_shipping_method_form.html.erb +21 -0
- data/app/views/caboose/checkout/billing.html.erb +11 -0
- data/app/views/caboose/checkout/discount.html.erb +11 -0
- data/app/views/caboose/checkout/empty.html.erb +2 -0
- data/app/views/caboose/checkout/error.html.erb +2 -0
- data/app/views/caboose/checkout/index.html.erb +43 -0
- data/app/views/caboose/checkout/login.html.erb +2 -0
- data/app/views/caboose/checkout/payment.html.erb +79 -0
- data/app/views/caboose/checkout/relay.html.erb +23 -0
- data/app/views/caboose/checkout/relay_old.html.erb +12 -0
- data/app/views/caboose/checkout/relay_postMessage.html.erb +19 -0
- data/app/views/caboose/checkout/shipping.html.erb +15 -0
- data/app/views/caboose/checkout/step_four.html.erb +93 -0
- data/app/views/caboose/checkout/step_one.html.erb +56 -0
- data/app/views/caboose/checkout/step_one_old.html.erb +13 -0
- data/app/views/caboose/checkout/step_three.html.erb +23 -0
- data/app/views/caboose/checkout/step_two.html.erb +52 -0
- data/app/views/caboose/checkout/step_two_old.html.erb +14 -0
- data/app/views/caboose/checkout/thanks.html.erb +5 -0
- data/app/views/caboose/orders/_admin_footer.html.erb +2 -0
- data/app/views/caboose/orders/_admin_header.html.erb +31 -0
- data/app/views/caboose/orders/_quickbooks_order.html.erb +0 -0
- data/app/views/caboose/orders/admin_delete_form.html.erb +21 -0
- data/app/views/caboose/orders/admin_edit.html.erb +271 -0
- data/app/views/caboose/orders/admin_index.html.erb +89 -0
- data/app/views/caboose/orders/admin_new.html.erb +42 -0
- data/app/views/caboose/orders/admin_print.html.erb +72 -0
- data/app/views/caboose/orders_mailer/customer_new_order.html.erb +1 -0
- data/app/views/caboose/orders_mailer/customer_status_updated.html.erb +1 -0
- data/app/views/caboose/orders_mailer/fulfillment_new_order.html.erb +1 -0
- data/app/views/caboose/orders_mailer/shipping_order_ready.html.erb +1 -0
- data/app/views/caboose/products/_admin_footer.html.erb +2 -0
- data/app/views/caboose/products/_admin_header.html.erb +32 -0
- data/app/views/caboose/products/_sort_options.html.erb +19 -0
- data/app/views/caboose/products/admin_add_upcs.html.erb +58 -0
- data/app/views/caboose/products/admin_delete_form.html.erb +21 -0
- data/app/views/caboose/products/admin_edit_categories.html.erb +73 -0
- data/app/views/caboose/products/admin_edit_category_images.html.erb +233 -0
- data/app/views/caboose/products/admin_edit_description.html.erb +38 -0
- data/app/views/caboose/products/admin_edit_general.html.erb +104 -0
- data/app/views/caboose/products/admin_edit_images.html.erb +236 -0
- data/app/views/caboose/products/admin_edit_options.html.erb +51 -0
- data/app/views/caboose/products/admin_edit_seo.html.erb +37 -0
- data/app/views/caboose/products/admin_edit_variant_columns.html.erb +75 -0
- data/app/views/caboose/products/admin_edit_variant_sort_order.html.erb +63 -0
- data/app/views/caboose/products/admin_edit_variants.html.erb +171 -0
- data/app/views/caboose/products/admin_edit_variants_single.html.erb +68 -0
- data/app/views/caboose/products/admin_group_variants.html.erb +433 -0
- data/app/views/caboose/products/admin_index.html.erb +95 -0
- data/app/views/caboose/products/admin_new.html.erb +41 -0
- data/app/views/caboose/products/admin_sort.html copy.erb +155 -0
- data/app/views/caboose/products/admin_sort.html.erb +254 -0
- data/app/views/caboose/products/details.html.erb +438 -0
- data/app/views/caboose/products/index.html.erb +46 -0
- data/app/views/caboose/products/not_available.html.erb +35 -0
- data/app/views/caboose/variants/admin_edit.html.erb +82 -0
- data/app/views/caboose/variants/admin_group.html.erb +184 -0
- data/app/views/caboose/variants/admin_new.html.erb +59 -0
- data/app/views/caboose/vendors/admin_edit.html.erb +24 -0
- data/app/views/caboose/vendors/admin_index.html.erb +30 -0
- data/app/views/caboose/vendors/admin_new.html.erb +34 -0
- data/app/views/layouts/caboose/store/_banner.html.erb +10 -0
- data/app/views/layouts/caboose/store/_banner2.html.erb +10 -0
- data/app/views/layouts/caboose/store/_footer.html.erb +55 -0
- data/app/views/layouts/caboose/store/_header.html.erb +69 -0
- data/app/views/layouts/caboose/store/_sidebar.html.erb +27 -0
- data/app/views/layouts/caboose/store/application.html.erb +33 -0
- data/app/views/layouts/caboose/store/authorize_net.erb +18 -0
- data/app/views/layouts/caboose/store/layout_about.html.erb +42 -0
- data/app/views/layouts/caboose/store/layout_blog.html.erb +159 -0
- data/app/views/layouts/caboose/store/layout_confirm.html.erb +85 -0
- data/app/views/layouts/caboose/store/layout_contact.html.erb +38 -0
- data/app/views/layouts/caboose/store/layout_default.html.erb +10 -0
- data/app/views/layouts/caboose/store/layout_detail.html.erb +114 -0
- data/app/views/layouts/caboose/store/layout_order.html.erb +77 -0
- data/app/views/layouts/caboose/store/layout_pricing.html.erb +182 -0
- data/app/views/layouts/caboose/store/layout_product.html.erb +110 -0
- data/app/views/layouts/caboose/store/layout_profile.html.erb +55 -0
- data/app/views/layouts/caboose/store/layout_single.html.erb +3 -0
- data/app/views/layouts/caboose/store/layout_testimonial.html.erb +110 -0
- data/app/views/layouts/caboose/store/layout_testing.html.erb +4 -0
- data/config/routes.rb +126 -0
- data/lib/caboose.rb +46 -1
- data/lib/caboose/engine.rb +39 -1
- data/lib/caboose/version.rb +1 -1
- data/lib/tasks/caboose.rake +12 -0
- metadata +151 -4
- data/app/assets/javascripts/caboose/admin_page_edit_content_bak.js +0 -164
- data/app/assets/javascripts/caboose/model/#Untitled-1# +0 -2
@@ -0,0 +1,43 @@
|
|
1
|
+
<h3>Checkout2</h3>
|
2
|
+
<%= render :partial => '/caboose/checkout/cart' %>
|
3
|
+
<%= render :partial => '/caboose/checkout/address_form' %>
|
4
|
+
|
5
|
+
<% content_for :caboose_css do %>
|
6
|
+
<style>
|
7
|
+
|
8
|
+
/* Table */
|
9
|
+
|
10
|
+
table#cart { border-collapse: collapse; }
|
11
|
+
table#cart td { border: #666 1px dotted; padding: 4px 8px; }
|
12
|
+
table#cart th { font-weight: bold; text-align: center; }
|
13
|
+
|
14
|
+
/* Form */
|
15
|
+
|
16
|
+
form#address {
|
17
|
+
overflow: hidden;
|
18
|
+
width: 100%;
|
19
|
+
}
|
20
|
+
|
21
|
+
form#address label {
|
22
|
+
display: inline-block;
|
23
|
+
margin-right: 12px;
|
24
|
+
min-width: 100px;
|
25
|
+
text-align: right;
|
26
|
+
}
|
27
|
+
form#address input { width: 200px; }
|
28
|
+
|
29
|
+
form#address fieldset {
|
30
|
+
width: 100%;
|
31
|
+
min-width: 320px;
|
32
|
+
}
|
33
|
+
form#address fieldset#billing { display: none; }
|
34
|
+
|
35
|
+
@media all and (min-width: 768px) {
|
36
|
+
form#address fieldset {
|
37
|
+
float: left;
|
38
|
+
width: 50%;
|
39
|
+
}
|
40
|
+
}
|
41
|
+
|
42
|
+
</style>
|
43
|
+
<% end %>
|
@@ -0,0 +1,79 @@
|
|
1
|
+
<% if Caboose::payment_processor == 'authorize.net' %>
|
2
|
+
<form id="payment" target="relay" action="<%= Caboose::PaymentProcessor.form_url(@order) %>" method="post">
|
3
|
+
<%= sim_fields(@sim_transaction) %>
|
4
|
+
<label>Card Number</label>
|
5
|
+
<input name="x_card_num" type="text" />
|
6
|
+
<label>Expiration</label>
|
7
|
+
<input id="expiration" name="x_exp_date" type="hidden" />
|
8
|
+
|
9
|
+
<br />
|
10
|
+
|
11
|
+
<select id="month" name="month">
|
12
|
+
<option value="01">01 - Jan</option>
|
13
|
+
<option value="02">02 - Feb</option>
|
14
|
+
<option value="03">03 - Mar</option>
|
15
|
+
<option value="04">04 - Apr</option>
|
16
|
+
<option value="05">05 - May</option>
|
17
|
+
<option value="06">06 - Jun</option>
|
18
|
+
<option value="07">07 - Jul</option>
|
19
|
+
<option value="08">08 - Aug</option>
|
20
|
+
<option value="09">09 - Sep</option>
|
21
|
+
<option value="10">10 - Oct</option>
|
22
|
+
<option value="11">11 - Nov</option>
|
23
|
+
<option value="12">12 - Dec</option>
|
24
|
+
</select>
|
25
|
+
/
|
26
|
+
<select id="year" name="year">
|
27
|
+
<% (DateTime.now.year...DateTime.now.year + 20).each do |i| %>
|
28
|
+
<option value="<%= i-2000 %>"><%= i %></option>
|
29
|
+
<% end %>
|
30
|
+
</select>
|
31
|
+
|
32
|
+
<br />
|
33
|
+
|
34
|
+
<label>Security Code</label>
|
35
|
+
<input id="x_card_code" name="x_card_code" type="text" />
|
36
|
+
<input type="submit" value="Submit" />
|
37
|
+
</form>
|
38
|
+
<% end %>
|
39
|
+
|
40
|
+
<% if Caboose::payment_processor == 'payscape' %>
|
41
|
+
<form id="payment" action="<%= @form_url %>" method="post" target="relay">
|
42
|
+
<input id="billing-amount" type="hidden" value="<%= @order.total %>" />
|
43
|
+
<input id="expiration" name="billing-cc-exp" type="hidden" />
|
44
|
+
|
45
|
+
<div>
|
46
|
+
<label for="billing-cc-number">Card number:</label>
|
47
|
+
<input id="billing-cc-number" name="billing-cc-number" type="text" maxlength="16" />
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<div>
|
51
|
+
<label for="billing-expiration-month">Expiration:</label>
|
52
|
+
<select name="month">
|
53
|
+
<option value="01">01 - Jan</option>
|
54
|
+
<option value="02">02 - Feb</option>
|
55
|
+
<option value="03">03 - Mar</option>
|
56
|
+
<option value="04">04 - Apr</option>
|
57
|
+
<option value="05">05 - May</option>
|
58
|
+
<option value="06">06 - Jun</option>
|
59
|
+
<option value="07">07 - Jul</option>
|
60
|
+
<option value="08">08 - Aug</option>
|
61
|
+
<option value="09">09 - Sep</option>
|
62
|
+
<option value="10">10 - Oct</option>
|
63
|
+
<option value="11">11 - Nov</option>
|
64
|
+
<option value="12">12 - Dec</option>
|
65
|
+
</select>
|
66
|
+
/
|
67
|
+
<select name="year">
|
68
|
+
<% (DateTime.now.year...DateTime.now.year + 20).each do |i| %>
|
69
|
+
<option value="<%= i-2000 %>"><%= i %></option>
|
70
|
+
<% end %>
|
71
|
+
</select>
|
72
|
+
</div>
|
73
|
+
|
74
|
+
<!--<input type="submit" value="Submit" />-->
|
75
|
+
</form>
|
76
|
+
<% end %>
|
77
|
+
|
78
|
+
<iframe id="relay" name="relay"></iframe>
|
79
|
+
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<!DOCTYPE>
|
2
|
+
<html>
|
3
|
+
<body>
|
4
|
+
<% if Caboose::payment_processor == 'payscape' %>
|
5
|
+
<script type="text/javascript">
|
6
|
+
parent.relay_handler({
|
7
|
+
"success": <%= @success %>,
|
8
|
+
"message": "<%= @message %>"
|
9
|
+
});
|
10
|
+
</script>
|
11
|
+
<% end %>
|
12
|
+
|
13
|
+
<% if Caboose::payment_processor == 'authorize.net' %>
|
14
|
+
<script>
|
15
|
+
parent.postMessage({
|
16
|
+
"success": <%= @success %>,
|
17
|
+
"message": "<%= @message %>"
|
18
|
+
}, "<%= Caboose::store_url %>");
|
19
|
+
</script>
|
20
|
+
<% end %>
|
21
|
+
</body>
|
22
|
+
</html>
|
23
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!DOCTYPE>
|
2
|
+
<html>
|
3
|
+
<body>
|
4
|
+
<script id="response" type="application/json">
|
5
|
+
{
|
6
|
+
success: <%= @success %>,
|
7
|
+
message: '<%= @message %>'
|
8
|
+
}
|
9
|
+
</script>
|
10
|
+
|
11
|
+
<script>
|
12
|
+
parent.postMessage({
|
13
|
+
success: <%= @success %>,
|
14
|
+
message: '<%= @message %>'
|
15
|
+
}, '<%= Caboose::store_url %>');
|
16
|
+
</script>
|
17
|
+
</body>
|
18
|
+
</html>
|
19
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<h3>Checkout</h3>
|
2
|
+
<%= render :partial => '/caboose/checkout/cart' %>
|
3
|
+
|
4
|
+
<h2>Shipping Address</h2>
|
5
|
+
<%= render :partial => '/caboose/checkout/shipping_address' %>
|
6
|
+
|
7
|
+
<h2>Shipping Method</h2>
|
8
|
+
<%= render :partial => '/caboose/checkout/shipping_method_form' %>
|
9
|
+
|
10
|
+
<% content_for :caboose_css do %>
|
11
|
+
<style>
|
12
|
+
form#shipping-rates label { display: inline; }
|
13
|
+
form#shipping-rates input[type=submit] { margin-top: 12px; }
|
14
|
+
</style>
|
15
|
+
<% end %>
|
@@ -0,0 +1,93 @@
|
|
1
|
+
<div id="checkout">
|
2
|
+
<h2>Checkout</h2>
|
3
|
+
<%= raw checkout_nav(4) %>
|
4
|
+
<%= render :partial => 'caboose/checkout/confirm' %>
|
5
|
+
<section id="checkout-payment">
|
6
|
+
<div class="wrapper">
|
7
|
+
<% if Caboose::payment_processor == 'authorize.net' %>
|
8
|
+
<form id="payment" target="relay" action="<%= Caboose::PaymentProcessor.form_url(@order) %>" method="post">
|
9
|
+
<%= sim_fields(@sim_transaction) %>
|
10
|
+
|
11
|
+
<label>Card Number</label>
|
12
|
+
<input name="x_card_num" type="text" maxlength="16" />
|
13
|
+
<!--<br />
|
14
|
+
<label>Security Code</label><br />
|
15
|
+
<input id="x_card_code" name="x_card_code" type="text" />-->
|
16
|
+
<br />
|
17
|
+
|
18
|
+
<label>Expiration</label>
|
19
|
+
<input id="expiration" name="x_exp_date" type="hidden" />
|
20
|
+
<select id="month" name="month">
|
21
|
+
<option value="01">01 - Jan</option>
|
22
|
+
<option value="02">02 - Feb</option>
|
23
|
+
<option value="03">03 - Mar</option>
|
24
|
+
<option value="04">04 - Apr</option>
|
25
|
+
<option value="05">05 - May</option>
|
26
|
+
<option value="06">06 - Jun</option>
|
27
|
+
<option value="07">07 - Jul</option>
|
28
|
+
<option value="08">08 - Aug</option>
|
29
|
+
<option value="09">09 - Sep</option>
|
30
|
+
<option value="10">10 - Oct</option>
|
31
|
+
<option value="11">11 - Nov</option>
|
32
|
+
<option value="12">12 - Dec</option>
|
33
|
+
</select>
|
34
|
+
/
|
35
|
+
<select id="year" name="year">
|
36
|
+
<% (DateTime.now.year...DateTime.now.year + 20).each do |i| %>
|
37
|
+
<option value="<%= i-2000 %>"><%= i %></option>
|
38
|
+
<% end %>
|
39
|
+
</select><br />
|
40
|
+
<br />
|
41
|
+
<input type="submit" value="Submit" />
|
42
|
+
</form>
|
43
|
+
<% end %>
|
44
|
+
|
45
|
+
<% if Caboose::payment_processor == 'payscape' %>
|
46
|
+
<form id="payment" action="<%= @form_url %>" method="post" target="relay">
|
47
|
+
<input id="billing-amount" type="hidden" value="<%= @order.total %>" />
|
48
|
+
<input id="expiration" name="billing-cc-exp" type="hidden" />
|
49
|
+
<div>
|
50
|
+
<label for="billing-cc-number">Card number:</label>
|
51
|
+
<input id="billing-cc-number" name="billing-cc-number" type="text" maxlength="16" />
|
52
|
+
</div>
|
53
|
+
<div>
|
54
|
+
<label for="billing-expiration-month">Expiration:</label>
|
55
|
+
<select name="month">
|
56
|
+
<option value="01">01 - Jan</option>
|
57
|
+
<option value="02">02 - Feb</option>
|
58
|
+
<option value="03">03 - Mar</option>
|
59
|
+
<option value="04">04 - Apr</option>
|
60
|
+
<option value="05">05 - May</option>
|
61
|
+
<option value="06">06 - Jun</option>
|
62
|
+
<option value="07">07 - Jul</option>
|
63
|
+
<option value="08">08 - Aug</option>
|
64
|
+
<option value="09">09 - Sep</option>
|
65
|
+
<option value="10">10 - Oct</option>
|
66
|
+
<option value="11">11 - Nov</option>
|
67
|
+
<option value="12">12 - Dec</option>
|
68
|
+
</select>
|
69
|
+
/
|
70
|
+
<select name="year">
|
71
|
+
<% (DateTime.now.year...DateTime.now.year + 20).each do |i| %>
|
72
|
+
<option value="<%= i-2000 %>"><%= i %></option>
|
73
|
+
<% end %>
|
74
|
+
</select>
|
75
|
+
</div>
|
76
|
+
|
77
|
+
<!--<input type="submit" value="Submit" />-->
|
78
|
+
</form>
|
79
|
+
<% end %>
|
80
|
+
</div>
|
81
|
+
</section>
|
82
|
+
<section id="checkout-continue">
|
83
|
+
<div id='message'></div>
|
84
|
+
<button class="blue">Continue</button>
|
85
|
+
<em>or</em>
|
86
|
+
<a href="/">return to the store</a>
|
87
|
+
</section>
|
88
|
+
<iframe id="relay" name="relay"></iframe>
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<%= content_for :caboose_js do %>
|
92
|
+
<%= javascript_include_tag 'caboose/modules/checkout_step4' %>
|
93
|
+
<% end %>
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<div id="checkout">
|
2
|
+
<h2>Checkout</h2>
|
3
|
+
<%= raw checkout_nav(1) %>
|
4
|
+
|
5
|
+
<section id="checkout-login">
|
6
|
+
<div class="wrapper" class='login-choices'>
|
7
|
+
<ul>
|
8
|
+
<li><p>Already a member </p><button data-login-action="signin" id='signin_button' >Sign in</button></li>
|
9
|
+
<li><p>Sign up for all of our member benefits </p><button data-login-action="register" id='register_button' >New Customer</button></li>
|
10
|
+
<li><p>No thanks </p><button data-login-action="guest" id='guest_button' >Continue As Guest</button></li>
|
11
|
+
</ul>
|
12
|
+
</div>
|
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>
|
21
|
+
</div>
|
22
|
+
|
23
|
+
<div class="wrapper" id='register_form_container'>
|
24
|
+
<form action="/register" method="post" id='register_form'>
|
25
|
+
<input name="first_name" type="text" placeholder="First Name" />
|
26
|
+
<input name="last_name" type="text" placeholder="Last Name" />
|
27
|
+
<input name="email" type="text" placeholder="Email" />
|
28
|
+
<input name="phone" type="text" placeholder="Phone" />
|
29
|
+
<input name="pass1" type="password" placeholder="Password" />
|
30
|
+
<input name="pass2" type="password" placeholder="Confirm Password" />
|
31
|
+
<input type="submit" value="Submit" />
|
32
|
+
</form>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div class="wrapper" id='guest_form_container'>
|
36
|
+
<form action="/checkout/attach-guest" method="post" id='guest_form'>
|
37
|
+
<input name="email" type="text" placeholder="Email" />
|
38
|
+
<input name="confirm_email" type="email" placeholder="Confirm email" />
|
39
|
+
<input type="submit" value="Submit" />
|
40
|
+
</form>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div class="wrapper">
|
44
|
+
<div id='message'></div>
|
45
|
+
</div>
|
46
|
+
</section>
|
47
|
+
</section>
|
48
|
+
|
49
|
+
<section id="checkout-continue">
|
50
|
+
<a href="/">return to the store</a>
|
51
|
+
</section>
|
52
|
+
</div>
|
53
|
+
|
54
|
+
<%= content_for :caboose_js do %>
|
55
|
+
<%= javascript_include_tag 'caboose/modules/checkout_step1' %>
|
56
|
+
<% end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<div id="checkout" class="loading">
|
2
|
+
<header>Checkout Step 1 of 3</header>
|
3
|
+
<section id="checkout-line-items"></section>
|
4
|
+
<figure class="loading"></figure>
|
5
|
+
<section id="checkout-login"></section>
|
6
|
+
<section id="checkout-address"></section>
|
7
|
+
|
8
|
+
<section id="checkout-continue">
|
9
|
+
<button class="blue">Continue</button>
|
10
|
+
<em>or</em>
|
11
|
+
<a href="/">return to the store</a>
|
12
|
+
</section>
|
13
|
+
</div>
|
@@ -0,0 +1,23 @@
|
|
1
|
+
<div id="checkout">
|
2
|
+
<h2>Checkout</h2>
|
3
|
+
<%= raw checkout_nav(3) %>
|
4
|
+
<section id="checkout-shipping">
|
5
|
+
<div class="wrapper">
|
6
|
+
<p>Please select how you would like your products to be delivered</p>
|
7
|
+
<% @rates.each do |rate| %>
|
8
|
+
<button class="blue" data-shipping-code="<%= rate[:service_code] %>" data-shipping-method="<%= rate[:service_name] %>">
|
9
|
+
<%= number_to_currency(rate[:total_price], :precision => 2) %><br /><%= rate[:service_name] %>
|
10
|
+
</button>
|
11
|
+
<% end %>
|
12
|
+
</select>
|
13
|
+
</div>
|
14
|
+
</section>
|
15
|
+
<section id="checkout-continue">
|
16
|
+
<div id='message'></div>
|
17
|
+
<a href="/">return to the store</a>
|
18
|
+
</section>
|
19
|
+
</div>
|
20
|
+
|
21
|
+
<%= content_for :caboose_js do %>
|
22
|
+
<%= javascript_include_tag 'caboose/modules/checkout_step3' %>
|
23
|
+
<% end %>
|
@@ -0,0 +1,52 @@
|
|
1
|
+
<%
|
2
|
+
sa = @order.shipping_address
|
3
|
+
ba = @order.billing_address
|
4
|
+
%>
|
5
|
+
<div id="checkout">
|
6
|
+
<h2>Checkout</h2>
|
7
|
+
<%= raw checkout_nav(2) %>
|
8
|
+
<form action="/checkout/address" method="put" id='address_form'>
|
9
|
+
<section id="checkout-address">
|
10
|
+
<div class="wrapper">
|
11
|
+
<section>
|
12
|
+
<fieldset id="shipping">
|
13
|
+
<h3>Shipping Address</h3>
|
14
|
+
<label><span>First Name </span> <input name="shipping[first_name]" type="text" value="<%= sa ? sa.first_name : "" %>" /></label>
|
15
|
+
<label><span>Last Name </span> <input name="shipping[last_name]" type="text" value="<%= sa ? sa.last_name : "" %>" /></label>
|
16
|
+
<label><span>Company </span> <input name="shipping[company]" type="text" value="<%= sa ? sa.company : "" %>" /></label>
|
17
|
+
<label><span>Address 1 </span> <input name="shipping[address1]" type="text" value="<%= sa ? sa.address1 : "" %>" /></label>
|
18
|
+
<label><span>Address 2 </span> <input name="shipping[address2]" type="text" value="<%= sa ? sa.address2 : "" %>" /></label>
|
19
|
+
<label><span>City </span> <input name="shipping[city]" type="text" value="<%= sa ? sa.city : "" %>" /></label>
|
20
|
+
<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>
|
21
|
+
<label><span>Zip </span> <input name="shipping[zip]" type="text" value="<%= sa ? sa.zip : "" %>" /></label>
|
22
|
+
<label><input name="use_as_billing" type="checkbox" value="false" /> Use as billing address</label>
|
23
|
+
</fieldset>
|
24
|
+
</section>
|
25
|
+
<section>
|
26
|
+
<fieldset id="billing">
|
27
|
+
<h3>Billing Address</h3>
|
28
|
+
<label><span>First Name </span> <input name="billing[first_name]" type="text" value="<%= ba ? ba.first_name : "" %>" /></label>
|
29
|
+
<label><span>Last Name </span> <input name="billing[last_name]" type="text" value="<%= ba ? ba.last_name : "" %>" /></label>
|
30
|
+
<label><span>Company </span> <input name="billing[company]" type="text" value="<%= ba ? ba.company : "" %>" /></label>
|
31
|
+
<label><span>Address 1 </span> <input name="billing[address1]" type="text" value="<%= ba ? ba.address1 : "" %>" /></label>
|
32
|
+
<label><span>Address 2 </span> <input name="billing[address2]" type="text" value="<%= ba ? ba.address2 : "" %>" /></label>
|
33
|
+
<label><span>City </span> <input name="billing[city]" type="text" value="<%= ba ? ba.city : "" %>" /></label>
|
34
|
+
<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>
|
35
|
+
<label><span>Zip </span> <input name="billing[zip]" type="text" value="<%= ba ? ba.zip : "" %>" /></label>
|
36
|
+
</fieldset>
|
37
|
+
</section>
|
38
|
+
</div>
|
39
|
+
</section>
|
40
|
+
<section id="checkout-continue">
|
41
|
+
<div id='message'></div>
|
42
|
+
<button class="blue">Continue</button>
|
43
|
+
<em>or</em>
|
44
|
+
<a href="/">return to the store</a>
|
45
|
+
</section>
|
46
|
+
</form>
|
47
|
+
</div>
|
48
|
+
|
49
|
+
<%= content_for :caboose_js do %>
|
50
|
+
<%= javascript_include_tag 'caboose/modules/checkout_step2' %>
|
51
|
+
<% end %>
|
52
|
+
|