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.
Files changed (166) hide show
  1. checksums.yaml +8 -8
  2. data/app/assets/javascripts/caboose/admin_products.js +79 -0
  3. data/app/assets/javascripts/caboose/application.js +2 -1
  4. data/app/assets/javascripts/caboose/cart.js +168 -0
  5. data/app/assets/javascripts/caboose/checkout.js +151 -0
  6. data/app/assets/javascripts/caboose/checkout_module.js +312 -0
  7. data/app/assets/javascripts/caboose/checkout_step1.js +179 -0
  8. data/app/assets/javascripts/caboose/checkout_step2.js +39 -0
  9. data/app/assets/javascripts/caboose/checkout_step3.js +34 -0
  10. data/app/assets/javascripts/caboose/checkout_step4.js +97 -0
  11. data/app/assets/javascripts/caboose/main.js +99 -8
  12. data/app/assets/javascripts/caboose/product.js +284 -0
  13. data/app/assets/stylesheets/caboose/admin_products.css +86 -0
  14. data/app/assets/templates/caboose/cart/add_to_cart.jst.ejs +7 -0
  15. data/app/assets/templates/caboose/cart/line_items.jst.ejs +41 -0
  16. data/app/assets/templates/caboose/checkout/address.jst.ejs +53 -0
  17. data/app/assets/templates/caboose/checkout/forms/guest.jst.ejs +8 -0
  18. data/app/assets/templates/caboose/checkout/forms/register.jst.ejs +11 -0
  19. data/app/assets/templates/caboose/checkout/forms/signin.jst.ejs +7 -0
  20. data/app/assets/templates/caboose/checkout/line_items.jst.ejs +31 -0
  21. data/app/assets/templates/caboose/checkout/login.jst.ejs +21 -0
  22. data/app/assets/templates/caboose/checkout/payment.jst.ejs +5 -0
  23. data/app/assets/templates/caboose/checkout/shipping.jst.ejs +18 -0
  24. data/app/assets/templates/caboose/product/images.jst.ejs +8 -0
  25. data/app/assets/templates/caboose/product/options.jst.ejs +19 -0
  26. data/app/controllers/caboose/application_controller.rb +29 -1
  27. data/app/controllers/caboose/cart_controller.rb +52 -0
  28. data/app/controllers/caboose/categories_controller.rb +108 -0
  29. data/app/controllers/caboose/checkout_controller.rb +325 -0
  30. data/app/controllers/caboose/orders_controller.rb +439 -0
  31. data/app/controllers/caboose/product_images_controller.rb +38 -0
  32. data/app/controllers/caboose/products_controller.rb +737 -0
  33. data/app/controllers/caboose/reviews_controller.rb +15 -0
  34. data/app/controllers/caboose/variants_controller.rb +218 -0
  35. data/app/controllers/caboose/vendors_controller.rb +73 -0
  36. data/app/helpers/caboose/application_helper.rb +4 -0
  37. data/app/helpers/caboose/categories_helper.rb +82 -0
  38. data/app/helpers/caboose/checkout_helper.rb +20 -0
  39. data/app/helpers/caboose/products_helper.rb +8 -0
  40. data/app/mailers/caboose/orders_mailer.rb +30 -0
  41. data/app/models/caboose/address.rb +26 -0
  42. data/app/models/caboose/category.rb +89 -0
  43. data/app/models/caboose/category_membership.rb +10 -0
  44. data/app/models/caboose/core_plugin.rb +15 -37
  45. data/app/models/caboose/customization_membership.rb +10 -0
  46. data/app/models/caboose/discount.rb +16 -0
  47. data/app/models/caboose/line_item.rb +81 -0
  48. data/app/models/caboose/message.rb +20 -0
  49. data/app/models/caboose/order.rb +191 -0
  50. data/app/models/caboose/order_discount.rb +10 -0
  51. data/app/models/caboose/order_pdf.rb +78 -0
  52. data/app/models/caboose/payment_processors/authorizenet.rb +53 -0
  53. data/app/models/caboose/payment_processors/base.rb +39 -0
  54. data/app/models/caboose/payment_processors/payscape.rb +94 -0
  55. data/app/models/caboose/product.rb +145 -0
  56. data/app/models/caboose/product_image.rb +62 -0
  57. data/app/models/caboose/product_image_variant.rb +10 -0
  58. data/app/models/caboose/review.rb +13 -0
  59. data/app/models/caboose/schema.rb +205 -1
  60. data/app/models/caboose/search_filter.rb +191 -0
  61. data/app/models/caboose/shipping_calculator.rb +81 -0
  62. data/app/models/caboose/states.rb +61 -52
  63. data/app/models/caboose/tax_calculator.rb +23 -0
  64. data/app/models/caboose/tax_line.rb +9 -0
  65. data/app/models/caboose/variant.rb +99 -0
  66. data/app/models/caboose/vendor.rb +22 -0
  67. data/app/views/caboose/cart/index.html.erb +8 -0
  68. data/app/views/caboose/categories/admin_edit.html.erb +79 -0
  69. data/app/views/caboose/categories/admin_index.html.erb +11 -0
  70. data/app/views/caboose/categories/admin_new.html.erb +62 -0
  71. data/app/views/caboose/checkout/_address_form.html.erb +111 -0
  72. data/app/views/caboose/checkout/_billing_form.html.erb +47 -0
  73. data/app/views/caboose/checkout/_cart.html.erb +52 -0
  74. data/app/views/caboose/checkout/_confirm.html.erb +61 -0
  75. data/app/views/caboose/checkout/_order_discount.html.erb +40 -0
  76. data/app/views/caboose/checkout/_shipping_address.html.erb +10 -0
  77. data/app/views/caboose/checkout/_shipping_method.html.erb +2 -0
  78. data/app/views/caboose/checkout/_shipping_method_form.html.erb +21 -0
  79. data/app/views/caboose/checkout/billing.html.erb +11 -0
  80. data/app/views/caboose/checkout/discount.html.erb +11 -0
  81. data/app/views/caboose/checkout/empty.html.erb +2 -0
  82. data/app/views/caboose/checkout/error.html.erb +2 -0
  83. data/app/views/caboose/checkout/index.html.erb +43 -0
  84. data/app/views/caboose/checkout/login.html.erb +2 -0
  85. data/app/views/caboose/checkout/payment.html.erb +79 -0
  86. data/app/views/caboose/checkout/relay.html.erb +23 -0
  87. data/app/views/caboose/checkout/relay_old.html.erb +12 -0
  88. data/app/views/caboose/checkout/relay_postMessage.html.erb +19 -0
  89. data/app/views/caboose/checkout/shipping.html.erb +15 -0
  90. data/app/views/caboose/checkout/step_four.html.erb +93 -0
  91. data/app/views/caboose/checkout/step_one.html.erb +56 -0
  92. data/app/views/caboose/checkout/step_one_old.html.erb +13 -0
  93. data/app/views/caboose/checkout/step_three.html.erb +23 -0
  94. data/app/views/caboose/checkout/step_two.html.erb +52 -0
  95. data/app/views/caboose/checkout/step_two_old.html.erb +14 -0
  96. data/app/views/caboose/checkout/thanks.html.erb +5 -0
  97. data/app/views/caboose/orders/_admin_footer.html.erb +2 -0
  98. data/app/views/caboose/orders/_admin_header.html.erb +31 -0
  99. data/app/views/caboose/orders/_quickbooks_order.html.erb +0 -0
  100. data/app/views/caboose/orders/admin_delete_form.html.erb +21 -0
  101. data/app/views/caboose/orders/admin_edit.html.erb +271 -0
  102. data/app/views/caboose/orders/admin_index.html.erb +89 -0
  103. data/app/views/caboose/orders/admin_new.html.erb +42 -0
  104. data/app/views/caboose/orders/admin_print.html.erb +72 -0
  105. data/app/views/caboose/orders_mailer/customer_new_order.html.erb +1 -0
  106. data/app/views/caboose/orders_mailer/customer_status_updated.html.erb +1 -0
  107. data/app/views/caboose/orders_mailer/fulfillment_new_order.html.erb +1 -0
  108. data/app/views/caboose/orders_mailer/shipping_order_ready.html.erb +1 -0
  109. data/app/views/caboose/products/_admin_footer.html.erb +2 -0
  110. data/app/views/caboose/products/_admin_header.html.erb +32 -0
  111. data/app/views/caboose/products/_sort_options.html.erb +19 -0
  112. data/app/views/caboose/products/admin_add_upcs.html.erb +58 -0
  113. data/app/views/caboose/products/admin_delete_form.html.erb +21 -0
  114. data/app/views/caboose/products/admin_edit_categories.html.erb +73 -0
  115. data/app/views/caboose/products/admin_edit_category_images.html.erb +233 -0
  116. data/app/views/caboose/products/admin_edit_description.html.erb +38 -0
  117. data/app/views/caboose/products/admin_edit_general.html.erb +104 -0
  118. data/app/views/caboose/products/admin_edit_images.html.erb +236 -0
  119. data/app/views/caboose/products/admin_edit_options.html.erb +51 -0
  120. data/app/views/caboose/products/admin_edit_seo.html.erb +37 -0
  121. data/app/views/caboose/products/admin_edit_variant_columns.html.erb +75 -0
  122. data/app/views/caboose/products/admin_edit_variant_sort_order.html.erb +63 -0
  123. data/app/views/caboose/products/admin_edit_variants.html.erb +171 -0
  124. data/app/views/caboose/products/admin_edit_variants_single.html.erb +68 -0
  125. data/app/views/caboose/products/admin_group_variants.html.erb +433 -0
  126. data/app/views/caboose/products/admin_index.html.erb +95 -0
  127. data/app/views/caboose/products/admin_new.html.erb +41 -0
  128. data/app/views/caboose/products/admin_sort.html copy.erb +155 -0
  129. data/app/views/caboose/products/admin_sort.html.erb +254 -0
  130. data/app/views/caboose/products/details.html.erb +438 -0
  131. data/app/views/caboose/products/index.html.erb +46 -0
  132. data/app/views/caboose/products/not_available.html.erb +35 -0
  133. data/app/views/caboose/variants/admin_edit.html.erb +82 -0
  134. data/app/views/caboose/variants/admin_group.html.erb +184 -0
  135. data/app/views/caboose/variants/admin_new.html.erb +59 -0
  136. data/app/views/caboose/vendors/admin_edit.html.erb +24 -0
  137. data/app/views/caboose/vendors/admin_index.html.erb +30 -0
  138. data/app/views/caboose/vendors/admin_new.html.erb +34 -0
  139. data/app/views/layouts/caboose/store/_banner.html.erb +10 -0
  140. data/app/views/layouts/caboose/store/_banner2.html.erb +10 -0
  141. data/app/views/layouts/caboose/store/_footer.html.erb +55 -0
  142. data/app/views/layouts/caboose/store/_header.html.erb +69 -0
  143. data/app/views/layouts/caboose/store/_sidebar.html.erb +27 -0
  144. data/app/views/layouts/caboose/store/application.html.erb +33 -0
  145. data/app/views/layouts/caboose/store/authorize_net.erb +18 -0
  146. data/app/views/layouts/caboose/store/layout_about.html.erb +42 -0
  147. data/app/views/layouts/caboose/store/layout_blog.html.erb +159 -0
  148. data/app/views/layouts/caboose/store/layout_confirm.html.erb +85 -0
  149. data/app/views/layouts/caboose/store/layout_contact.html.erb +38 -0
  150. data/app/views/layouts/caboose/store/layout_default.html.erb +10 -0
  151. data/app/views/layouts/caboose/store/layout_detail.html.erb +114 -0
  152. data/app/views/layouts/caboose/store/layout_order.html.erb +77 -0
  153. data/app/views/layouts/caboose/store/layout_pricing.html.erb +182 -0
  154. data/app/views/layouts/caboose/store/layout_product.html.erb +110 -0
  155. data/app/views/layouts/caboose/store/layout_profile.html.erb +55 -0
  156. data/app/views/layouts/caboose/store/layout_single.html.erb +3 -0
  157. data/app/views/layouts/caboose/store/layout_testimonial.html.erb +110 -0
  158. data/app/views/layouts/caboose/store/layout_testing.html.erb +4 -0
  159. data/config/routes.rb +126 -0
  160. data/lib/caboose.rb +46 -1
  161. data/lib/caboose/engine.rb +39 -1
  162. data/lib/caboose/version.rb +1 -1
  163. data/lib/tasks/caboose.rake +12 -0
  164. metadata +151 -4
  165. data/app/assets/javascripts/caboose/admin_page_edit_content_bak.js +0 -164
  166. data/app/assets/javascripts/caboose/model/#Untitled-1# +0 -2
