camaleon_ecommerce 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (87) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +3 -0
  4. data/Rakefile +37 -0
  5. data/app/assets/javascripts/plugins/ecommerce/admin.js +33 -0
  6. data/app/assets/javascripts/plugins/ecommerce/cart.js +207 -0
  7. data/app/assets/javascripts/plugins/ecommerce/fix_form.js +10 -0
  8. data/app/assets/javascripts/plugins/ecommerce/jquery.creditCardValidator.js +208 -0
  9. data/app/assets/stylesheets/plugins/ecommerce/admin.scss +122 -0
  10. data/app/assets/stylesheets/plugins/ecommerce/front.scss +36 -0
  11. data/app/controllers/plugins/ecommerce/admin/coupons_controller.rb +61 -0
  12. data/app/controllers/plugins/ecommerce/admin/orders_controller.rb +96 -0
  13. data/app/controllers/plugins/ecommerce/admin/payment_methods_controller.rb +90 -0
  14. data/app/controllers/plugins/ecommerce/admin/prices_controller.rb +70 -0
  15. data/app/controllers/plugins/ecommerce/admin/settings_controller.rb +22 -0
  16. data/app/controllers/plugins/ecommerce/admin/shipping_methods_controller.rb +62 -0
  17. data/app/controllers/plugins/ecommerce/admin/tax_rates_controller.rb +61 -0
  18. data/app/controllers/plugins/ecommerce/admin_controller.rb +20 -0
  19. data/app/controllers/plugins/ecommerce/front/checkout_controller.rb +166 -0
  20. data/app/controllers/plugins/ecommerce/front/orders_controller.rb +255 -0
  21. data/app/controllers/plugins/ecommerce/front_controller.rb +18 -0
  22. data/app/helpers/plugins/ecommerce/ecommerce_email_helper.rb +46 -0
  23. data/app/helpers/plugins/ecommerce/ecommerce_functions_helper.rb +49 -0
  24. data/app/helpers/plugins/ecommerce/ecommerce_helper.rb +240 -0
  25. data/app/helpers/plugins/ecommerce/ecommerce_payment_helper.rb +67 -0
  26. data/app/models/plugins/ecommerce/cart.rb +40 -0
  27. data/app/models/plugins/ecommerce/coupon.rb +25 -0
  28. data/app/models/plugins/ecommerce/coupon_decorator.rb +60 -0
  29. data/app/models/plugins/ecommerce/order.rb +65 -0
  30. data/app/models/plugins/ecommerce/order_decorator.rb +54 -0
  31. data/app/models/plugins/ecommerce/order_detail.rb +13 -0
  32. data/app/models/plugins/ecommerce/payment_method.rb +29 -0
  33. data/app/models/plugins/ecommerce/product.rb +14 -0
  34. data/app/models/plugins/ecommerce/shipping_method.rb +26 -0
  35. data/app/models/plugins/ecommerce/tax_rate.rb +18 -0
  36. data/app/views/camaleon_cms/html_mailer/order_received.html.erb +3 -0
  37. data/app/views/camaleon_cms/html_mailer/order_received_admin.html.erb +3 -0
  38. data/app/views/camaleon_cms/html_mailer/recovery_cart.html.erb +4 -0
  39. data/app/views/layouts/plugins/ecommerce/mailer.html.erb +22 -0
  40. data/app/views/plugins/ecommerce/admin/coupons/form.html.erb +73 -0
  41. data/app/views/plugins/ecommerce/admin/coupons/index.html.erb +50 -0
  42. data/app/views/plugins/ecommerce/admin/index.html.erb +2 -0
  43. data/app/views/plugins/ecommerce/admin/orders/form.html.erb +64 -0
  44. data/app/views/plugins/ecommerce/admin/orders/index.html.erb +90 -0
  45. data/app/views/plugins/ecommerce/admin/orders/show.html.erb +173 -0
  46. data/app/views/plugins/ecommerce/admin/payment_methods/form.html.erb +115 -0
  47. data/app/views/plugins/ecommerce/admin/payment_methods/index.html.erb +43 -0
  48. data/app/views/plugins/ecommerce/admin/payment_methods/show.html.erb +70 -0
  49. data/app/views/plugins/ecommerce/admin/prices/form.html.erb +49 -0
  50. data/app/views/plugins/ecommerce/admin/prices/index.html.erb +39 -0
  51. data/app/views/plugins/ecommerce/admin/prices/show.html.erb +19 -0
  52. data/app/views/plugins/ecommerce/admin/products/index.html.erb +114 -0
  53. data/app/views/plugins/ecommerce/admin/settings/index.html.erb +25 -0
  54. data/app/views/plugins/ecommerce/admin/shipping_methods/form.html.erb +39 -0
  55. data/app/views/plugins/ecommerce/admin/shipping_methods/index.html.erb +41 -0
  56. data/app/views/plugins/ecommerce/admin/shipping_methods/show.html.erb +22 -0
  57. data/app/views/plugins/ecommerce/admin/tax_rates/form.html.erb +36 -0
  58. data/app/views/plugins/ecommerce/admin/tax_rates/index.html.erb +41 -0
  59. data/app/views/plugins/ecommerce/front/_post_list_item.html.erb +18 -0
  60. data/app/views/plugins/ecommerce/front/checkout/cart_index.html.erb +59 -0
  61. data/app/views/plugins/ecommerce/front/checkout/index.html.erb +166 -0
  62. data/app/views/plugins/ecommerce/front/index.html.erb +2 -0
  63. data/app/views/plugins/ecommerce/front/list_products.html.erb +34 -0
  64. data/app/views/plugins/ecommerce/front/orders/index.html.erb +46 -0
  65. data/app/views/plugins/ecommerce/front/orders/pay_by_bank_transfer.html.erb +67 -0
  66. data/app/views/plugins/ecommerce/front/orders/pay_by_credit_card.html.erb +131 -0
  67. data/app/views/plugins/ecommerce/front/orders/pay_by_credit_card_authorize_net.erb +150 -0
  68. data/app/views/plugins/ecommerce/front/orders/select_payment.html.erb +70 -0
  69. data/app/views/plugins/ecommerce/front/orders/show.html.erb +76 -0
  70. data/app/views/plugins/ecommerce/front/product.html.erb +105 -0
  71. data/app/views/plugins/ecommerce/layouts/_ecommerce.html.erb +41 -0
  72. data/app/views/plugins/ecommerce/partials/_form_address.html.erb +84 -0
  73. data/app/views/plugins/ecommerce/partials/_table_order_products.html.erb +85 -0
  74. data/config/camaleon_plugin.json +48 -0
  75. data/config/currency.json +154 -0
  76. data/config/currency_en.json +154 -0
  77. data/config/currency_es.json +154 -0
  78. data/config/custom_models.rb +64 -0
  79. data/config/locales/readme.txt +1 -0
  80. data/config/locales/translation.yml +371 -0
  81. data/config/routes.rb +57 -0
  82. data/lib/camaleon_ecommerce.rb +4 -0
  83. data/lib/ecommerce.rb +4 -0
  84. data/lib/ecommerce/engine.rb +6 -0
  85. data/lib/ecommerce/version.rb +3 -0
  86. data/lib/tasks/ecommerce_tasks.rake +4 -0
  87. metadata +185 -0
