nimbleshop_simply 0.0.1.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. data/README.md +11 -0
  2. data/app/assets/images/nimbleshop_simply/cart.png +0 -0
  3. data/app/assets/images/nimbleshop_simply/cart_button.png +0 -0
  4. data/app/assets/images/nimbleshop_simply/cart_hover.png +0 -0
  5. data/app/assets/images/nimbleshop_simply/facebook.png +0 -0
  6. data/app/assets/images/nimbleshop_simply/lock.png +0 -0
  7. data/app/assets/images/nimbleshop_simply/mail.png +0 -0
  8. data/app/assets/images/nimbleshop_simply/twitter.png +0 -0
  9. data/app/assets/javascripts/nimbleshop_simply/application.js +21 -0
  10. data/app/assets/javascripts/nimbleshop_simply/load_states.js.coffee +40 -0
  11. data/app/assets/javascripts/nimbleshop_simply/order.js.coffee +2 -0
  12. data/app/assets/javascripts/nimbleshop_simply/remove_item_from_cart.js.coffee +6 -0
  13. data/app/assets/javascripts/nimbleshop_simply/shipping_address_same_as_billing_address.js.coffee +11 -0
  14. data/app/assets/javascripts/nimbleshop_simply/thumbnail.js.coffee +14 -0
  15. data/app/assets/stylesheets/nimbleshop_simply/cart.css.scss +53 -0
  16. data/app/assets/stylesheets/nimbleshop_simply/cart_button.css.scss +59 -0
  17. data/app/assets/stylesheets/nimbleshop_simply/custom.css.scss +259 -0
  18. data/app/assets/stylesheets/nimbleshop_simply/override_bootstrap.css +11 -0
  19. data/app/assets/stylesheets/nimbleshop_simply/simply.css +14 -0
  20. data/app/assets/stylesheets/nimbleshop_simply/themed_bootstrap_and_overrides.css.less +36 -0
  21. data/app/controllers/nimbleshop_simply/application_controller.rb +37 -0
  22. data/app/controllers/nimbleshop_simply/carts_controller.rb +34 -0
  23. data/app/controllers/nimbleshop_simply/checkout/payments_controller.rb +19 -0
  24. data/app/controllers/nimbleshop_simply/checkout/shipping_addresses_controller.rb +31 -0
  25. data/app/controllers/nimbleshop_simply/checkout/shipping_methods_controller.rb +25 -0
  26. data/app/controllers/nimbleshop_simply/orders_controller.rb +24 -0
  27. data/app/controllers/nimbleshop_simply/pages_controller.rb +13 -0
  28. data/app/controllers/nimbleshop_simply/product_groups_controller.rb +18 -0
  29. data/app/controllers/nimbleshop_simply/products_controller.rb +30 -0
  30. data/app/helpers/nimbleshop_simply/application_helper.rb +24 -0
  31. data/app/views/layouts/_footer.html.erb +30 -0
  32. data/app/views/layouts/_google_analytics.html.erb +12 -0
  33. data/app/views/layouts/_top_bar.html.erb +24 -0
  34. data/app/views/layouts/_twitter.html.erb +4 -0
  35. data/app/views/layouts/email.html.erb +3 -0
  36. data/app/views/layouts/simply.html.erb +65 -0
  37. data/app/views/nimbleshop_simply/carts/_empty_cart.html.erb +4 -0
  38. data/app/views/nimbleshop_simply/carts/_line_item.html.erb +38 -0
  39. data/app/views/nimbleshop_simply/carts/show.html.erb +51 -0
  40. data/app/views/nimbleshop_simply/checkout/payments/new.html.erb +16 -0
  41. data/app/views/nimbleshop_simply/checkout/shipping_addresses/_billing_address.html.erb +76 -0
  42. data/app/views/nimbleshop_simply/checkout/shipping_addresses/_contact_information.html.erb +16 -0
  43. data/app/views/nimbleshop_simply/checkout/shipping_addresses/_error.html.erb +33 -0
  44. data/app/views/nimbleshop_simply/checkout/shipping_addresses/_shipping_address.html.erb +82 -0
  45. data/app/views/nimbleshop_simply/checkout/shipping_addresses/new.html.erb +20 -0
  46. data/app/views/nimbleshop_simply/checkout/shipping_methods/_error.html.erb +9 -0
  47. data/app/views/nimbleshop_simply/checkout/shipping_methods/_no_shipping_method.html.erb +4 -0
  48. data/app/views/nimbleshop_simply/checkout/shipping_methods/_shipping_methods.html.erb +14 -0
  49. data/app/views/nimbleshop_simply/checkout/shipping_methods/new.html.erb +18 -0
  50. data/app/views/nimbleshop_simply/link_groups/_link_group.html.erb +9 -0
  51. data/app/views/nimbleshop_simply/nimbleshohp_simply/_footer.html.erb +30 -0
  52. data/app/views/nimbleshop_simply/nimbleshohp_simply/_google_analytics.html.erb +12 -0
  53. data/app/views/nimbleshop_simply/nimbleshohp_simply/_top_bar.html.erb +24 -0
  54. data/app/views/nimbleshop_simply/nimbleshohp_simply/_twitter.html.erb +4 -0
  55. data/app/views/nimbleshop_simply/nimbleshohp_simply/application.html.erb +65 -0
  56. data/app/views/nimbleshop_simply/nimbleshohp_simply/email.html.erb +3 -0
  57. data/app/views/nimbleshop_simply/orders/show.html.erb +16 -0
  58. data/app/views/nimbleshop_simply/pages/about_us.html.erb +14 -0
  59. data/app/views/nimbleshop_simply/pages/contact_us.html.erb +17 -0
  60. data/app/views/nimbleshop_simply/product_groups/show.html.erb +7 -0
  61. data/app/views/nimbleshop_simply/products/_breadcrumb.html.erb +11 -0
  62. data/app/views/nimbleshop_simply/products/_link_group.html.erb +9 -0
  63. data/app/views/nimbleshop_simply/products/_product.html.erb +13 -0
  64. data/app/views/nimbleshop_simply/products/_products.html.erb +18 -0
  65. data/app/views/nimbleshop_simply/products/_sidebar.html.erb +5 -0
  66. data/app/views/nimbleshop_simply/products/index.html.erb +7 -0
  67. data/app/views/nimbleshop_simply/products/show.html.erb +62 -0
  68. data/app/views/nimbleshop_simply/shared/_order_summary.html.erb +18 -0
  69. data/app/views/nimbleshop_simply/shared/_order_summary_line_items.html.erb +30 -0
  70. data/app/views/nimbleshop_simply/shared/_order_summary_shipping_address.html.erb +30 -0
  71. data/app/views/nimbleshop_simply/shared/_order_summary_shipping_method.html.erb +16 -0
  72. data/app/views/nimbleshop_simply/shared/_shipping_and_tax_info.html.erb +16 -0
  73. data/config/routes.rb +25 -0
  74. data/lib/nimbleshop_simply/engine.rb +11 -0
  75. data/lib/nimbleshop_simply/version.rb +3 -0
  76. data/lib/nimbleshop_simply.rb +2 -0
  77. metadata +154 -0