@@ -0,0 +1,55 @@
1
+ <%= render 'layouts/header' %>
2
+ <%= render 'layouts/banner' %>
3
+ <div class="page-content">
4
+ <div class="container">
5
+ <div class="row-fluid">
6
+ <div class="span12">
7
+ <ul class="breadcrumb">
8
+ <li><a href="#">Home</a> <span class="divider">/</span></li>
9
+ <li class="active">Profile</li>
10
+ </ul>
11
+ </div>
12
+ </div>
13
+
14
+ <div class="row-fluid">
15
+ <div class="span12 t-center">
16
+ <h3>Lorem ipsum dolor sit amet</h3>
17
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis lectus metus, at posuere neque. Sed pharetra nibh eget orci convallis at posuere leo convallis. Sed blandit augue vitae augue scelerisque bibendum. Vivamus sit amet libero turpis, non venenatis urna. In blandit, odio convallis suscipit venenatis, ante ipsum cursus augue.</p>
18
+ </div>
19
+ </div>
20
+
21
+ <div class="row-fluid padd20-top-btm" id="theteam">
22
+ <ul class="thumbnails">
23
+ <li class="span4">
24
+ <div class="featured-photos">
25
+ <img src="/assets/team3.png" alt="dodolan manuk profile">
26
+ </div>
27
+ <h3>graphic designer</h3>
28
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis lectus metus, at posuere neque.</p>
29
+ </li>
30
+ <li class="span4">
31
+ <div class="featured-photos">
32
+ <img src="/assets/team2.png" alt="dodolan manuk profile">
33
+ </div>
34
+ <h3>programmer</h3>
35
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis lectus metus, at posuere neque.</p>
36
+ </li>
37
+ <li class="span4">
38
+ <div class="featured-photos">
39
+ <img src="/assets/team1.png" alt="dodolan manuk profile">
40
+ </div>
41
+ <h3>web designer</h3>
42
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis lectus metus, at posuere neque.</p>
43
+ </li>
44
+ </ul>
45
+ </div>
46
+
47
+ <div class="row-fluid padd20-top-btm">
48
+ <div class="span12 t-center">
49
+ <h3>Lorem ipsum dolor sit amet</h3>
50
+ <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis lectus metus, at posuere neque. Sed pharetra nibh eget orci convallis at posuere leo convallis. Sed blandit augue vitae augue scelerisque bibendum. Vivamus sit amet libero turpis, non venenatis urna. In blandit, odio convallis suscipit venenatis, ante ipsum cursus augue.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus quis lectus metus, at posuere neque.</p>
51
+ </div>
52
+ </div>
53
+ </div>
54
+ </div>
55
+ <%= render 'layouts/footer' %>
@@ -0,0 +1,3 @@
1
+ <script type="text/javascript">
2
+ <%= @js %>
3
+ </script>
@@ -0,0 +1,110 @@
1
+ <%= render 'layouts/header' %>
2
+ <%= render 'layouts/banner' %>
3
+ <div class="page-content">
4
+ <div class="container">
5
+ <div class="row-fluid">
6
+ <div class="span12">
7
+ <ul class="breadcrumb">
8
+ <li><a href="#">Home</a> <span class="divider">/</span></li>
9
+ <li class="active">Testimony</li>
10
+ </ul>
11
+ </div>
12
+ </div>
13
+
14
+ <div class="row-fluid testimoni">
15
+ <h3 class="t-center">Testimony</h3>
16
+ <hr>
17
+ <ul class="thumbnails">
18
+ <li class="span4">
19
+ <div class="thumbnail">
20
+ <div class="caption">
21
+ <h3>&#8212; John Doe</h3>
22
+ <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
23
+ </div>
24
+ </div>
25
+ </li>
26
+ <li class="span4">
27
+ <div class="thumbnail">
28
+ <div class="caption">
29
+ <h3>&#8212; John Doe</h3>
30
+ <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
31
+ </div>
32
+ </div>
33
+ </li>
34
+ <li class="span4">
35
+ <div class="thumbnail">
36
+ <div class="caption">
37
+ <h3>&#8212; John Doe</h3>
38
+ <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
39
+ </div>
40
+ </div>
41
+ </li>
42
+ <li class="span4">
43
+ <div class="thumbnail">
44
+ <div class="caption">
45
+ <h3>&#8212; John Doe</h3>
46
+ <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
47
+ </div>
48
+ </div>
49
+ </li>
50
+ <li class="span4">
51
+ <div class="thumbnail">
52
+ <div class="caption">
53
+ <h3>&#8212; John Doe</h3>
54
+ <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
55
+ </div>
56
+ </div>
57
+ </li>
58
+ <li class="span4">
59
+ <div class="thumbnail">
60
+ <div class="caption">
61
+ <h3>&#8212; John Doe</h3>
62
+ <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
63
+ </div>
64
+ </div>
65
+ </li>
66
+ <li class="span4">
67
+ <div class="thumbnail">
68
+ <div class="caption">
69
+ <h3>&#8212; John Doe</h3>
70
+ <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
71
+ </div>
72
+ </div>
73
+ </li>
74
+ <li class="span4">
75
+ <div class="thumbnail">
76
+ <div class="caption">
77
+ <h3>&#8212; John Doe</h3>
78
+ <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
79
+ </div>
80
+ </div>
81
+ </li>
82
+ <li class="span4">
83
+ <div class="thumbnail">
84
+ <div class="caption">
85
+ <h3>&#8212; John Doe</h3>
86
+ <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
87
+ </div>
88
+ </div>
89
+ </li>
90
+ <li class="span4">
91
+ <div class="thumbnail">
92
+ <div class="caption">
93
+ <h3>&#8212; John Doe</h3>
94
+ <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
95
+ </div>
96
+ </div>
97
+ </li>
98
+ <li class="span4">
99
+ <div class="thumbnail">
100
+ <div class="caption">
101
+ <h3>&#8212; John Doe</h3>
102
+ <p>Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec id elit non mi porta gravida at eget metus. Nullam id dolor id nibh ultricies vehicula ut id elit.</p>
103
+ </div>
104
+ </div>
105
+ </li>
106
+ </ul>
107
+ </div>
108
+ </div>
109
+ </div>
110
+ <%= render 'layouts/footer' %>
@@ -0,0 +1,4 @@
1
+
2
+ <%= foo %>
3
+
4
+ <%= raw @page.content %>
@@ -242,6 +242,132 @@ Caboose::Engine.routes.draw do
242
242
  post "admin/ab-variants/:variant_id/options" => "ab_options#admin_create"