@@ -0,0 +1,131 @@
1
+ <%= render layout: 'plugins/ecommerce/layouts/ecommerce', locals: {} do %>
2
+ <%= form_tag(plugins_ecommerce_order_pay_by_credit_card_path(order: @order.slug), :method => "post", :class => "form", id: 'payment-form') do %>
3
+
4
+ <div class="row">
5
+ <h3 class="text-center">Details Ticket Bank Transfer (order: <%= @order.slug %>)</h3>
6
+ <% if @error.present? %>
7
+ <div class="alert alert-danger"> <%= @error %> </div>
8
+ <% end %>
9
+ <div id="user_details" class="col-md-6 col-md-offset-1">
10
+
11
+
12
+ <div class="panel panel-default">
13
+ <div class="panel-heading">
14
+ <h3 class="panel-title"><img class="pull-right" src="http://i76.imgup.net/accepted_c22e0.png">Payment Details</h3>
15
+ </div>
16
+ <div class="panel-body">
17
+
18
+ <div class="row">
19
+ <div class="col-xs-6 col-md-6">
20
+ <div class="form-group">
21
+ <label for="firstName">First Name</label>
22
+ <input type="text" class="form-control" name="firstName" placeholder="First Name" required autocomplete="off" />
23
+ </div>
24
+ </div>
25
+ <div class="col-xs-6 col-md-6 pull-right">
26
+ <div class="form-group">
27
+ <label for="lastName">Last Name</label>
28
+ <input type="text" class="form-control" name="lastName" placeholder="Last Name" required autocomplete="off" />
29
+ </div>
30
+ </div>
31
+ </div>
32
+ <div class="row">
33
+ <div class="col-xs-12">
34
+ <div class="form-group">
35
+ <label for="cardNumber">CARD NUMBER</label>
36
+ <div class="input-group">
37
+ <input type="text" class="form-control" name="cardNumber" placeholder="Valid Card Number" required autofocus data-stripe="number" autocomplete="off" />
38
+ <span class="input-group-addon"><i class="fa fa-credit-card"></i></span>
39
+ </div>
40
+ <div id="credit_card_log"></div>
41
+ </div>
42
+ </div>
43
+ </div>
44
+ <div class="row">
45
+ <div class="col-xs-7 col-md-7">
46
+ <div class="form-group">
47
+ <label for="expMonth">EXPIRATION DATE</label>
48
+ <div class="col-xs-6 col-lg-6 pl-ziro">
49
+ <input type="text" class="form-control" name="expMonth" placeholder="MM" required data-stripe="exp_month" autocomplete="off" />
50
+ </div>
51
+ <div class="col-xs-6 col-lg-6 pl-ziro">
52
+ <input type="text" class="form-control" name="expYear" placeholder="YY" required data-stripe="exp_year" autocomplete="off" />
53
+ </div>
54
+ </div>
55
+ </div>
56
+ <div class="col-xs-5 col-md-5 pull-right">
57
+ <div class="form-group">
58
+ <label for="cvCode">CV CODE</label>
59
+ <input type="password" class="form-control" name="cvCode" placeholder="CV" required data-stripe="cvc" autocomplete="off" />
60
+ </div>
61
+ </div>
62
+ </div>
63
+
64
+ <div class="row">
65
+ <div class="col-xs-12">
66
+ <button class="btn btn-success btn-lg btn-block" type="submit">Start Payment</button>
67
+ </div>
68
+ </div>
69
+ <div class="row" style="display:none;">
70
+ <div class="col-xs-12">
71
+ <p class="payment-errors"></p>
72
+ </div>
73
+ </div>
74
+ </div>
75
+ </div>
76
+
77
+ </div>
78
+ <div class="col-md-4">
79
+ <label for="">Details Bank Transfer</label>
80
+ <div class="well">
81
+ <h4><%= @payment_methods.name %></h4>
82
+ <p><%= @payment_methods.description %></p>
83
+ <ul class="ec-list-orders-address">
84
+ <li><strong>Amount:</strong> <span><%= current_site.current_unit %> <%= @order.get_meta("payment")[:amount] %></span></li>
85
+ </ul>
86
+ </div>
87
+ </div>
88
+ </div>
89
+
90
+ <% end %>
91
+ <!-- If you're using Stripe for payments -->
92
+
93
+ <%
94
+ append_asset_libraries({ecommerce_credit_card: { js: [plugin_gem_asset('jquery.creditCardValidator')]}})
95
+ add_asset_library('validate')
96
+ %>
97
+ <style>
98
+
99
+
100
+ #payment-form label{
101
+ display: block;
102
+ }
103
+ #payment-form .panel-heading .panel-title img{
104
+ margin-right: -16px;
105
+ margin-top: -12px;
106
+ }
107
+
108
+ /* CSS for Credit Card Payment form */
109
+ .panel-title {display: inline;font-weight: bold;}
110
+ .checkbox.pull-right { margin: 0; }
111
+ .pl-ziro { padding-left: 0px; }
112
+ .form-control.error {
113
+ border-color: red;
114
+ outline: 0;
115
+ box-shadow: inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(255,0,0,0.6);
116
+ }
117
+ label.error {
118
+ font-weight: bold;
119
+ color: red;
120
+ padding: 2px 8px;
121
+ margin-top: 2px;
122
+ }
123
+ .payment-errors {
124
+ font-weight: bold;
125
+ color: red;
126
+ padding: 2px 8px;
127
+ margin-top: 2px;
128
+ }
129
+ </style>
130
+
131
+ <% end %>
@@ -0,0 +1,150 @@
1
+ <%= render layout: 'plugins/ecommerce/layouts/ecommerce', locals: {} do %>
2
+ <%= form_tag(plugins_ecommerce_order_pay_by_credit_card_authorize_net_path(order: @order.slug), :method => "post", :class => "form", id: 'payment-form') do %>
3
+
4
+ <div class="row">
5
+ <h3 class="text-center">Details Ticket Bank Transfer (order: <%= @order.slug %>)</h3>
6
+ <% if @error.present? %>
7
+ <div class="alert alert-danger"> <%= @error %> </div>
8
+ <% end %>
9
+ <div id="user_details" class="col-md-6 col-md-offset-1">
10
+
11
+
12
+ <div class="panel panel-default">
13
+ <div class="panel-heading">
14
+ <h3 class="panel-title"><img class="pull-right" src="http://i76.imgup.net/accepted_c22e0.png">Payment
15
+ Details</h3>
16
+ </div>
17
+ <div class="panel-body">
18
+
19
+ <div class="row">
20
+ <div class="col-xs-6 col-md-6">
21
+ <div class="form-group">
22
+ <label for="firstName">First Name</label>
23
+ <input type="text" class="form-control" name="firstName" placeholder="First Name" required autocomplete="off"/>
24
+ </div>
25
+ </div>
26
+ <div class="col-xs-6 col-md-6 pull-right">
27
+ <div class="form-group">
28
+ <label for="lastName">Last Name</label>
29
+ <input type="text" class="form-control" name="lastName" placeholder="Last Name" required autocomplete="off"/>
30
+ </div>
31
+ </div>
32
+ </div>
33
+ <div class="row">
34
+ <div class="col-xs-12">
35
+ <div class="form-group">
36
+ <label for="cardNumber">CARD NUMBER</label>
37
+
38
+ <div class="input-group">
39
+ <input type="text" class="form-control" name="cardNumber" placeholder="Valid Card Number" required autofocus data-stripe="number" autocomplete="off"/>
40
+ <span class="input-group-addon"><i class="fa fa-credit-card"></i></span>
41
+ </div>
42
+ <div id="credit_card_log"></div>
43
+ </div>
44
+ </div>
45
+ </div>
46
+ <div class="row">
47
+ <div class="col-xs-7 col-md-7">
48
+ <div class="form-group">
49
+ <label for="expMonth">EXPIRATION DATE</label>
50
+
51
+ <div class="col-xs-6 col-lg-6 pl-ziro">
52
+ <input type="text" class="form-control" name="expMonth" placeholder="MM" required data-stripe="exp_month" autocomplete="off"/>
53
+ </div>
54
+ <div class="col-xs-6 col-lg-6 pl-ziro">
55
+ <input type="text" class="form-control" name="expYear" placeholder="YY" required data-stripe="exp_year" autocomplete="off"/>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ <div class="col-xs-5 col-md-5 pull-right">
60
+ <div class="form-group">
61
+ <label for="cvCode">CV CODE</label>
62
+ <input type="password" class="form-control" name="cvCode" placeholder="CV" required data-stripe="cvc" autocomplete="off"/>
63
+ </div>
64
+ </div>
65
+ </div>
66
+
67
+ <div class="row">
68
+ <div class="col-xs-12">
69
+ <button class="btn btn-success btn-lg btn-block" type="submit">Start Payment</button>
70
+ </div>
71
+ </div>
72
+ <div class="row" style="display:none;">
73
+ <div class="col-xs-12">
74
+ <p class="payment-errors"></p>
75
+ </div>
76
+ </div>
77
+ </div>
78
+ </div>
79
+
80
+ </div>
81
+ <div class="col-md-4">
82
+ <label for="">Details Bank Transfer</label>
83
+
84
+ <div class="well">
85
+ <h4><%= @payment_methods.name %></h4>
86
+
87
+ <p><%= @payment_methods.description %></p>
88
+ <ul class="ec-list-orders-address">
89
+ <li><strong>Amount:</strong>
90
+ <span><%= current_site.current_unit %> <%= @order.get_meta("payment")[:amount] %></span></li>
91
+ </ul>
92
+ </div>
93
+ </div>
94
+ </div>
95
+
96
+ <% end %>
97
+ <!-- If you're using Stripe for payments -->
98
+
99
+ <%
100
+ append_asset_libraries({ecommerce_credit_card: {js: [plugin_gem_asset('jquery.creditCardValidator')]}})
101
+ add_asset_library('validate')
102
+ %>
103
+ <style>
104
+
105
+
106
+ #payment-form label {
107
+ display: block;
108
+ }
109
+
110
+ #payment-form .panel-heading .panel-title img {
111
+ margin-right: -16px;
112
+ margin-top: -12px;
113
+ }
114
+
115
+ /* CSS for Credit Card Payment form */
116
+ .panel-title {
117
+ display: inline;
118
+ font-weight: bold;
119
+ }
120
+
121
+ .checkbox.pull-right {
122
+ margin: 0;
123
+ }
124
+
125
+ .pl-ziro {
126
+ padding-left: 0px;
127
+ }
128
+
129
+ .form-control.error {
130
+ border-color: red;
131
+ outline: 0;
132
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(255, 0, 0, 0.6);
133
+ }
134
+
135
+ label.error {
136
+ font-weight: bold;
137
+ color: red;
138
+ padding: 2px 8px;
139
+ margin-top: 2px;
140
+ }
141
+
142
+ .payment-errors {
143
+ font-weight: bold;
144
+ color: red;
145
+ padding: 2px 8px;
146
+ margin-top: 2px;
147
+ }
148
+ </style>
149
+
150
+ <% end %>
@@ -0,0 +1,70 @@
1
+ <%= render layout: 'plugins/ecommerce/layouts/ecommerce', locals: {} do %>
2
+
3
+ <%= form_tag(plugins_ecommerce_order_set_select_payment_path(order: @order.slug), :method => "post", :class => "form") do %>
4
+
5
+ <div id="payment" class="col-md-7">
6
+ <h3>Payment</h3>
7
+ <% @payment_methods = current_site.payment_methods.actives.all %>
8
+
9
+ <div id="e-payments-types" role="tabpanel">
10
+
11
+ <!-- Nav tabs -->
12
+ <ul class="nav nav-tabs" role="tablist">
13
+ <% @payment_methods.each_with_index do |payment, index| %>
14
+ <li role="presentation" class="<%= "active" if index == 0 %>"><a href="#<%= payment.slug %>" aria-controls="<%= payment.slug %>" role="tab" data-toggle="tab"><%= payment.name %></a></li>
15
+ <% end %>
16
+ </ul>
17
+
18
+ <!-- Tab panes -->
19
+ <div class="tab-content">
20
+ <% @payment_methods.each_with_index do |payment, index| %>
21
+ <div role="tabpanel" class="tab-pane <%= "active" if index == 0 %>" id="<%= payment.slug %>">
22
+
23
+ <input type="hidden" name="payment[payment_id]" value="<%= payment.id %>">
24
+ <% if payment.options[:type] == 'paypal' %>
25
+ <h3>Method by Paypal</h3>
26
+ <p><%= payment.description %></p>
27
+ <input type="hidden" name="payment[type]" value="paypal">
28
+ <div class="type-paypal">
29
+ <img src="https://www.paypalobjects.com/webstatic/mktg/logo/bdg_payments_by_pp_2line.png" alt="Buy now with PayPal" />
30
+ </div>
31
+ <% end %>
32
+ <% if payment.options[:type] == 'bank_transfer' %>
33
+ <h3>Method Bank Transfer</h3>
34
+ <p><%= payment.description %></p>
35
+ <input type="hidden" name="payment[type]" value="bank_transfer">
36
+ <ul class="ec-list-orders-address">
37
+ <li><strong>Number Account:</strong> <span> <%= payment.options[:bank_transfer_number_account] %></span></li>
38
+ <li><strong>Details:</strong> <span> <%= payment.options[:bank_transfer_detail] %></span></li>
39
+ </ul>
40
+ <% end %>
41
+ <% if payment.options[:type] == 'credit_card' %>
42
+ <h3>Method Credit Card</h3>
43
+ <p><%= payment.description %></p>
44
+ <input type="hidden" name="payment[type]" value="credit_card">
45
+ <img src="http://i76.imgup.net/accepted_c22e0.png" alt="Buy now with Credit Card" />
46
+ <% end %>
47
+ <% if payment.options[:type] == 'authorize_net' %>
48
+ <h3>Method by Authorize.net</h3>
49
+ <p><%= payment.description %></p>
50
+ <input type="hidden" name="payment[type]" value="authorize_net">
51
+ <img src="http://i76.imgup.net/accepted_c22e0.png" alt="Buy now with Authorize.net" />
52
+ <% end %>
53
+ </div>
54
+ <% end %>
55
+ </div>
56
+ </div>
57
+ <hr/>
58
+ <div class="text-center">
59
+ <button class="btn btn-warning btn-lg btn-block">Pay</button>
60
+ </div>
61
+
62
+
63
+ </div>
64
+ <div class="col-md-5">
65
+ <h3>Products and Payments</h3>
66
+ <%= render partial: 'plugins/ecommerce/partials/table_order_products', locals: {order: @order} %>
67
+ </div>
68
+ <% end %>
69
+
70
+ <% end %>
@@ -0,0 +1,76 @@
1
+ <%= render layout: 'plugins/ecommerce/layouts/ecommerce', locals: {} do %>
2
+ <div class="row">
3
+ <div class="col-md-4">
4
+ <h4>Order: <%= @order.slug %></h4>
5
+ <h4>Customer Info</h4>
6
+ <ul class="ec-list-orders-address">
7
+ <li><strong>Name:</strong> <span> <%= @order.details.customer %></span></li>
8
+ <li><strong>Email:</strong> <span> <%= @order.details.email %></span></li>
9
+ <li><strong>Phone:</strong> <span> <%= @order.details.phone %></span></li>
10
+ </ul>
11
+
12
+ <h4>billing address</h4>
13
+ <% detail = @order.get_meta("billing_address") %>
14
+ <ul class="ec-list-orders-address">
15
+ <li><strong>Name:</strong> <span><%= detail[:first_name] %> <%= detail[:last_name] %></span></li>
16
+ <li><strong>Address:</strong> <span><%= detail[:address1] %> <br/> <%= detail[:address2] %> <br/> <%= detail[:city] %> <br/> <%= detail[:state] %> <br/> <%= detail[:zip] %> <br/> <%= detail[:country] %></span></li>
17
+ </ul>
18
+
19
+ <h4>shipping address</h4>
20
+ <% detail = @order.get_meta("shipping_address") %>
21
+ <ul class="ec-list-orders-address">
22
+ <li><strong>Name:</strong> <span><%= detail[:first_name] %> <%= detail[:last_name] %></span></li>
23
+ <li><strong>Address:</strong> <span><%= detail[:address1] %> <br/> <%= detail[:address2] %> <br/> <%= detail[:city] %> <br/> <%= detail[:state] %> <br/> <%= detail[:zip] %> <br/> <%= detail[:country] %></span></li>
24
+ </ul>
25
+ </div>
26
+ <div class="col-md-8">
27
+ <h4>Products and Payments</h4>
28
+ <%= render partial: 'plugins/ecommerce/partials/table_order_products', locals: {order: @order} %>
29
+
30
+
31
+ <table class="table table-bordered">
32
+ <tbody>
33
+ <tr>
34
+ <th id="">Type Payment</th>
35
+ <th id=""></th>
36
+ </tr>
37
+
38
+ <tr>
39
+ <td><%= @order.payment_method.name rescue 'Not Payment' %></td>
40
+ <td><% if @order.get_meta("payment")[:amount].to_f > 0 && @order.unpaid? %>
41
+ <a href="<%= plugins_ecommerce_order_select_payment_path(order: @order.slug) %>" class="btn btn-warning">Pay Now</a> or
42
+ <a href="<%= plugins_ecommerce_order_select_payment_path(order: @order.slug, cancel: true) %>" class="btn btn-default btn-sm">Cancel Order</a>
43
+ <% else %>
44
+ <%= raw @order.the_pay_status %>
45
+ <% end %>
46
+ </td>
47
+ </tr>
48
+
49
+ </tbody>
50
+ </table>
51
+
52
+ <table class="table table-bordered">
53
+ <tbody>
54
+ <tr>
55
+ <th id="">Order Shipped</th>
56
+ <th id="">Shipped Date</th>
57
+ <th id="">URL Tracking</th>
58
+ </tr>
59
+
60
+ <tr>
61
+ <td><%= @order.shipping_method.name rescue 'Not Shipped Assigned' %></td>
62
+ <td> <%= @order.details.shipped_at || 'Not Shipped' %> </td>
63
+ <td> <%= @order.the_url_tracking %> </td>
64
+ </tr>
65
+ </tbody>
66
+ </table>
67
+
68
+ <div class="text-center">
69
+
70
+
71
+ </div>
72
+ </div>
73
+ </div>
74
+
75
+ <%#= debug @order.meta %>
76
+ <% end %>
@@ -0,0 +1,105 @@
1
+ <%= render layout: 'plugins/ecommerce/layouts/ecommerce', locals: {add_breadcrumb: @post.the_breadcrumb} do %>
2
+ <%
3
+ @field_values = @post.get_field_values_hash
4
+ %>
5
+ <div class="container-fluid">
6
+ <%#= render partial: 'partials/breadcrumb', locals: {breadcrumb: @post.the_breadcrumb} %>
7
+ <div class="row">
8
+ <div class="col-md-9 post-view">
9
+ <article class="post-content">
10
+ <div class="row">
11
+ <div class="col-md-6">
12
+
13
+ <div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
14
+ <!-- Indicators -->
15
+ <ol class="carousel-indicators">
16
+ <% @post.the_photos.each_with_index do |pthoto, index| %>
17
+ <li data-target="#carousel-example-generic" data-slide-to="<%= index %>" class="<%= 'active' if index == 0 %>"></li>
18
+ <% end %>
19
+ </ol>
20
+
21
+ <!-- Wrapper for slides -->
22
+ <div class="carousel-inner" role="listbox">
23
+
24
+ <% @post.the_photos.each_with_index do |pthoto, index| %>
25
+ <div class="item <%= 'active' if index == 0 %>">
26
+ <img src="<%= pthoto %>" class="center-block">
27
+ </div>
28
+ <% end %>
29
+
30
+ </div>
31
+
32
+ <!-- Controls -->
33
+ <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
34
+ <span class="glyphicon glyphicon-chevron-left fa fa-chevron-left" aria-hidden="true"></span>
35
+ <span class="sr-only">Previous</span>
36
+ </a>
37
+ <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
38
+ <span class="glyphicon glyphicon-chevron-right fa fa-chevron-right " aria-hidden="true"></span>
39
+ <span class="sr-only">Next</span>
40
+ </a>
41
+ </div>
42
+
43
+
44
+ </div>
45
+ <div class="col-md-6">
46
+ <h1><%= @post.the_title %></h1>
47
+
48
+ <h3>SKU: <%= @post.the_sku %> <span class="pull-right"><%= raw @post.the_featured_status %></span></h3>
49
+ <h4><%= @post.the_price %> <span class="pull-right"><%= raw @post.the_stock_status %></span></h4>
50
+ <hr/>
51
+ <p><%= @post.the_excerpt %></p>
52
+ <hr/>
53
+ <% if @post.in_stock? %>
54
+ <p>Items available: <%= @post.the_qty_real %></p>
55
+ <% if @post.the_qty_real.to_i > 0 %>
56
+ <%= form_tag(plugins_ecommerce_checkout_cart_add_path, :method => "post", :class => "form") do %>
57
+ <div class="">
58
+ <label class="">Qty: </label>
59
+ <%= number_field :cart, :qty, value: 1, min: 0, max: @post.the_qty_real.to_i %>
60
+ <%= hidden_field :cart, :product_id, value: @post.id %>
61
+
62
+ <button type="submit" class="btn"><i class="fa fa-shopping-cart"></i><%= t('plugin.ecommerce.add_to_cart') %></button>
63
+ </div>
64
+ <% end %>
65
+ <% end %>
66
+ <% end %>
67
+ </div>
68
+ </div>
69
+
70
+
71
+ <div class="row">
72
+
73
+ <div class="col-md-6">
74
+ <h3>Description</h3>
75
+
76
+ <div class="item-content">
77
+ <%= raw @post.the_content %>
78
+ </div>
79
+ </div>
80
+
81
+ <% attrs = []; @field_values[:ecommerce_attrs].to_a.each { |attr| attrs << JSON.parse(attr) rescue {} } %>
82
+ <% if attrs.present? %>
83
+ <div class="col-md-6">
84
+ <h3>Attributes</h3>
85
+ <table class="table table-bordered">
86
+ <% attrs.each do |data| %>
87
+ <tr>
88
+ <td><strong><%= data['attr'] %></strong></td>
89
+ <td><%= data['value'] %></td>
90
+ </tr>
91
+ <% end %>
92
+ </table>
93
+ </div>
94
+ <% end %>
95
+ </div>
96
+ </article>
97
+ </div>
98
+ <div class="col-md-3">
99
+ <%= render partial: 'partials/sidebar', locals: {post: @post} %>
100
+ </div>
101
+ </div>
102
+ </div>
103
+ <%#= debug @field_values %>
104
+
105
+ <% end %>