@@ -0,0 +1,9 @@
1
+ <% if current_order.errors.any? %>
2
+
3
+ <div class="alert alert-error">
4
+ <ul>
5
+ <li> <%= current_order.errors.full_messages.first %></li>
6
+ </ul>
7
+ </div>
8
+
9
+ <% end %>
@@ -0,0 +1,4 @@
1
+ <div class="well" style="margin-top:20px;text-align: center;">
2
+ <h4> unable to complete your order (no shipping method available)</h4>
3
+ <%= link_to "Edit Shipping Address", [:edit, current_order]%>
4
+ </div>
@@ -0,0 +1,14 @@
1
+ <div class='control-group'>
2
+ <div class='controls'>
3
+ <% @shipping_methods.each do |shipping_method| %>
4
+ <label class='radio'>
5
+ <%= f.radio_button :shipping_method_id, shipping_method.id %>
6
+ <%= shipping_method.name + ' -- ' + number_to_currency(shipping_method.shipping_price) %>
7
+ </label>
8
+ <% end %>
9
+ </div>
10
+ </div>
11
+
12
+ <div class="form-actions">
13
+ <%= f.submit 'Submit', class: 'btn btn-primary', 'data-loading-text' => 'processing ...' %>
14
+ </div>
@@ -0,0 +1,18 @@
1
+ <% page_title 'Pick shipping method' %>
2
+ <br />
3
+
4
+ <div class='row'>
5
+ <div class='span6 well'>
6
+ <%= form_for(current_order , url: checkout_shipping_method_path, html: {class: 'form-horizontal'}) do |f| %>
7
+ <%= render 'error' %>
8
+
9
+ <% if @shipping_methods.any? %>
10
+ <%= render 'shipping_methods', f: f %>
11
+ <% else %>
12
+ <%= render 'no_shipping_method' %>
13
+ <% end %>
14
+
15
+ <% end %>
16
+ </div>
17
+ <%= render 'nimbleshop_simply/shared/order_summary' %>
18
+ </div>
@@ -0,0 +1,9 @@
1
+ <div class="sidebar_block">
2
+ <h3><%= link_group.name %></h3>
3
+
4
+ <ul class="unstyled">
5
+ <% link_group.navigations.each do |nav| %>
6
+ <li> <%= link_to nav.product_group.name, nav.product_group, title: nav.product_group.name %> </li>
7
+ <% end %>
8
+ </ul>
9
+ </div>
@@ -0,0 +1,30 @@
1
+ <% unless @no_footer %>
2
+ <hr />
3
+
4
+ <footer>
5
+ <div class='row'>
6
+ <div class='span6'>
7
+ <% available_payment_options_icons.each do |i| %>
8
+ <%= i %>
9
+ <% end %>
10
+ </div>
11
+
12
+ <div class='span4'>
13
+ <div>
14
+ <% if current_shop.twitter_handle.present? %>
15
+ <div style='float:left;width:80px;'>
16
+ <%= render 'layouts/twitter' %>
17
+ </div>
18
+ <% end %>
19
+ <div style='clear:both;'></div>
20
+ </div>
21
+ </div>
22
+
23
+ <div class='span2 powered_by'>
24
+ powered by <%= link_to 'nimbleShop', 'http://www.nimbleshop.com' %>
25
+ </div>
26
+ </div>
27
+ </footer>
28
+ <% end %>
29
+
30
+ <%= render 'layouts/google_analytics' %>
@@ -0,0 +1,12 @@
1
+ <script type="text/javascript">
2
+ var _gaq = _gaq || [];
3
+ _gaq.push(['_setAccount', '<%= current_shop.google_analytics_tracking_id %>' ]);
4
+ _gaq.push(['_trackPageview']);
5
+
6
+ (function() {
7
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
8
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
9
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
10
+ })();
11
+
12
+ </script>
@@ -0,0 +1,24 @@
1
+ <div class="navbar navbar-fixed-top">
2
+ <div class="navbar-inner">
3
+ <div class="container">
4
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
5
+ <span class="icon-bar"></span>
6
+ <span class="icon-bar"></span>
7
+ <span class="icon-bar"></span>
8
+ </a>
9
+
10
+ <%= link_to @shop.name, root_path, class: 'brand', id: 'site-name' %>
11
+
12
+ <div class="nav-collapse">
13
+ <ul class="nav">
14
+ <li><%= link_to 'All products', root_path, title: 'browse' %></li>
15
+ <li><%= link_to 'About us', about_us_path, title: 'about us' %></li>
16
+ <li><%= link_to 'Contact us', contact_us_path, title: 'contact us' %></li>
17
+ </ul>
18
+ <%= link_to cart_path, id: 'cart', title: 'cart', class: 'navbar-text pull-right cart_link' do %>
19
+ <span><%= pluralize(items_count_in_cart, '') %></span>
20
+ <% end %>
21
+ </div>
22
+ </div>
23
+ </div>
24
+ </div>
@@ -0,0 +1,4 @@
1
+ <a href="https://twitter.com/<%=current_shop.twitter_handle%>" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false">Follow @<%=current_shop.twitter_handle%></a>
2
+
3
+ <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
4
+
@@ -0,0 +1,65 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <title> <%= display_page_title %> </title>
6
+
7
+ <% if @shop.description.present? %>
8
+ <meta name="description" content="<%= @shop.description %>">
9
+ <% end %>
10
+
11
+ <% if @shop.author_name.present? %>
12
+ <meta name="author" content="<%= @shop.author_name %>">
13
+ <% end %>
14
+
15
+ <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
16
+ <!--[if lt IE 9]>
17
+ <script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
18
+ <![endif]-->
19
+
20
+ <%= stylesheet_link_tag 'nimbleshop_simply/application' %>
21
+ <style type="text/css">
22
+ body {
23
+ padding-top: 60px;
24
+ padding-bottom: 40px;
25
+ }
26
+ </style>
27
+
28
+ <!-- Le fav and touch icons -->
29
+ <link rel="shortcut icon" href="/images/favicon.ico">
30
+ <link rel="apple-touch-icon" href="/images/apple-touch-icon.png">
31
+ <link rel="apple-touch-icon" sizes="72x72" href="/images/apple-touch-icon-72x72.png">
32
+ <link rel="apple-touch-icon" sizes="114x114" href="/images/apple-touch-icon-114x114.png">
33
+ <%= csrf_meta_tag %>
34
+ <%= javascript_include_tag 'nimbleshop_simply/application' %>
35
+ <%= yield :js %>
36
+ </head>
37
+
38
+ <body id=<%=body_id%>>
39
+
40
+ <%= render 'layouts/top_bar' %>
41
+
42
+ <div class="container">
43
+ <div class="content">
44
+
45
+ <h1>
46
+ <%= @page_title unless @do_not_use_page_title %>
47
+ <% if @page_sub_title %>
48
+ <small> <%= @page_sub_title %> </small>
49
+ <% end %>
50
+ </h1>
51
+
52
+ <div class="row">
53
+ <div class="span12">
54
+ <%= yield %>
55
+ </div>
56
+ </div>
57
+
58
+ </div><!-- end of content -->
59
+
60
+ <%= render 'layouts/footer' %>
61
+
62
+ </div> <!-- /container -->
63
+
64
+ </body>
65
+ </html>
@@ -0,0 +1,3 @@
1
+ <p>This is email template. Should be fixed shortly</p>
2
+
3
+ <%= yield %>
@@ -0,0 +1,16 @@
1
+ <br />
2
+
3
+ <div class='alert alert-success'>
4
+ <p><strong> You have successfully completed the purchase. </strong> </p>
5
+ <ul>
6
+ <li>
7
+ An email is being sent to <strong><%= @order.email %></strong> with full information regarding
8
+ the order number, contents of the order and other details.
9
+ </li>
10
+ <li>
11
+ Your order number is #<strong><%= @order.number %></strong>. Please note down this number and use this order
12
+ number in case you need to contact us.
13
+ </li>
14
+ <%= payment_info_for_buyer(@order) %>
15
+ </ul>
16
+ </div>
@@ -0,0 +1,14 @@
1
+ <br />
2
+
3
+ <div class='well'>
4
+ <h2>About us</h2>
5
+
6
+ <p>
7
+ <strong>nimbleShop</strong> is a would be open source Ruby on Rails e-commerce framework.
8
+ </p>
9
+
10
+ <p>
11
+ You can follow <%= link_to 'nimbleShop on twitter', 'http://twitter.com/nimbleshop' %> .
12
+ </p>
13
+
14
+ </div>
@@ -0,0 +1,17 @@
1
+ <br />
2
+
3
+ <div class='well'>
4
+ <h2>Contact us</h2>
5
+ <br />
6
+
7
+ <h3>
8
+ hello.nimbleshop@gmail.com
9
+ </h3>
10
+
11
+ <br />
12
+
13
+ <p>
14
+ You can follow <%= link_to 'nimbleShop on twitter', 'http://twitter.com/nimbleshop' %> .
15
+ </p>
16
+
17
+ </div>
@@ -0,0 +1,7 @@
1
+ <div class='row'>
2
+
3
+ <%= render 'nimbleshop_simply/products/sidebar' %>
4
+
5
+ <%= render 'nimbleshop_simply/products/products', products: @products %>
6
+
7
+ </div>
@@ -0,0 +1,11 @@
1
+ <% if params[:controller] == 'product_groups' %>
2
+ <ul class="breadcrumb" style='margin-left:70px;'>
3
+ <li>
4
+ <%= link_to 'Home', root_path, class: 'divider' %>
5
+ <span class="divider">/</span>
6
+ </li>
7
+ <li>
8
+ <%= link_to @product_group.name, '', class: 'divider' %>
9
+ </li>
10
+ </ul>
11
+ <% end %>
@@ -0,0 +1,9 @@
1
+ <li class="nav-header">
2
+ <%= link_group.name %>
3
+ </li>
4
+
5
+ <% link_group.navigations.each do |nav| %>
6
+ <li>
7
+ <%= link_to nav.product_group.name, nav.product_group, title: nav.product_group.name %>
8
+ </li>
9
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <div class="thumbnail_container">
2
+
3
+ <%= link_to product_main_picture(product, :medium_plus), product, title: 'picture' %>
4
+
5
+ <div class="price">
6
+ <%= number_to_currency(product.price) %>
7
+ </div>
8
+
9
+ <div class="product_name">
10
+ <%= link_to truncate(product.name, length: 50), product, title: product.name %>
11
+ </div>
12
+
13
+ </div>
@@ -0,0 +1,18 @@
1
+ <div class='span10'>
2
+
3
+ <%= render partial: 'nimbleshop_simply/products/breadcrumb' %>
4
+
5
+ <% products.in_groups_of(3) do |group| %>
6
+ <ul class="unstyled row">
7
+ <% group.each do |product| %>
8
+ <% if product.blank? %>
9
+ &nbsp;
10
+ <% else %>
11
+ <li class="span3">
12
+ <%= render 'nimbleshop_simply/products/product', product: product %>
13
+ </li>
14
+ <% end %>
15
+ <% end %>
16
+ </ul>
17
+ <% end %>
18
+ </div>
@@ -0,0 +1,5 @@
1
+ <div class='span2'>
2
+ <div class="sidebar-nav">
3
+ <%= render @link_groups %>
4
+ </div>
5
+ </div>
@@ -0,0 +1,7 @@
1
+ <div class='row'>
2
+
3
+ <%= render 'sidebar' %>
4
+
5
+ <%= render 'products', products: @products %>
6
+
7
+ </div>
@@ -0,0 +1,62 @@
1
+ <br/>
2
+
3
+ <div class='row'>
4
+
5
+ <div class='span6'>
6
+ <ul class="thumbnails unstyled item_pics">
7
+
8
+ <% @product.pictures.each_with_index do |picture, indx| %>
9
+ <li style="<%= 'display:none' if indx != 0 %>">
10
+ <%= link_to(image_tag(picture.picture_url(:large), alt: @product.name), picture.picture_url(:large_plus),
11
+ class: 'thumbnail fancybox',
12
+ rel: 'gallery1') %>
13
+
14
+ </li>
15
+ <% end %>
16
+ </ul>
17
+
18
+ <br/>
19
+ <table id='product-thumbnails'>
20
+ <% @product.pictures.in_groups_of(5) do |group| %>
21
+ <tr>
22
+ <% group.each do |picture| %>
23
+ <td>
24
+ <% if picture.blank? %>
25
+ &nbsp;
26
+ <% else %>
27
+ <%= image_tag picture.picture_url(:small), alt: @product.name, class: 'thumb thumbnail' %>
28
+ <% end %>
29
+ </td>
30
+ <% end %>
31
+ </tr>
32
+ <% end %>
33
+ </table>
34
+
35
+ <br />
36
+ <%= link_to 'Continue shopping ...', main_app.root_url, title: 'Homepage' %>
37
+ </div>
38
+
39
+ <div class='span6'>
40
+
41
+ <h2 id='product-price'><%= number_to_currency(@product.price) %></h2>
42
+
43
+ <%= form_tag('/cart/add', method: 'post') do %>
44
+
45
+ <%= hidden_field_tag :permalink, @product.permalink %>
46
+
47
+ <div id="buy" class="clear">
48
+ <span class="cart_button">
49
+ <%= submit_tag 'Add to cart', class: '', id: 'add-to-cart', 'data-loading-text' => 'adding..' %>
50
+ </span>
51
+ </div>
52
+ <% end %>
53
+
54
+
55
+ <h4 id='product-description'>Description</h4>
56
+
57
+ <div id='product-description-content'>
58
+ <%= simple_format(@product.description) %>
59
+ </div>
60
+ </div>
61
+
62
+ </div>
@@ -0,0 +1,18 @@
1
+ <div class='span4 offset1' style='margin-top:5px;'>
2
+ <div class='well' id='order-summary'>
3
+ <h3>
4
+ Order summary
5
+ <small>
6
+ <%= link_to 'Edit', cart_path, id: 'edit_cart', title: 'edit cart' %>
7
+ </small>
8
+ </h3>
9
+
10
+ <br />
11
+
12
+ <%= render 'nimbleshop_simply/shared/order_summary_line_items' %>
13
+ <%= render 'nimbleshop_simply/shared/order_summary_shipping_address' %>
14
+ <%= render 'nimbleshop_simply/shared/order_summary_shipping_method' %>
15
+
16
+ </div>
17
+
18
+ </div>
@@ -0,0 +1,30 @@
1
+ <table class='table table-bordered' width='100%'>
2
+ <% current_order.line_items.each do |line_item| %>
3
+ <tr>
4
+ <td>
5
+ <div class='lhs'>
6
+ <%= truncate(line_item.product_name, length: 75) %>
7
+ <p>
8
+ <%= line_item.quantity %> x <%= number_to_currency(line_item.product_price) %> =
9
+ <strong> <%= number_to_currency(line_item.price) %> </strong>
10
+ </p>
11
+ </div>
12
+ <div class='rhs'>
13
+ <%= image_tag line_item.picture_small, alt: line_item.product_name %>
14
+ </div>
15
+ <div class='clear'></div>
16
+ </tr>
17
+ <% end %>
18
+
19
+ <%= render 'nimbleshop_simply/shared/shipping_and_tax_info' %>
20
+
21
+ <tr>
22
+ <td>
23
+ <div class='lhs order-total-amount'>
24
+ Total:
25
+ <strong> <%= number_to_currency(current_order.total_amount) %> </strong>
26
+ </div>
27
+ <div class='clear'></div>
28
+ </td>
29
+ </tr>
30
+ </table>
@@ -0,0 +1,30 @@
1
+ <% if current_order.shipping_address.persisted? && params[:controller] != "checkout/shipping_addresses" %>
2
+ <div class='row'>
3
+ <div class='span4' style='min-height:150px;'>
4
+ <h3>
5
+ Shipping address
6
+ <small>
7
+ <%= link_to 'Edit', new_checkout_shipping_address_path, title: 'Edit Shipping Address', id: 'edit_shipping_address' %>
8
+ </small>
9
+ </h3>
10
+ <address class='shipping-address'>
11
+ <%= display_address(current_order.shipping_address) %>
12
+ </address>
13
+
14
+ <h3> Billing address </h3>
15
+
16
+ <address class='billing-address'>
17
+ <% if current_order.shipping_address.use_for_billing %>
18
+ <i>Same as shipping address</i>
19
+ <% else %>
20
+ <%= display_address(current_order.billing_address) %>
21
+ <% end %>
22
+ </address>
23
+
24
+ <h3>Contact email</h3>
25
+ <address>
26
+ <%= current_order.email %>
27
+ </address>
28
+ </div>
29
+ </div>
30
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <% if current_order.shipping_method %>
2
+ <div class='row'>
3
+ <div class='span4'>
4
+ <h3>
5
+ Shipping method
6
+ <small>
7
+ <%= link_to 'Edit', new_checkout_shipping_method_path, id: 'edit_shipping_method', title: 'edit shipping method' %>
8
+ </small>
9
+ </h3>
10
+ <address class='shipping-method'>
11
+ <%= current_order.shipping_method.name %>
12
+ ( <%= number_to_currency(current_order.shipping_method.shipping_price) %> )
13
+ </address>
14
+ </div>
15
+ </div>
16
+ <% end %>
@@ -0,0 +1,16 @@
1
+ <% if params[:controller] == 'checkout/payments' %>
2
+ <tr>
3
+ <td>
4
+ <div class='lhs order-shipping-cost-amount'>
5
+ Shipping: <strong> <%= number_to_currency(current_order.shipping_method.shipping_cost) %> </strong>
6
+ </div>
7
+ <div class='clear'></div>
8
+ </tr>
9
+ <tr>
10
+ <td>
11
+ <div class='lhs order-tax-amount'>
12
+ Tax: <strong> <%= number_to_currency(current_order.tax) %> </strong>
13
+ </div>
14
+ <div class='clear'></div>
15
+ </tr>
16
+ <% end %>
data/config/routes.rb ADDED
@@ -0,0 +1,25 @@
1
+ NimbleshopSimply::Engine.routes.draw do
2
+
3
+ get "/reset", to: "carts#reset"
4
+ get "/pages/about-us", to: "pages#about_us", as: :about_us
5
+ get "/pages/contact-us", to: "pages#contact_us", as: :contact_us
6
+
7
+ resources :product_groups, only: [:show]
8
+ resources :products, only: [:index, :show]
9
+
10
+ resources :orders, only: :show
11
+
12
+ namespace :checkout do
13
+ resource :shipping_address
14
+ resource :shipping_method
15
+ resource :payment
16
+ end
17
+
18
+ resource :cart, only: [:show, :update] do
19
+ member do
20
+ post :add
21
+ get :checkingout
22
+ end
23
+ end
24
+
25
+ end
@@ -0,0 +1,11 @@
1
+ module NimbleshopSimply
2
+ class Engine < ::Rails::Engine
3
+
4
+ isolate_namespace NimbleshopSimply
5
+
6
+ initializer 'nimbleshop_simply.precompile_assets' do |config|
7
+ Rails.application.config.assets.precompile += %w( nimbleshop_simply/simply.css )
8
+ end
9
+
10
+ end
11
+ end
@@ -0,0 +1,3 @@
1
+ module NimbleshopSimply
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,2 @@
1
+ require "nimbleshop_simply/engine"
2
+ require "fancybox-rails"