243
243
  delete "admin/ab-options/:id" => "ab_options#admin_delete"
244
244
 
245
+ # Cart
246
+ get '/cart' => 'cart#index'
247
+ get '/cart/items' => 'cart#list'
248
+ get '/cart/item-count' => 'cart#item_count'
249
+ post '/cart/items' => 'cart#add'
250
+ put '/cart/items/:id' => 'cart#update'
251
+ delete '/cart/items/:id' => 'cart#remove'
252
+
253
+ # Checkout
254
+ get '/checkout' => 'checkout#index'
255
+ get '/checkout/step-one' => 'checkout#step_one'
256
+ get '/checkout/step-two' => 'checkout#step_two'
257
+ get '/checkout/step-three' => 'checkout#step_three'
258
+ get '/checkout/step-four' => 'checkout#step_four'
259
+ get '/checkout/thanks' => 'checkout#thanks'
260
+
261
+ put '/checkout/address' => 'checkout#update_address'
262
+ post '/checkout/attach-user' => 'checkout#attach_user'
263
+ post '/checkout/attach-guest' => 'checkout#attach_guest'
264
+ put '/checkout/shipping' => 'checkout#update_shipping'
265
+ get '/checkout/relay/:order_id' => 'checkout#relay'
266
+ post '/checkout/relay/:order_id' => 'checkout#relay'
267
+ get '/checkout/empty' => 'checkout#empty'
268
+
269
+ # Products
270
+ get '/products/:id/info' => 'products#info'
271
+ get '/products/:id' => 'products#index', :constraints => { :id => /.*/ }
272
+ get '/products' => 'products#index'
273
+
274
+ post '/variants/find-by-options' => 'variants#find_by_options'
275
+ get '/variants/:id/display-image' => 'variants#display_image'
276
+
277
+ get '/admin/variants/group' => 'variants#admin_group'
278
+
279
+ get '/admin/products/:id/variants/group' => 'products#admin_group_variants'
280
+ post '/admin/products/:id/variants/add' => 'products#admin_add_variants'
281
+ post '/admin/products/:id/variants/remove' => 'products#admin_remove_variants'
282
+ post '/admin/products/:id/variants/add-multiple' => 'products#admin_add_multiple_variants'
283
+
284
+ get '/admin/products/add-upcs' => 'products#admin_add_upcs'
285
+
286
+ get '/admin/vendors' => 'vendors#admin_index'
287
+ get '/admin/vendors/status-options' => 'vendors#status_options'
288
+ get '/admin/vendors/new' => 'vendors#admin_new'
289
+ get '/admin/vendors/:id/edit' => 'vendors#admin_edit'
290
+ post '/admin/vendors/create' => 'vendors#admin_create'
291
+ put '/admin/vendors/:id/update' => 'vendors#admin_update'
292
+
293
+ # Orders
294
+
295
+ get '/admin/orders/:id/void' => 'orders#admin_void'
296
+ get '/admin/orders/:id/refund' => 'orders#admin_refund'
297
+ post '/admin/orders/:id/resend-confirmation' => 'orders#admin_resend_confirmation'
298
+
299
+ post "/reviews/add" => "reviews#add"
300
+
301
+ get "/admin/products" => "products#admin_index"
302
+ get '/admin/products/sort' => 'products#admin_sort'
303
+ put '/admin/products/update-sort-order' => 'products#admin_update_sort_order'
304
+ put "/admin/products/update-vendor-status/:id" => "products#admin_update_vendor_status"
305
+ get "/admin/products/new" => "products#admin_new"
306
+ get "/admin/products/status-options" => "products#admin_status_options"
307
+ get "/admin/products/:id/general" => "products#admin_edit_general"
308
+ get "/admin/products/:id/description" => "products#admin_edit_description"
309
+ get "/admin/products/:id/categories" => "products#admin_edit_categories"
310
+ post "/admin/products/:id/categories" => "products#admin_add_to_category"
311
+ delete "/admin/products/:id/categories/:category_id" => "products#admin_remove_from_category"
312
+ get "/admin/products/:id/variants" => "products#admin_edit_variants"
313
+ get "/admin/products/:id/variants/json" => "products#admin_variants_json"
314
+ get "/admin/products/:id/variant-cols" => "products#admin_edit_variant_columns"
315
+ put "/admin/products/:id/variant-cols" => "products#admin_update_variant_columns"
316
+ get "/admin/products/:id/variants/sort-order" => "products#admin_edit_variant_sort_order"
317
+ put '/admin/products/:id/variants/option1-sort-order' => 'products#admin_update_variant_option1_sort_order'
318
+ put '/admin/products/:id/variants/option2-sort-order' => 'products#admin_update_variant_option2_sort_order'
319
+ put '/admin/products/:id/variants/option3-sort-order' => 'products#admin_update_variant_option3_sort_order'
320
+ get "/admin/products/:id/images" => "products#admin_edit_images"
321
+ post "/admin/products/:id/images" => "products#admin_add_image"
322
+ get "/admin/products/:id/collections" => "products#admin_edit_collections"
323
+ get "/admin/products/:id/seo" => "products#admin_edit_seo"
324
+ get "/admin/products/:id/options" => "products#admin_edit_options"
325
+ get "/admin/products/:id/delete" => "products#admin_delete_form"
326
+ put "/admin/products/:id" => "products#admin_update"
327
+ post "/admin/products" => "products#admin_add"
328
+ delete "/admin/products/:id" => "products#admin_delete"
329
+ put "/admin/products/:id/update-vendor" => "products#admin_update_vendor"
330
+
331
+ get "/admin/products/:product_id/variants/:variant_id/edit" => "variants#admin_edit"
332
+ get "/admin/variants/status-options" => "variants#admin_status_options"
333
+ get "/admin/variants/:variant_id/edit" => "variants#admin_edit"
334
+ put "/admin/variants/:id/attach-to-image" => "variants#admin_attach_to_image"
335
+ put "/admin/variants/:id/unattach-from-image" => "variants#admin_unattach_from_image"
336
+ put "/admin/variants/:id" => "variants#admin_update"
337
+ get "/admin/products/:id/variants/new" => "variants#admin_new"
338
+ post "/admin/products/:id/variants" => "variants#admin_add"
339
+ delete "/admin/variants/:id" => "variants#admin_delete"
340
+
341
+ get "/admin/categories" => "categories#admin_index"
342
+ get "/admin/categories/new" => "categories#admin_new"
343
+ get "/admin/categories/options" => "categories#admin_options"
344
+ get "/admin/categories/:id/edit" => "categories#admin_edit"
345
+ put "/admin/categories/:id" => "categories#admin_update"
346
+ get '/admin/categories/status-options' => 'categories#admin_status_options'
347
+ post "/admin/categories/:id" => "categories#admin_update"
348
+ post "/admin/categories" => "categories#admin_add"
349
+ delete "/admin/categories/:id" => "categories#admin_delete"
350
+
351
+ get "/admin/product-images/:id/variant-ids" => "product_images#admin_variant_ids"
352
+ get "/admin/product-images/:id/variants" => "product_images#admin_variants"
353
+ delete "/admin/product-images/:id" => "product_images#admin_delete"
354
+ get "/variant-images/:id" => "product_images#variant_images"
355
+
356
+ get "/admin/orders" => "orders#admin_index"
357
+ get "/admin/orders/test-info" => "orders#admin_mail_test_info"
358
+ get "/admin/orders/test-gmail" => "orders#admin_mail_test_gmail"
359
+ get "/admin/orders/line-item-status-options" => "orders#admin_line_item_status_options"
360
+ get "/admin/orders/status-options" => "orders#admin_status_options"
361
+ get "/admin/orders/new" => "orders#admin_new"
362
+ get "/admin/orders/:id/capture" => "orders#capture_funds"
363
+ get "/admin/orders/:id/json" => "orders#admin_json"
364
+ get "/admin/orders/:id/print" => "orders#admin_print"
365
+ get "/admin/orders/:id/send-to-quickbooks" => "orders#admin_send_to_quickbooks"
366
+ get "/admin/orders/:id" => "orders#admin_edit"
367
+ put "/admin/orders/:id" => "orders#admin_update"
368
+ put "/admin/orders/:order_id/line-items/:id" => "orders#admin_update_line_item"
369
+ delete "/admin/orders/:id" => "orders#admin_delete"
370
+
245
371
  # API
