camaleon_ecommerce 0.0.4 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/plugins/ecommerce/admin.js +0 -33
- data/app/assets/javascripts/plugins/ecommerce/cart.js +83 -200
- data/app/assets/javascripts/plugins/ecommerce/fix_form.js +1 -4
- data/app/assets/stylesheets/plugins/ecommerce/checkout.css.scss +46 -0
- data/app/assets/stylesheets/plugins/ecommerce/front.scss +2 -30
- data/app/controllers/plugins/ecommerce/admin/coupons_controller.rb +2 -2
- data/app/controllers/plugins/ecommerce/admin/orders_controller.rb +45 -34
- data/app/controllers/plugins/ecommerce/admin/payment_methods_controller.rb +4 -3
- data/app/controllers/plugins/ecommerce/admin/prices_controller.rb +5 -5
- data/app/controllers/plugins/ecommerce/admin/settings_controller.rb +0 -2
- data/app/controllers/plugins/ecommerce/admin/shipping_methods_controller.rb +3 -3
- data/app/controllers/plugins/ecommerce/admin/tax_rates_controller.rb +2 -2
- data/app/controllers/plugins/ecommerce/admin_controller.rb +1 -1
- data/app/controllers/plugins/ecommerce/front/checkout_controller.rb +162 -110
- data/app/controllers/plugins/ecommerce/front/orders_controller.rb +7 -234
- data/app/controllers/plugins/ecommerce/front_controller.rb +42 -3
- data/app/decorators/plugins/ecommerce/cart_decorator.rb +27 -0
- data/app/{models → decorators}/plugins/ecommerce/coupon_decorator.rb +1 -1
- data/app/decorators/plugins/ecommerce/order_decorator.rb +22 -0
- data/app/decorators/plugins/ecommerce/product_decorator.rb +88 -0
- data/app/decorators/plugins/ecommerce/product_item_decorator.rb +18 -0
- data/app/helpers/plugins/ecommerce/ecommerce_email_helper.rb +91 -28
- data/app/helpers/plugins/ecommerce/ecommerce_helper.rb +30 -136
- data/app/helpers/plugins/ecommerce/ecommerce_payment_helper.rb +14 -20
- data/app/models/plugins/ecommerce/cart.rb +139 -15
- data/app/models/plugins/ecommerce/coupon.rb +33 -7
- data/app/models/plugins/ecommerce/order.rb +47 -31
- data/app/models/plugins/ecommerce/{product.rb → product_item.rb} +11 -5
- data/app/views/camaleon_cms/html_mailer/order_canceled.html.erb +2 -0
- data/app/views/camaleon_cms/html_mailer/order_confirmed.html.erb +2 -0
- data/app/views/camaleon_cms/html_mailer/order_received_admin.html.erb +1 -1
- data/app/views/camaleon_cms/html_mailer/order_shipped.html.erb +2 -0
- data/app/views/plugins/ecommerce/admin/coupons/form.html.erb +10 -10
- data/app/views/plugins/ecommerce/admin/coupons/index.html.erb +1 -1
- data/app/views/plugins/ecommerce/admin/orders/form.html.erb +5 -49
- data/app/views/plugins/ecommerce/admin/orders/index.html.erb +140 -80
- data/app/views/plugins/ecommerce/admin/orders/show.html.erb +7 -169
- data/app/views/plugins/ecommerce/admin/payment_methods/form.html.erb +30 -3
- data/app/views/plugins/ecommerce/admin/payment_methods/index.html.erb +1 -3
- data/app/views/plugins/ecommerce/admin/prices/index.html.erb +0 -2
- data/app/views/plugins/ecommerce/admin/prices/show.html.erb +0 -2
- data/app/views/plugins/ecommerce/admin/products/index.html.erb +1 -1
- data/app/views/plugins/ecommerce/admin/settings/index.html.erb +0 -1
- data/app/views/plugins/ecommerce/admin/tax_rates/form.html.erb +1 -1
- data/app/views/plugins/ecommerce/front/checkout/cart_index.html.erb +46 -57
- data/app/views/plugins/ecommerce/front/checkout/index.html.erb +34 -158
- data/app/views/plugins/ecommerce/front/login.html.erb +67 -0
- data/app/views/plugins/ecommerce/front/orders/index.html.erb +36 -44
- data/app/views/plugins/ecommerce/front/orders/show.html.erb +121 -67
- data/app/views/plugins/ecommerce/partials/_cart_widget.html.erb +38 -0
- data/app/views/plugins/ecommerce/partials/checkout/_details.html.erb +35 -0
- data/app/views/plugins/ecommerce/partials/checkout/_payments.html.erb +123 -0
- data/app/views/plugins/ecommerce/partials/checkout/_products_detail.html.erb +49 -0
- data/app/views/plugins/ecommerce/partials/checkout/_user_info.html.erb +93 -0
- data/app/views/post_types/commerce.html.erb +22 -0
- data/app/views/post_types/commerce/_product_widget.html.erb +13 -0
- data/app/views/post_types/commerce/category.html.erb +23 -0
- data/app/views/post_types/commerce/single.html.erb +91 -0
- data/config/custom_models.rb +24 -57
- data/config/locales/en.yml +192 -0
- data/config/locales/es.yml +405 -0
- data/config/routes.rb +26 -16
- data/db/migrate/20160502221327_add_cama_ecommerce_structure_plugin.rb +12 -0
- data/db/migrate/20160504162311_move_featured_attribute_of_products.rb +15 -0
- data/db/migrate/20160527184747_add_new_cart_structure.rb +21 -0
- data/lib/ecommerce/version.rb +1 -1
- metadata +42 -19
- data/app/models/plugins/ecommerce/order_decorator.rb +0 -54
- data/app/views/layouts/plugins/ecommerce/mailer.html.erb +0 -22
- data/app/views/plugins/ecommerce/admin/index.html.erb +0 -2
- data/app/views/plugins/ecommerce/front/_post_list_item.html.erb +0 -18
- data/app/views/plugins/ecommerce/front/index.html.erb +0 -2
- data/app/views/plugins/ecommerce/front/list_products.html.erb +0 -34
- data/app/views/plugins/ecommerce/front/orders/pay_by_bank_transfer.html.erb +0 -67
- data/app/views/plugins/ecommerce/front/orders/pay_by_credit_card.html.erb +0 -131
- data/app/views/plugins/ecommerce/front/orders/pay_by_credit_card_authorize_net.erb +0 -150
- data/app/views/plugins/ecommerce/front/orders/select_payment.html.erb +0 -70
- data/app/views/plugins/ecommerce/front/product.html.erb +0 -105
- data/app/views/plugins/ecommerce/layouts/_ecommerce.html.erb +0 -41
- data/app/views/plugins/ecommerce/partials/_form_address.html.erb +0 -84
- data/app/views/plugins/ecommerce/partials/_table_order_products.html.erb +0 -85
- data/config/locales/translation.yml +0 -371
@@ -1,131 +0,0 @@
|
|
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 %>
|
@@ -1,150 +0,0 @@
|
|
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 %>
|
@@ -1,70 +0,0 @@
|
|
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 %>
|
@@ -1,105 +0,0 @@
|
|
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 %>
|