caboose-store 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.md +113 -0
- data/Rakefile +38 -0
- data/app/assets/images/caboose_store/caboose_logo_small.png +0 -0
- data/app/assets/images/caboose_store/caboose_nav.png +0 -0
- data/app/assets/images/caboose_store/caboose_nav_black.png +0 -0
- data/app/assets/images/caboose_store/default_user_pic.png +0 -0
- data/app/assets/images/caboose_store/loading_green.gif +0 -0
- data/app/assets/images/caboose_store/loading_small_white_on_black.gif +0 -0
- data/app/assets/images/caboose_store/loading_white_on_black.gif +0 -0
- data/app/assets/javascripts/caboose_store/admin.js +20 -0
- data/app/assets/javascripts/caboose_store/application.js +17 -0
- data/app/assets/javascripts/caboose_store/modal.js +52 -0
- data/app/assets/javascripts/caboose_store/modal_integration.js +25 -0
- data/app/assets/javascripts/caboose_store/model.form.page.js +30 -0
- data/app/assets/javascripts/caboose_store/model.form.user.js +36 -0
- data/app/assets/javascripts/caboose_store/shortcut.js +11 -0
- data/app/assets/javascripts/caboose_store/station.js +60 -0
- data/app/assets/stylesheets/caboose_store/admin.css +100 -0
- data/app/assets/stylesheets/caboose_store/application.css +19 -0
- data/app/assets/stylesheets/caboose_store/bound_input.css +1 -0
- data/app/assets/stylesheets/caboose_store/caboose.css +4 -0
- data/app/assets/stylesheets/caboose_store/fonts/big_noodle_titling.ttf +0 -0
- data/app/assets/stylesheets/caboose_store/fonts/big_noodle_titling_oblique.ttf +0 -0
- data/app/assets/stylesheets/caboose_store/fonts.css +5 -0
- data/app/assets/stylesheets/caboose_store/login.css +23 -0
- data/app/assets/stylesheets/caboose_store/modal.css +240 -0
- data/app/assets/stylesheets/caboose_store/page_bar_generator.css +34 -0
- data/app/assets/stylesheets/caboose_store/register.css +25 -0
- data/app/assets/stylesheets/caboose_store/station_modal.css +104 -0
- data/app/assets/stylesheets/caboose_store/station_sidebar.css +232 -0
- data/app/assets/stylesheets/caboose_store/tinymce.css +25 -0
- data/app/controllers/caboose_store/application_controller.rb +18 -0
- data/app/controllers/caboose_store/cart_controller.rb +59 -0
- data/app/controllers/caboose_store/categories_controller.rb +128 -0
- data/app/controllers/caboose_store/checkout_controller.rb +164 -0
- data/app/controllers/caboose_store/orders_controller.rb +264 -0
- data/app/controllers/caboose_store/product_images_controller.rb +38 -0
- data/app/controllers/caboose_store/products_controller.rb +387 -0
- data/app/controllers/caboose_store/reviews_controller.rb +15 -0
- data/app/controllers/caboose_store/variants_controller.rb +152 -0
- data/app/helpers/caboose_store/application_helper.rb +46 -0
- data/app/helpers/caboose_store/cart_helper.rb +28 -0
- data/app/helpers/caboose_store/categories_helper.rb +38 -0
- data/app/helpers/caboose_store/products_helper.rb +87 -0
- data/app/mailers/caboose_store/orders_mailer.rb +36 -0
- data/app/models/caboose_store/address.rb +30 -0
- data/app/models/caboose_store/caboose_store_plugin.rb +22 -0
- data/app/models/caboose_store/category.rb +63 -0
- data/app/models/caboose_store/category_membership.rb +11 -0
- data/app/models/caboose_store/discount.rb +14 -0
- data/app/models/caboose_store/message.rb +22 -0
- data/app/models/caboose_store/order.rb +97 -0
- data/app/models/caboose_store/order_discount.rb +11 -0
- data/app/models/caboose_store/order_line_item.rb +13 -0
- data/app/models/caboose_store/order_pdf.rb +82 -0
- data/app/models/caboose_store/product.rb +78 -0
- data/app/models/caboose_store/product_image.rb +25 -0
- data/app/models/caboose_store/product_image_variant.rb +10 -0
- data/app/models/caboose_store/review.rb +13 -0
- data/app/models/caboose_store/schema.rb +146 -0
- data/app/models/caboose_store/shipping_calculator.rb +79 -0
- data/app/models/caboose_store/states.rb +60 -0
- data/app/models/caboose_store/tax_calculator.rb +26 -0
- data/app/models/caboose_store/tax_line.rb +12 -0
- data/app/models/caboose_store/variant.rb +42 -0
- data/app/models/caboose_store/vendor.rb +7 -0
- data/app/views/caboose_store/application/_category_thumb.html.erb +6 -0
- data/app/views/caboose_store/application/_product_thumb.html.erb +13 -0
- data/app/views/caboose_store/cart/index.html.erb +19 -0
- data/app/views/caboose_store/categories/admin_edit.html.erb +82 -0
- data/app/views/caboose_store/categories/admin_index.html.erb +13 -0
- data/app/views/caboose_store/categories/admin_new.html.erb +45 -0
- data/app/views/caboose_store/checkout/billing.html.erb +168 -0
- data/app/views/caboose_store/checkout/discount.html.erb +166 -0
- data/app/views/caboose_store/checkout/index.html.erb +113 -0
- data/app/views/caboose_store/checkout/quantity_box.html.erb +39 -0
- data/app/views/caboose_store/checkout/shipping.html.erb +90 -0
- data/app/views/caboose_store/checkout/thank_you.html.erb +36 -0
- data/app/views/caboose_store/layouts/_banner.html.erb +10 -0
- data/app/views/caboose_store/layouts/_banner2.html.erb +10 -0
- data/app/views/caboose_store/layouts/_footer.html.erb +55 -0
- data/app/views/caboose_store/layouts/_header.html.erb +69 -0
- data/app/views/caboose_store/layouts/_sidebar.html.erb +27 -0
- data/app/views/caboose_store/layouts/application.html.erb +33 -0
- data/app/views/caboose_store/layouts/authorize_net.erb +18 -0
- data/app/views/caboose_store/layouts/layout_about.html.erb +42 -0
- data/app/views/caboose_store/layouts/layout_blog.html.erb +159 -0
- data/app/views/caboose_store/layouts/layout_confirm.html.erb +85 -0
- data/app/views/caboose_store/layouts/layout_contact.html.erb +38 -0
- data/app/views/caboose_store/layouts/layout_default.html.erb +10 -0
- data/app/views/caboose_store/layouts/layout_detail.html.erb +114 -0
- data/app/views/caboose_store/layouts/layout_order.html.erb +77 -0
- data/app/views/caboose_store/layouts/layout_pricing.html.erb +182 -0
- data/app/views/caboose_store/layouts/layout_product.html.erb +110 -0
- data/app/views/caboose_store/layouts/layout_profile.html.erb +55 -0
- data/app/views/caboose_store/layouts/layout_single.html.erb +3 -0
- data/app/views/caboose_store/layouts/layout_testimonial.html.erb +110 -0
- data/app/views/caboose_store/layouts/layout_testing.html.erb +4 -0
- data/app/views/caboose_store/orders/_admin_footer.html.erb +2 -0
- data/app/views/caboose_store/orders/_admin_header.html.erb +31 -0
- data/app/views/caboose_store/orders/_quickbooks_order.html.erb +0 -0
- data/app/views/caboose_store/orders/admin_delete_form.html.erb +21 -0
- data/app/views/caboose_store/orders/admin_edit.html.erb +173 -0
- data/app/views/caboose_store/orders/admin_index.html.erb +79 -0
- data/app/views/caboose_store/orders/admin_new.html.erb +42 -0
- data/app/views/caboose_store/orders/admin_print.html.erb +72 -0
- data/app/views/caboose_store/orders_mailer/customer_new_order.html.erb +47 -0
- data/app/views/caboose_store/orders_mailer/customer_status_updated.html.erb +49 -0
- data/app/views/caboose_store/orders_mailer/fulfillment_new_order.html.erb +43 -0
- data/app/views/caboose_store/orders_mailer/shipping_order_ready.html.erb +46 -0
- data/app/views/caboose_store/products/_admin_footer.html.erb +2 -0
- data/app/views/caboose_store/products/_admin_header.html.erb +31 -0
- data/app/views/caboose_store/products/admin_delete_form.html.erb +21 -0
- data/app/views/caboose_store/products/admin_edit_categories.html.erb +73 -0
- data/app/views/caboose_store/products/admin_edit_category_images.html.erb +233 -0
- data/app/views/caboose_store/products/admin_edit_description.html.erb +41 -0
- data/app/views/caboose_store/products/admin_edit_general.html.erb +47 -0
- data/app/views/caboose_store/products/admin_edit_images.html.erb +234 -0
- data/app/views/caboose_store/products/admin_edit_options.html.erb +51 -0
- data/app/views/caboose_store/products/admin_edit_seo.html.erb +37 -0
- data/app/views/caboose_store/products/admin_edit_variant_columns.html.erb +75 -0
- data/app/views/caboose_store/products/admin_edit_variants.html.erb +101 -0
- data/app/views/caboose_store/products/admin_edit_variants_single.html.erb +68 -0
- data/app/views/caboose_store/products/admin_index.html.erb +47 -0
- data/app/views/caboose_store/products/admin_new.html.erb +41 -0
- data/app/views/caboose_store/products/details.html.erb +437 -0
- data/app/views/caboose_store/products/index.html.erb +46 -0
- data/app/views/caboose_store/products/not_available.html.erb +35 -0
- data/app/views/caboose_store/variants/admin_edit.html.erb +80 -0
- data/app/views/caboose_store/variants/admin_new.html.erb +59 -0
- data/config/routes.rb +95 -0
- data/lib/caboose-store/caboose_store_helper.rb +35 -0
- data/lib/caboose-store/engine.rb +8 -0
- data/lib/caboose-store/version.rb +3 -0
- data/lib/caboose-store.rb +9 -0
- data/lib/tasks/caboose-store.rake +17 -0
- data/test/caboose_test.rb +7 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +4 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +25 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/integration/navigation_test.rb +10 -0
- data/test/test_helper.rb +15 -0
- metadata +260 -0
@@ -0,0 +1,168 @@
|
|
1
|
+
|
2
|
+
<div class="page-content">
|
3
|
+
<div class="container">
|
4
|
+
<div class="row-fluid">
|
5
|
+
<div class="span12">
|
6
|
+
<ul class="breadcrumb">
|
7
|
+
<li><a href="/">Home</a><span class="divider">/</span></li>
|
8
|
+
<li><a href="/checkout">Checkout</a><span class="divider">/</span></li>
|
9
|
+
<li><a href="/checkout/shipping">Billing</a></li>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="row-fluid">
|
15
|
+
<div class="span12 single-item">
|
16
|
+
|
17
|
+
<h3>Checkout</h3>
|
18
|
+
<table class='cart'>
|
19
|
+
<tr>
|
20
|
+
<th>Item</th>
|
21
|
+
<th>Quantity</th>
|
22
|
+
<th>Subtotal</th>
|
23
|
+
</tr>
|
24
|
+
<% @order.line_items.each do |li| %>
|
25
|
+
<tr>
|
26
|
+
<td><%= li.variant.product.title %><br /><%= li.variant.title %></td>
|
27
|
+
<td align='right'><%= li.quantity %></td>
|
28
|
+
<td align='right'><%= number_to_currency(li.subtotal) %></td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
<tr>
|
32
|
+
<td colspan='2' align='right'>Subtotal</td>
|
33
|
+
<td align='right'><%= number_to_currency(@order.subtotal) %></td>
|
34
|
+
</tr>
|
35
|
+
<tr>
|
36
|
+
<td colspan='2' align='right'>Tax</td>
|
37
|
+
<td align='right'><%= number_to_currency(@order.tax) %></td>
|
38
|
+
</tr>
|
39
|
+
<tr>
|
40
|
+
<td colspan='2' align='right'>Shipping & Handling</td>
|
41
|
+
<td align='right'><%= number_to_currency(@order.shipping + @order.handling) %></td>
|
42
|
+
</tr>
|
43
|
+
<% if @order.discount > 0 %>
|
44
|
+
<tr>
|
45
|
+
<td colspan='2' align='right'>Discount</td>
|
46
|
+
<td align='right'><%= number_to_currency(@order.discount) %></td>
|
47
|
+
</tr>
|
48
|
+
<% end %>
|
49
|
+
<tr>
|
50
|
+
<td colspan='2' align='right'>Total</td>
|
51
|
+
<td align='right'><%= number_to_currency(@order.total) %></td>
|
52
|
+
</tr>
|
53
|
+
</table>
|
54
|
+
|
55
|
+
</div>
|
56
|
+
</div>
|
57
|
+
<div class="row-fluid">
|
58
|
+
<div class="span12 single-item">
|
59
|
+
<div class="row-fluid">
|
60
|
+
<div class="span5" style='width: 230px;'>
|
61
|
+
|
62
|
+
<h2>Shipping Address</h2>
|
63
|
+
<%
|
64
|
+
a = @order.shipping_address
|
65
|
+
str = "#{a.name}<br />#{a.address1}<br />"
|
66
|
+
str << "#{a.address2}<br />" if a.address2 && a.address2.strip.length > 0
|
67
|
+
str << "#{a.city}, #{a.state} #{a.zip}"
|
68
|
+
%>
|
69
|
+
<p><%= raw str %></p>
|
70
|
+
<p><a href='/checkout'>Edit shipping address</a></p>
|
71
|
+
|
72
|
+
</div>
|
73
|
+
<div class="span5" style='width: 230px;'>
|
74
|
+
|
75
|
+
<h2>Shipping Method</h2>
|
76
|
+
<p><%= @order.shipping_method %> - <%= number_to_currency(@order.shipping) %></p>
|
77
|
+
<p><a href='/checkout/shipping-method'>Edit shipping method</a></p>
|
78
|
+
|
79
|
+
</div>
|
80
|
+
<div class="span5" style='width: 320px;'>
|
81
|
+
|
82
|
+
<h2>Billing Information</h2>
|
83
|
+
<div id='billing_info'>
|
84
|
+
<form action='/checkout/billing' method='post' id='billing_form'>
|
85
|
+
<table>
|
86
|
+
<tr><td>Card number: </td><td><input type='text' name='card_num' id='card_num' value='' style='width: 200px;' onkeyup='Checkout.space_card_number();' maxlength="25" /></td>
|
87
|
+
<tr><td>Expiration: </td><td><select name='exp_month' id='exp_month' style='width: 90px;'>
|
88
|
+
<option value='01'>01 - Jan</option>
|
89
|
+
<option value='02'>02 - Feb</option>
|
90
|
+
<option value='03'>03 - Mar</option>
|
91
|
+
<option value='04'>04 - Apr</option>
|
92
|
+
<option value='05'>05 - May</option>
|
93
|
+
<option value='06'>06 - Jun</option>
|
94
|
+
<option value='07'>07 - Jul</option>
|
95
|
+
<option value='08'>08 - Aug</option>
|
96
|
+
<option value='09'>09 - Sep</option>
|
97
|
+
<option value='10'>10 - Oct</option>
|
98
|
+
<option value='11'>11 - Nov</option>
|
99
|
+
<option value='12'>12 - Dec</option>
|
100
|
+
</select> / <select name='exp_year' id='exp_year' style='width: 80px;'>
|
101
|
+
<% (DateTime.now.year...DateTime.now.year+20).each do |i| %>
|
102
|
+
<option value='<%= i-2000 %>'><%= i %></option>
|
103
|
+
<% end %>
|
104
|
+
</select></td></tr>
|
105
|
+
<tr><td>Security Code: </td><td><input type='text' name='security_code' id='security_code' value='' style='width: 60px;' maxlength='4' /></td>
|
106
|
+
<tr><td>Address: </td><td><input type='text' name='billing_address1' id='billing_address1' value='' style='width: 200px;' /></td>
|
107
|
+
<tr><td>Address 2: </td><td><input type='text' name='billing_address2' id='billing_address2' value='' style='width: 200px;' /></td>
|
108
|
+
<tr><td>Zip code: </td><td><input type='text' name='billing_zip' id='billing_zip' value='' style='width: 100px;' /></td>
|
109
|
+
</table>
|
110
|
+
</form>
|
111
|
+
</div>
|
112
|
+
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
</div>
|
116
|
+
</div>
|
117
|
+
<div class="row-fluid">
|
118
|
+
<div class="span12 single-item">
|
119
|
+
<div class="row-fluid">
|
120
|
+
|
121
|
+
<div id='message'></div>
|
122
|
+
<p>
|
123
|
+
<input type='button' value='< Back' onclick="window.location='/checkout/shipping';" />
|
124
|
+
<input type='submit' value='Continue >' onclick="Checkout.save_billing_info(); return false;" />
|
125
|
+
</p>
|
126
|
+
|
127
|
+
<%
|
128
|
+
#<form accept-charset="UTF-8" action="https://test.authorize.net/gateway/transact.dll" method="post" id='authnet_form' target='authnet_iframe'>
|
129
|
+
#<form accept-charset="UTF-8" action="https://secure.authorize.net/gateway/transact.dll" method="post" id='authnet_form' target='authnet_iframe'>
|
130
|
+
#<form accept-charset="UTF-8" action="https://developer.authorize.net/tools/paramdump/index.php" method="post" id='authnet_form' target='authnet_iframe'>
|
131
|
+
%>
|
132
|
+
<form accept-charset="UTF-8" action="https://secure.authorize.net/gateway/transact.dll" method="post" id='authnet_form' target='authnet_iframe'>
|
133
|
+
<%= sim_fields(@sim_transaction) %>
|
134
|
+
<input type='hidden' name='authenticity_token' value="<%= form_authenticity_token %>" />
|
135
|
+
<input type="hidden" id="x_invoice_num" name="x_invoice_num" value="<%= @order.id %>" />
|
136
|
+
<input type="hidden" id="x_card_num" name="x_card_num" value="" />
|
137
|
+
<input type="hidden" id="x_exp_date" name="x_exp_date" value="" />
|
138
|
+
<input type="hidden" id="x_address" name="x_address" value="" />
|
139
|
+
<input type="hidden" id="x_zip" name="x_zip" value="" />
|
140
|
+
<input type="hidden" id="commit" name="commit" value="Purchase" />
|
141
|
+
</form>
|
142
|
+
<iframe name='authnet_iframe' id='authnet_iframe' style="<%= @logged_in_user.id == 7 ? "width: 100%; height: 400px;" : "display: none;" %>"></iframe>
|
143
|
+
|
144
|
+
</div>
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
</div>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
<%= content_for :caboose_css do %>
|
151
|
+
<style type='text/css'>
|
152
|
+
|
153
|
+
table.cart { border-collapse: collapse; }
|
154
|
+
table.cart td { border: #666 1px dotted; padding: 4px 8px; }
|
155
|
+
table.cart th { font-weight: bold; text-align: center; }
|
156
|
+
|
157
|
+
</style>
|
158
|
+
<% end %>
|
159
|
+
<%= content_for :caboose_js do %>
|
160
|
+
<%= javascript_include_tag 'checkout' %>
|
161
|
+
<script type='text/javascript'>
|
162
|
+
|
163
|
+
$(document).ready(function() {
|
164
|
+
|
165
|
+
});
|
166
|
+
|
167
|
+
</script>
|
168
|
+
<% end %>
|
@@ -0,0 +1,166 @@
|
|
1
|
+
|
2
|
+
<div class="page-content">
|
3
|
+
<div class="container">
|
4
|
+
<div class="row-fluid">
|
5
|
+
<div class="span12">
|
6
|
+
<ul class="breadcrumb">
|
7
|
+
<li><a href="/">Home</a><span class="divider">/</span></li>
|
8
|
+
<li><a href="/checkout">Checkout</a><span class="divider">/</span></li>
|
9
|
+
<li><a href="/checkout/shipping">Billing</a></li>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="row-fluid">
|
15
|
+
<div class="span12 single-item">
|
16
|
+
|
17
|
+
<h3>Checkout</h3>
|
18
|
+
<table class='cart'>
|
19
|
+
<tr>
|
20
|
+
<th>Item</th>
|
21
|
+
<th>Quantity</th>
|
22
|
+
<th>Subtotal</th>
|
23
|
+
</tr>
|
24
|
+
<% @order.line_items.each do |li| %>
|
25
|
+
<tr>
|
26
|
+
<td><%= li.variant.product.title %><br /><%= li.variant.title %></td>
|
27
|
+
<td align='right'><%= li.quantity %></td>
|
28
|
+
<td align='right'><%= number_to_currency(li.subtotal) %></td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
<tr>
|
32
|
+
<td colspan='2' align='right'>Subtotal</td>
|
33
|
+
<td align='right'><%= number_to_currency(@order.subtotal) %></td>
|
34
|
+
</tr>
|
35
|
+
<tr>
|
36
|
+
<td colspan='2' align='right'>Tax</td>
|
37
|
+
<td align='right'><%= number_to_currency(@order.tax) %></td>
|
38
|
+
</tr>
|
39
|
+
<tr>
|
40
|
+
<td colspan='2' align='right'><a href='/checkout/shipping'>(Edit)</a> <%= @order.shipping_method %> Shipping</td>
|
41
|
+
<td align='right'><%= number_to_currency(@order.shipping + @order.handling) %></td>
|
42
|
+
</tr>
|
43
|
+
<tr>
|
44
|
+
<td colspan='2' align='right'>Discount</td>
|
45
|
+
<td align='right'><%= number_to_currency(@order.discount) %></td>
|
46
|
+
</tr>
|
47
|
+
<tr>
|
48
|
+
<td colspan='2' align='right'>Total</td>
|
49
|
+
<td align='right'><%= number_to_currency(@order.total) %></td>
|
50
|
+
</tr>
|
51
|
+
</table>
|
52
|
+
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
<div class="row-fluid">
|
56
|
+
<div class="span12 single-item">
|
57
|
+
<div class="row-fluid">
|
58
|
+
<div class="span5" style='width: 230px;'>
|
59
|
+
|
60
|
+
<h2>Shipping Address</h2>
|
61
|
+
<%
|
62
|
+
a = @order.shipping_address
|
63
|
+
str = "#{a.name}<br />#{a.address1}<br />"
|
64
|
+
str << "#{a.address2}<br />" if a.address2 && a.address2.strip.length > 0
|
65
|
+
str << "#{a.city}, #{a.state} #{a.zip}"
|
66
|
+
%>
|
67
|
+
<p><%= raw str %></p>
|
68
|
+
<p><a href='/checkout'>Edit shipping address</a></p>
|
69
|
+
|
70
|
+
</div>
|
71
|
+
<div class="span5" style='width: 230px;'>
|
72
|
+
|
73
|
+
<h2>Shipping Method</h2>
|
74
|
+
<p><%= @order.shipping_method %> - <%= number_to_currency(@order.shipping) %></p>
|
75
|
+
<p><a href='/checkout/shipping-method'>Edit shipping method</a></p>
|
76
|
+
|
77
|
+
</div>
|
78
|
+
<div class="span5" style='width: 320px;'>
|
79
|
+
|
80
|
+
<h2>Billing Information</h2>
|
81
|
+
<div id='billing_info'>
|
82
|
+
<form action='/checkout/billing' method='post' id='billing_form'>
|
83
|
+
<table>
|
84
|
+
<tr><td>Card number: </td><td><input type='text' name='card_num' id='card_num' value='' style='width: 200px;' onkeyup='Checkout.space_card_number();' maxlength="25" /></td>
|
85
|
+
<tr><td>Expiration: </td><td><select name='exp_month' id='exp_month' style='width: 90px;'>
|
86
|
+
<option value='01'>01 - Jan</option>
|
87
|
+
<option value='02'>02 - Feb</option>
|
88
|
+
<option value='03'>03 - Mar</option>
|
89
|
+
<option value='04'>04 - Apr</option>
|
90
|
+
<option value='05'>05 - May</option>
|
91
|
+
<option value='06'>06 - Jun</option>
|
92
|
+
<option value='07'>07 - Jul</option>
|
93
|
+
<option value='08'>08 - Aug</option>
|
94
|
+
<option value='09'>09 - Sep</option>
|
95
|
+
<option value='10'>10 - Oct</option>
|
96
|
+
<option value='11'>11 - Nov</option>
|
97
|
+
<option value='12'>12 - Dec</option>
|
98
|
+
</select> / <select name='exp_year' id='exp_year' style='width: 80px;'>
|
99
|
+
<% (DateTime.now.year...DateTime.now.year+20).each do |i| %>
|
100
|
+
<option value='<%= i-2000 %>'><%= i %></option>
|
101
|
+
<% end %>
|
102
|
+
</select></td></tr>
|
103
|
+
<tr><td>Security Code: </td><td><input type='text' name='security_code' id='security_code' value='' style='width: 60px;' /></td>
|
104
|
+
<tr><td>Address: </td><td><input type='text' name='billing_address1' id='billing_address1' value='' style='width: 200px;' /></td>
|
105
|
+
<tr><td>Address 2: </td><td><input type='text' name='billing_address2' id='billing_address2' value='' style='width: 200px;' /></td>
|
106
|
+
<tr><td>Zip code: </td><td><input type='text' name='billing_zip' id='billing_zip' value='' style='width: 100px;' /></td>
|
107
|
+
</table>
|
108
|
+
</form>
|
109
|
+
</div>
|
110
|
+
|
111
|
+
</div>
|
112
|
+
</div>
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
<div class="row-fluid">
|
116
|
+
<div class="span12 single-item">
|
117
|
+
<div class="row-fluid">
|
118
|
+
|
119
|
+
<div id='message'></div>
|
120
|
+
<p>
|
121
|
+
<input type='button' value='< Back' onclick="window.location='/checkout/shipping';" />
|
122
|
+
<input type='submit' value='Continue >' onclick="Checkout.save_billing_info(); return false;" />
|
123
|
+
</p>
|
124
|
+
|
125
|
+
<%
|
126
|
+
#<form accept-charset="UTF-8" action="https://test.authorize.net/gateway/transact.dll" method="post" id='authnet_form' target='authnet_iframe'>
|
127
|
+
#<form accept-charset="UTF-8" action="https://secure.authorize.net/gateway/transact.dll" method="post" id='authnet_form' target='authnet_iframe'>
|
128
|
+
#<form accept-charset="UTF-8" action="https://developer.authorize.net/tools/paramdump/index.php" method="post" id='authnet_form' target='authnet_iframe'>
|
129
|
+
%>
|
130
|
+
<form accept-charset="UTF-8" action="https://secure.authorize.net/gateway/transact.dll" method="post" id='authnet_form' target='authnet_iframe'>
|
131
|
+
<%= sim_fields(@sim_transaction) %>
|
132
|
+
<input type='hidden' name='authenticity_token' value="<%= form_authenticity_token %>" />
|
133
|
+
<input type="hidden" id="x_invoice_num" name="x_invoice_num" value="<%= @order.id %>" />
|
134
|
+
<input type="hidden" id="x_card_num" name="x_card_num" value="" />
|
135
|
+
<input type="hidden" id="x_exp_date" name="x_exp_date" value="" />
|
136
|
+
<input type="hidden" id="x_address" name="x_address" value="" />
|
137
|
+
<input type="hidden" id="x_zip" name="x_zip" value="" />
|
138
|
+
<input type="hidden" id="commit" name="commit" value="Purchase" />
|
139
|
+
</form>
|
140
|
+
<iframe name='authnet_iframe' id='authnet_iframe' style='display: none;'></iframe>
|
141
|
+
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
</div>
|
146
|
+
</div>
|
147
|
+
|
148
|
+
<%= content_for :caboose_css do %>
|
149
|
+
<style type='text/css'>
|
150
|
+
|
151
|
+
table.cart { border-collapse: collapse; }
|
152
|
+
table.cart td { border: #666 1px dotted; padding: 4px 8px; }
|
153
|
+
table.cart th { font-weight: bold; text-align: center; }
|
154
|
+
|
155
|
+
</style>
|
156
|
+
<% end %>
|
157
|
+
<%= content_for :caboose_js do %>
|
158
|
+
<%= javascript_include_tag 'checkout' %>
|
159
|
+
<script type='text/javascript'>
|
160
|
+
|
161
|
+
$(document).ready(function() {
|
162
|
+
|
163
|
+
});
|
164
|
+
|
165
|
+
</script>
|
166
|
+
<% end %>
|
@@ -0,0 +1,113 @@
|
|
1
|
+
|
2
|
+
<div class="page-content">
|
3
|
+
<div class="container">
|
4
|
+
<div class="row-fluid">
|
5
|
+
<div class="span12">
|
6
|
+
<ul class="breadcrumb">
|
7
|
+
<li><a href="/">Home</a><span class="divider">/</span></li>
|
8
|
+
<li><a href="/checkout">Checkout</a></li>
|
9
|
+
</ul>
|
10
|
+
</div>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
<div class="row-fluid">
|
14
|
+
<div class="span12 single-item">
|
15
|
+
<div class="row-fluid">
|
16
|
+
|
17
|
+
<h3>Checkout</h3>
|
18
|
+
<table class='cart'>
|
19
|
+
<tr>
|
20
|
+
<th>Item</th>
|
21
|
+
<th>Quantity</th>
|
22
|
+
<th>Subtotal</th>
|
23
|
+
</tr>
|
24
|
+
<% @order.line_items.each do |li| %>
|
25
|
+
<tr>
|
26
|
+
<td><%= li.variant.product.title %><br /><%= li.variant.title %></td>
|
27
|
+
<td align='right'><%= li.quantity %></td>
|
28
|
+
<td align='right'><%= number_to_currency(li.subtotal) %></td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
<tr>
|
32
|
+
<td colspan='2' align='right'>Subtotal</td>
|
33
|
+
<td align='right'><%= number_to_currency(@order.subtotal) %></td>
|
34
|
+
</tr>
|
35
|
+
</table>
|
36
|
+
|
37
|
+
</div>
|
38
|
+
<% if (@is_logged_in) %>
|
39
|
+
<div class="row-fluid">
|
40
|
+
<div class="span5">
|
41
|
+
|
42
|
+
<h2>Shipping Address</h2>
|
43
|
+
<form action='/checkout/shipping' method='post' id='shipping_address_form'>
|
44
|
+
<table>
|
45
|
+
<tr><td>Name: </td><td><input type='text' name='name' value='' style='width: 200px;' /></td>
|
46
|
+
<tr><td>Company: </td><td><input type='text' name='company' value='' style='width: 200px;' /></td>
|
47
|
+
<tr><td>Address 1: </td><td><input type='text' name='address1' value='' style='width: 200px;' /></td>
|
48
|
+
<tr><td>Address 2: </td><td><input type='text' name='address2' value='' style='width: 200px;' /></td>
|
49
|
+
<tr><td>City: </td><td><input type='text' name='city' value='' style='width: 200px;' /></td>
|
50
|
+
<tr><td>State: </td><td><select name='state'><% States.all.each do |abbr, name| %><option value='<%= abbr %>'><%= name %></option><% end %></select></td></tr>
|
51
|
+
<tr><td>Zip: </td><td><input type='text' name='zip' value='' style='width: 200px;' /></td>
|
52
|
+
</table>
|
53
|
+
<div id='message'></div>
|
54
|
+
<p><input type='submit' value='Continue >' onclick="Checkout.post_shipping_address(); return false;" /></p>
|
55
|
+
<form>
|
56
|
+
</div>
|
57
|
+
</div>
|
58
|
+
<% end %>
|
59
|
+
</div>
|
60
|
+
</div>
|
61
|
+
</div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<%= content_for :caboose_css do %>
|
65
|
+
<style type='text/css'>
|
66
|
+
|
67
|
+
table.cart { border-collapse: collapse; }
|
68
|
+
table.cart td { border: #666 1px dotted; padding: 4px 8px; }
|
69
|
+
table.cart th { font-weight: bold; text-align: center; }
|
70
|
+
|
71
|
+
</style>
|
72
|
+
<% end %>
|
73
|
+
<%= content_for :caboose_js do %>
|
74
|
+
<%= javascript_include_tag 'checkout' %>
|
75
|
+
|
76
|
+
<% if !@is_logged_in %>
|
77
|
+
<script type='text/javascript'>
|
78
|
+
|
79
|
+
$(document).ready(function() {
|
80
|
+
open_colorbox();
|
81
|
+
});
|
82
|
+
|
83
|
+
function open_colorbox() {
|
84
|
+
$.colorbox({
|
85
|
+
href: '/login?return_url=/checkout',
|
86
|
+
iframe: true,
|
87
|
+
innerWidth: 200,
|
88
|
+
innerHeight: 50,
|
89
|
+
scrolling: false,
|
90
|
+
transition: 'fade',
|
91
|
+
closeButton: false,
|
92
|
+
onComplete: fix_colorbox,
|
93
|
+
opacity: 0.50,
|
94
|
+
onClosed: function() { open_colorbox(); }
|
95
|
+
});
|
96
|
+
}
|
97
|
+
|
98
|
+
function fix_colorbox() {
|
99
|
+
$("#cboxTopLeft" ).css('background', '#111');
|
100
|
+
$("#cboxTopRight" ).css('background', '#111');
|
101
|
+
$("#cboxBottomLeft" ).css('background', '#111');
|
102
|
+
$("#cboxBottomRight" ).css('background', '#111');
|
103
|
+
$("#cboxMiddleLeft" ).css('background', '#111');
|
104
|
+
$("#cboxMiddleRight" ).css('background', '#111');
|
105
|
+
$("#cboxTopCenter" ).css('background', '#111');
|
106
|
+
$("#cboxBottomCenter" ).css('background', '#111');
|
107
|
+
$("#cboxClose" ).hide();
|
108
|
+
}
|
109
|
+
|
110
|
+
</script>
|
111
|
+
<% end %>
|
112
|
+
|
113
|
+
<% end %>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<style>
|
2
|
+
.quantity_box { width: 300px; height: 300px; }
|
3
|
+
</style>
|
4
|
+
|
5
|
+
<div class="quantity_box">
|
6
|
+
<p id="message">Sorry, your specified quantity exceeds what we have in stock. Your cart will be updated to reflect our current stock.</p>
|
7
|
+
<div id="update_btn" style="display:none;"><button id="update_cart">Return to Checkout</button></div>
|
8
|
+
<p class="loading" id="updating" style="display:none;">Updating cart...</p>
|
9
|
+
</div>
|
10
|
+
|
11
|
+
<%= content_for :caboose_js do %>
|
12
|
+
<%= javascript_include_tag 'cart' %>
|
13
|
+
<script type='text/javascript'>
|
14
|
+
|
15
|
+
var modal = false;
|
16
|
+
$(window).load(function() {
|
17
|
+
modal = new CabooseModal(300, 300);
|
18
|
+
update_quantities();
|
19
|
+
});
|
20
|
+
|
21
|
+
function update_quantities() {
|
22
|
+
$("#updating").show();
|
23
|
+
$.ajax({
|
24
|
+
url: '/checkout/update_quantities',
|
25
|
+
success: function(order) {
|
26
|
+
$("#updating").hide();
|
27
|
+
$("#update_btn").show();
|
28
|
+
}
|
29
|
+
});
|
30
|
+
}
|
31
|
+
|
32
|
+
function close_colorbox() {
|
33
|
+
parent.jQuery.fn.colorbox.close();
|
34
|
+
}
|
35
|
+
|
36
|
+
$("#update_btn").click(function() { close_colorbox(); });
|
37
|
+
|
38
|
+
</script>
|
39
|
+
<% end %>
|
@@ -0,0 +1,90 @@
|
|
1
|
+
|
2
|
+
<div class="page-content">
|
3
|
+
<div class="container">
|
4
|
+
<div class="row-fluid">
|
5
|
+
<div class="span12">
|
6
|
+
<ul class="breadcrumb">
|
7
|
+
<li><a href="/">Home</a><span class="divider">/</span></li>
|
8
|
+
<li><a href="/checkout">Checkout</a><span class="divider">/</span></li>
|
9
|
+
<li><a href="/checkout/shipping">Shipping Method</a></li>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="row-fluid">
|
15
|
+
<div class="span12 single-item">
|
16
|
+
|
17
|
+
<h3>Checkout</h3>
|
18
|
+
<table class='cart'>
|
19
|
+
<tr>
|
20
|
+
<th>Item</th>
|
21
|
+
<th>Quantity</th>
|
22
|
+
<th>Subtotal</th>
|
23
|
+
</tr>
|
24
|
+
<% @order.line_items.each do |li| %>
|
25
|
+
<tr>
|
26
|
+
<td><%= li.variant.product.title %><br /><%= li.variant.title %></td>
|
27
|
+
<td align='right'><%= li.quantity %></td>
|
28
|
+
<td align='right'><%= number_to_currency(li.subtotal) %></td>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
<tr>
|
32
|
+
<td colspan='2' align='right'>Subtotal</td>
|
33
|
+
<td align='right'><%= number_to_currency(@order.subtotal) %></td>
|
34
|
+
</tr>
|
35
|
+
<tr>
|
36
|
+
<td colspan='2' align='right'>Tax</td>
|
37
|
+
<td align='right'><%= number_to_currency(@order.tax) %></td>
|
38
|
+
</tr>
|
39
|
+
</table>
|
40
|
+
|
41
|
+
</div>
|
42
|
+
</div>
|
43
|
+
<div class="row-fluid">
|
44
|
+
<div class="span12 single-item">
|
45
|
+
<div class="row-fluid">
|
46
|
+
<div class="span5" style='width: 230px;'>
|
47
|
+
|
48
|
+
<h2>Shipping Address</h2>
|
49
|
+
<%
|
50
|
+
a = @order.shipping_address
|
51
|
+
str = "#{a.name}<br />#{a.address1}<br />"
|
52
|
+
str << "#{a.address2}<br />" if a.address2 && a.address2.strip.length > 0
|
53
|
+
str << "#{a.city}, #{a.state} #{a.zip}"
|
54
|
+
%>
|
55
|
+
<p><%= raw str %></p>
|
56
|
+
<p><a href='/checkout'>Edit shipping address</a></p>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="span7" style='width: 300px;'>
|
60
|
+
|
61
|
+
<h2>Shipping Method</h2>
|
62
|
+
<div id='shipping_rates'><p class='loading'>Calculating shipping rates...</p></div>
|
63
|
+
<div id='message'></div>
|
64
|
+
|
65
|
+
</div>
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
</div>
|
69
|
+
</div>
|
70
|
+
</div>
|
71
|
+
|
72
|
+
<%= content_for :caboose_css do %>
|
73
|
+
<style type='text/css'>
|
74
|
+
|
75
|
+
table.cart { border-collapse: collapse; }
|
76
|
+
table.cart td { border: #666 1px dotted; padding: 4px 8px; }
|
77
|
+
table.cart th { font-weight: bold; text-align: center; }
|
78
|
+
|
79
|
+
</style>
|
80
|
+
<% end %>
|
81
|
+
<%= content_for :caboose_js do %>
|
82
|
+
<%= javascript_include_tag 'checkout' %>
|
83
|
+
<script type='text/javascript'>
|
84
|
+
|
85
|
+
$(document).ready(function() {
|
86
|
+
Checkout.get_shipping_rates();
|
87
|
+
});
|
88
|
+
|
89
|
+
</script>
|
90
|
+
<% end %>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
|
2
|
+
<div class="page-content">
|
3
|
+
<div class="container">
|
4
|
+
<div class="row-fluid">
|
5
|
+
<div class="span12">
|
6
|
+
<ul class="breadcrumb">
|
7
|
+
<li><a href="/">Home</a><span class="divider">/</span></li>
|
8
|
+
<li><a href="/checkout">Checkout</a><span class="divider">/</span></li>
|
9
|
+
<li><a href="/checkout/shipping">Finished</a></li>
|
10
|
+
</ul>
|
11
|
+
</div>
|
12
|
+
</div>
|
13
|
+
|
14
|
+
<div class="row-fluid">
|
15
|
+
<div class="span12 single-item">
|
16
|
+
|
17
|
+
<h3>All Finished!</h3>
|
18
|
+
<p>Thank you for your order! Your order has been submitted.</p>
|
19
|
+
<p>Please allow up to 48 hours for your order to be processed. Orders are processed during normal business hours Monday through Friday.</p>
|
20
|
+
<p><input type='button' value='Continue Shopping' onclick="window.location='/';" /></p>
|
21
|
+
|
22
|
+
</div>
|
23
|
+
</div>
|
24
|
+
</div>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<%= content_for :caboose_js do %>
|
28
|
+
<%= javascript_include_tag 'checkout' %>
|
29
|
+
<script type='text/javascript'>
|
30
|
+
|
31
|
+
$(document).ready(function() {
|
32
|
+
|
33
|
+
});
|
34
|
+
|
35
|
+
</script>
|
36
|
+
<% end %>
|