246
372
  get "caboose/block-types" => "block_types#api_block_type_list"
247
373
  get "caboose/block-types/:name" => "block_types#api_block_type"
@@ -73,6 +73,51 @@ module Caboose
73
73
 
74
74
  # Login layout
75
75
  mattr_accessor :login_layout
76
- @@login_layout = 'caboose/modal'
76
+ @@login_layout = 'caboose/modal'
77
+
78
+ # Whether or not to use the store
79
+ mattr_accessor :use_store
80
+ @@use_store = false
81
+
82
+ # The root URL for the store
83
+ mattr_accessor :store_url
84
+ @@store_url = ''
85
+
86
+ # The payment processor details
87
+ mattr_accessor :payment_processor
88
+ @@payment_processor = {
89
+ :name => 'stripe',
90
+ :api_key => '',
91
+ :username => '',
92
+ :password => ''
93
+ }
94
+
95
+ # Store shipping details
96
+ mattr_accessor :store_shipping
97
+ @@store_shipping = {
98
+ :ups => { :username => '', :password => '', :key => '' },
99
+ :usps => { :username => 'avondalebrewing', :password => 'Missfancy2011', :key => '' },
100
+ :origin => { :country => '', :state => '', :city => '', :zip => '' },
101
+ :allowed_shipping_method_codes => [],
102
+ :default_shipping_method_code => ''
103
+ }
104
+
105
+ # Who gets the email when an order is received
106
+ mattr_accessor :store_fulfillment_email
107
+ @@store_fulfillment_email = ''
108
+
109
+ # Who gets the email when an order is ready to be shipped
110
+ mattr_accessor :store_shipping_email
111
+ @@store_shipping_email = ''
112
+
113
+ mattr_accessor :store_contact_email
114
+ @@store_contact_email = ''
115
+
116
+ # How much to charge for handling (of the order subtotal)
117
+ mattr_accessor :store_handling_percentage
118
+ @@store_handling_percentage = ''
119
+
120
+ mattr_accessor :from_address
121
+ @@from_address = ''
77
122
 
78
123
  end
@@ -77,6 +77,7 @@ module Caboose
77
77
  require 'jquery-rails'
78
78
  initializer 'caboose.assets.precompile' do |app|
79
79
  app.config.assets.precompile += [
80
+
80
81
  # Images
81
82
  'caboose/caboose_logo_small.png',
82
83
  'caboose/caboose_nav_black.png',
@@ -88,12 +89,21 @@ module Caboose
88
89
  'caboose/loading_small_white_on_black.gif',
89
90
  'caboose/loading_white_on_black.gif',
90
91
  'caboose/search.png',
92
+
91
93
  # Javascript
92
94
  'caboose/admin_block_edit.js',
95
+ 'caboose/admin_images_index.js',
93
96
  'caboose/admin_page_edit_content.js',
94
97
  'caboose/admin_page_new_blocks.js',
98
+ 'caboose/admin_products.js',
95
99
  'caboose/admin.js',
96
100
  'caboose/application.js',
101
+ 'caboose/cart.js',
102
+ 'caboose/checkout_step1.js',
103
+ 'caboose/checkout_step2.js',
104
+ 'caboose/checkout_step3.js',
105
+ 'caboose/checkout_step4.js',
106
+ 'caboose/main.js',
97
107
  'caboose/modal_integration.js',
98
108
  'caboose/modal.js',
99
109
  'caboose/model/all.js',
@@ -109,6 +119,7 @@ module Caboose
109
119
  'caboose/model/bound_text.js',
110
120
  'caboose/model/bound_textarea.js',
111
121
  'caboose/model/class.js',
122
+ 'caboose/model/index_table.js',
112
123
  'caboose/model/model_binder.js',
113
124
  'caboose/model/model.js',
114
125
  'caboose/model/s3.js',
@@ -125,7 +136,8 @@ module Caboose
125
136
  'caboose/jquery.detect.js',
126
137
  'caboose/model/s3.js',
127
138
  'caboose/model/bound_s3_image.js',
128
- 'caboose/model/bound_file.js',
139
+ 'caboose/model/bound_file.js',
140
+ 'caboose/product.js',
129
141
  'jquery.js',
130
142
  'jquery_ujs.js',
131
143
  'jquery-ui.js',
@@ -174,6 +186,10 @@ module Caboose
174
186
  'caboose/model_binder.css',
175
187
  'colorbox-rails/colorbox-rails.css',
176
188
  'caboose/admin_page_edit_content.css',
189
+ 'caboose/admin_crumbtrail.css',
190
+ 'caboose/admin_images_index.css',
191
+ 'caboose/admin_main.css',
192
+ 'caboose/admin_page_edit_content.css',
177
193
  'caboose/admin.css',
178
194
  'caboose/application.css',
179
195
  'caboose/bound_input.css',
@@ -184,8 +200,11 @@ module Caboose
184
200
  'caboose/icomoon_fonts.css',
185
201
  'caboose/login.css',
186
202
  'caboose/modal.css',
203
+ 'caboose/model_binder.css',
187
204
  'caboose/page_bar_generator.css',
205
+ 'caboose/print.css',
188
206
  'caboose/register.css',
207
+ 'caboose/responsive.css',
189
208
  'caboose/station_modal.css',
190
209
  'caboose/station_sidebar.css',
191
210
  'caboose/tinymce.css',
@@ -198,3 +217,22 @@ module Caboose
198
217
  end
199
218
  end
200
219
  end
220
+
221
+ #initializer 'caboose_store.payment_processor', :after => :finish_hook do |app|
222
+ # case Caboose::payment_processor
223
+ # when 'authorize.net'
224
+ # Caboose::PaymentProcessor = Caboose::PaymentProcessors::Authorizenet
225
+ # when 'payscape'
226
+ # Caboose::PaymentProcessor = Caboose::PaymentProcessors::Payscape
227
+ # end
228
+ #end
229
+ #
230
+ #initializer 'caboose_store.cart', :after => :finish_hook do |app|
231
+ # ActiveSupport.on_load(:action_controller) do
232
+ # include Caboose::BootStrapper
233
+ # end
234
+ #
235
+ # Caboose::User.class_eval do
236
+ # self.primary_key = :id
237
+ # end
238
+ #end