camaleon_ecommerce 1.2 → 1.2.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_product.js.coffee +17 -1
- data/app/controllers/plugins/ecommerce/admin/coupons_controller.rb +1 -1
- data/app/controllers/plugins/ecommerce/admin/orders_controller.rb +24 -21
- data/app/controllers/plugins/ecommerce/admin/payment_methods_controller.rb +2 -34
- data/app/controllers/plugins/ecommerce/admin/prices_controller.rb +3 -6
- data/app/controllers/plugins/ecommerce/admin/settings_controller.rb +2 -1
- data/app/controllers/plugins/ecommerce/admin/shipping_methods_controller.rb +2 -2
- data/app/controllers/plugins/ecommerce/admin/tax_rates_controller.rb +1 -1
- data/app/controllers/plugins/ecommerce/admin_controller.rb +2 -2
- data/app/controllers/plugins/ecommerce/front/checkout_controller.rb +34 -18
- data/app/controllers/plugins/ecommerce/front/orders_controller.rb +3 -4
- data/app/controllers/plugins/ecommerce/front_controller.rb +26 -11
- data/app/decorators/plugins/ecommerce/cart_decorator.rb +5 -5
- data/app/decorators/plugins/ecommerce/coupon_decorator.rb +8 -27
- data/app/decorators/plugins/ecommerce/order_decorator.rb +1 -1
- data/app/decorators/plugins/ecommerce/product_decorator.rb +33 -20
- data/app/decorators/plugins/ecommerce/product_item_decorator.rb +8 -2
- data/app/decorators/plugins/ecommerce/product_variation_decorator.rb +1 -1
- data/app/helpers/plugins/ecommerce/ecommerce_email_helper.rb +7 -6
- data/app/helpers/plugins/ecommerce/ecommerce_functions_helper.rb +276 -33
- data/app/helpers/plugins/ecommerce/ecommerce_helper.rb +59 -56
- data/app/models/plugins/ecommerce/attribute.rb +3 -0
- data/app/models/plugins/ecommerce/cart.rb +31 -7
- data/app/models/plugins/ecommerce/legacy_order.rb +1 -30
- data/app/models/plugins/ecommerce/order.rb +11 -5
- data/app/models/plugins/ecommerce/order_detail.rb +1 -0
- data/app/models/plugins/ecommerce/payment_method.rb +9 -5
- data/app/models/plugins/ecommerce/product_variation.rb +6 -0
- data/app/services/plugins/ecommerce/cart_service.rb +4 -17
- data/app/views/camaleon_cms/html_mailer/order_canceled.html.erb +2 -2
- data/app/views/camaleon_cms/html_mailer/order_confirmed.html.erb +2 -2
- data/app/views/camaleon_cms/html_mailer/order_received.html.erb +5 -3
- data/app/views/camaleon_cms/html_mailer/order_received_admin.html.erb +3 -3
- data/app/views/camaleon_cms/html_mailer/order_shipped.html.erb +2 -2
- data/app/views/camaleon_cms/html_mailer/recovery_cart.html.erb +3 -3
- data/app/views/plugins/ecommerce/admin/coupons/form.html.erb +11 -11
- data/app/views/plugins/ecommerce/admin/coupons/index.html.erb +11 -11
- data/app/views/plugins/ecommerce/admin/orders/form.html.erb +2 -2
- data/app/views/plugins/ecommerce/admin/orders/index.html.erb +53 -63
- data/app/views/plugins/ecommerce/admin/payment_methods/form.html.erb +30 -24
- data/app/views/plugins/ecommerce/admin/payment_methods/index.html.erb +8 -8
- data/app/views/plugins/ecommerce/admin/payment_methods/show.html.erb +22 -22
- data/app/views/plugins/ecommerce/admin/prices/form.html.erb +6 -6
- data/app/views/plugins/ecommerce/admin/prices/index.html.erb +8 -8
- data/app/views/plugins/ecommerce/admin/product_attributes.html.erb +1 -1
- data/app/views/plugins/ecommerce/admin/products/_variations.html.erb +4 -4
- data/app/views/plugins/ecommerce/admin/products/index.html.erb +5 -5
- data/app/views/plugins/ecommerce/admin/settings/index.html.erb +20 -8
- data/app/views/plugins/ecommerce/admin/shipping_methods/form.html.erb +5 -5
- data/app/views/plugins/ecommerce/admin/shipping_methods/index.html.erb +8 -9
- data/app/views/plugins/ecommerce/admin/shipping_methods/show.html.erb +4 -4
- data/app/views/plugins/ecommerce/admin/tax_rates/form.html.erb +3 -3
- data/app/views/plugins/ecommerce/admin/tax_rates/index.html.erb +7 -7
- data/app/views/plugins/ecommerce/front/checkout/index.html.erb +4 -4
- data/app/views/plugins/ecommerce/front/login.html.erb +3 -6
- data/app/views/plugins/ecommerce/front/orders/show.html.erb +7 -1
- data/app/views/plugins/ecommerce/partials/_cart_widget.html.erb +14 -29
- data/app/views/plugins/ecommerce/partials/checkout/_details.html.erb +1 -1
- data/app/views/plugins/ecommerce/partials/checkout/_payments.html.erb +100 -99
- data/app/views/plugins/ecommerce/partials/checkout/_user_info.html.erb +2 -2
- data/app/views/post_types/commerce/{_product_widget.html.erb → _post_list_item.html.erb} +0 -0
- data/app/views/post_types/commerce/_product_info.html.erb +45 -0
- data/app/views/post_types/commerce/single.html.erb +63 -85
- data/config/camaleon_plugin.json +3 -8
- data/config/custom_models.rb +28 -4
- data/config/locales/en.yml +27 -12
- data/config/locales/es.yml +70 -57
- data/config/routes.rb +1 -0
- data/db/migrate/20161202182552_add_cookie_key_to_cart.rb +5 -0
- data/lib/ecommerce/version.rb +1 -1
- metadata +7 -14
- data/app/helpers/plugins/ecommerce/ecommerce_payment_helper.rb +0 -6
- data/app/models/plugins/ecommerce/legacy_cart.rb +0 -50
- data/app/services/plugins/ecommerce/product_item_service.rb +0 -29
- data/app/services/plugins/ecommerce/product_service.rb +0 -17
- data/app/services/plugins/ecommerce/site_service.rb +0 -21
- data/app/services/plugins/ecommerce/user_cart_service.rb +0 -12
- data/app/services/plugins/ecommerce/user_product_service.rb +0 -29
- data/app/views/post_types/commerce.html.erb +0 -22
- data/app/views/post_types/commerce/category.html.erb +0 -23
@@ -1,19 +1,19 @@
|
|
1
1
|
<div class="panel panel-default">
|
2
2
|
<div class="panel-heading">
|
3
|
-
<h4><span class="fa fa-credit-card"></span> <%= t('
|
4
|
-
<%= link_to raw("<i class='fa fa-plus'></i> #{t('
|
3
|
+
<h4><span class="fa fa-credit-card"></span> <%= t('plugins.ecommerce.payment_methods') %></h4>
|
4
|
+
<%= link_to raw("<i class='fa fa-plus'></i> #{t('plugins.ecommerce.add_payment_method')}"), {action: :new}, class: "btn btn-primary pull-right" %>
|
5
5
|
</div>
|
6
6
|
<div class="panel-body">
|
7
7
|
|
8
8
|
<table class="table">
|
9
9
|
<thead>
|
10
10
|
<tr>
|
11
|
-
<th id=""><%= t('
|
12
|
-
<th id=""><%= t('
|
13
|
-
<th id=""><%= t('
|
14
|
-
<th id=""><%= t('
|
15
|
-
<th id=""><%= t('
|
16
|
-
<th><%= t('
|
11
|
+
<th id=""><%= t('plugins.ecommerce.table.id') %></th>
|
12
|
+
<th id=""><%= t('plugins.ecommerce.table.name') %></th>
|
13
|
+
<th id=""><%= t('plugins.ecommerce.table.method_type') %></th>
|
14
|
+
<th id=""><%= t('plugins.ecommerce.table.status') %></th>
|
15
|
+
<th id=""><%= t('plugins.ecommerce.table.description') %></th>
|
16
|
+
<th><%= t('plugins.ecommerce.table.actions') %></th>
|
17
17
|
</tr>
|
18
18
|
</thead>
|
19
19
|
<tbody>
|
@@ -1,61 +1,61 @@
|
|
1
1
|
<div class="panel panel-default">
|
2
2
|
<div class="panel-heading">
|
3
3
|
<h4><span class="fa fa-credit-card"></span> <%= @payment_method.name %></h4>
|
4
|
-
<%= link_to raw("<i class='fa fa-edit'></i> #{t('
|
4
|
+
<%= link_to raw("<i class='fa fa-edit'></i> #{t('plugins.ecommerce.edit_payment_methods')}"), {action: :edit, id: @payment_method.id}, class: "btn btn-primary pull-right" %>
|
5
5
|
</div>
|
6
6
|
<div class="panel-body">
|
7
7
|
<div class="row">
|
8
8
|
<div class="col-md-6">
|
9
|
-
<h3><%= t('
|
9
|
+
<h3><%= t('plugins.ecommerce.info') %></h3>
|
10
10
|
<ul class="ec-list-orders-address">
|
11
|
-
<li><strong><%= t('
|
12
|
-
<li><strong><%= t('
|
13
|
-
<li><strong><%= t('
|
11
|
+
<li><strong><%= t('plugins.ecommerce.table.name') %>:</strong> <span> <%= @payment_method.name %></span></li>
|
12
|
+
<li><strong><%= t('plugins.ecommerce.table.description') %>:</strong> <span> <%= @payment_method.description %></span></li>
|
13
|
+
<li><strong><%= t('plugins.ecommerce.status') %>:</strong> <span> <%= raw @payment_method.the_status %></span></li>
|
14
14
|
</ul>
|
15
15
|
</div>
|
16
16
|
|
17
17
|
<div class="col-md-6">
|
18
18
|
<% if @payment_method.options[:type] == 'paypal' %>
|
19
|
-
<h3><%= t('
|
19
|
+
<h3><%= t('plugins.ecommerce.method_paypal') %></h3>
|
20
20
|
<ul class="ec-list-orders-address">
|
21
|
-
<li><strong><%= t('
|
22
|
-
<li><strong><%= t('
|
23
|
-
<li><strong><%= t('
|
24
|
-
<li><strong><%= t('
|
21
|
+
<li><strong><%= t('plugins.ecommerce.table.login') %>:</strong> <span> <%= @payment_method.options[:paypal_login] %></span></li>
|
22
|
+
<li><strong><%= t('plugins.ecommerce.table.password') %>:</strong> <span> <%= @payment_method.options[:paypal_password] %></span></li>
|
23
|
+
<li><strong><%= t('plugins.ecommerce.table.signature') %>:</strong> <span> <%= @payment_method.options[:paypal_signature] %></span></li>
|
24
|
+
<li><strong><%= t('plugins.ecommerce.table.sandbox') %>:</strong> <span> <%= @payment_method.options[:paypal_sandbox].to_s.to_bool ? 'Yes' : 'No' %></span></li>
|
25
25
|
</ul>
|
26
26
|
<% end %>
|
27
27
|
|
28
28
|
<% if @payment_method.options[:type] == 'credit_card' %>
|
29
|
-
<h3><%= t('
|
29
|
+
<h3><%= t('plugins.ecommerce.method_credit_card') %></h3>
|
30
30
|
<ul class="ec-list-orders-address">
|
31
|
-
<li><strong><%= t('
|
32
|
-
<li><strong><%= t('
|
33
|
-
<li><strong><%= t('
|
34
|
-
<li><strong><%= t('
|
31
|
+
<li><strong><%= t('plugins.ecommerce.table.login') %>:</strong> <span> <%= @payment_method.options[:cc_paypal_login] %></span></li>
|
32
|
+
<li><strong><%= t('plugins.ecommerce.table.password') %>:</strong> <span> <%= @payment_method.options[:cc_paypal_password] %></span></li>
|
33
|
+
<li><strong><%= t('plugins.ecommerce.table.signature') %>:</strong> <span> <%= @payment_method.options[:cc_paypal_signature] %></span></li>
|
34
|
+
<li><strong><%= t('plugins.ecommerce.table.sandbox') %>:</strong> <span> <%= @payment_method.options[:cc_paypal_sandbox].to_s.to_bool ? 'Yes' : 'No' %></span></li>
|
35
35
|
</ul>
|
36
36
|
<% end %>
|
37
37
|
|
38
38
|
<% if @payment_method.options[:type] == 'bank_transfer' %>
|
39
|
-
<h3><%= t('
|
39
|
+
<h3><%= t('plugins.ecommerce.method_bank_transfer') %></h3>
|
40
40
|
<ul class="ec-list-orders-address">
|
41
|
-
<li><strong><%= t('
|
42
|
-
<li><strong><%= t('
|
41
|
+
<li><strong><%= t('plugins.ecommerce.table.number_account_bank') %>:</strong> <span> <%= @payment_method.options[:bank_transfer_number_account] %></span></li>
|
42
|
+
<li><strong><%= t('plugins.ecommerce.table.details') %>:</strong> <span> <%= @payment_method.options[:bank_transfer_detail] %></span></li>
|
43
43
|
</ul>
|
44
44
|
<% end %>
|
45
45
|
|
46
46
|
<% if @payment_method.options[:type] == 'authorize_net' %>
|
47
|
-
<h3><%= t('
|
47
|
+
<h3><%= t('plugins.ecommerce.method_authorize_net') %></h3>
|
48
48
|
<ul class="ec-list-orders-address">
|
49
49
|
<li>
|
50
|
-
<strong><%= t('
|
50
|
+
<strong><%= t('plugins.ecommerce.table.login_id') %>:</strong>
|
51
51
|
<span> <%= @payment_method.options[:authorize_net_login_id] %></span>
|
52
52
|
</li>
|
53
53
|
<li>
|
54
|
-
<strong><%= t('
|
54
|
+
<strong><%= t('plugins.ecommerce.table.transaction_key') %>:</strong>
|
55
55
|
<span> <%= @payment_method.options[:authorize_net_transaction_key] %></span>
|
56
56
|
</li>
|
57
57
|
<li>
|
58
|
-
<strong><%= t('
|
58
|
+
<strong><%= t('plugins.ecommerce.table.sandbox') %>:</strong>
|
59
59
|
<span> <%= @payment_method.options[:authorize_net_sandbox].to_s.to_bool ? 'Yes' : 'No' %></span>
|
60
60
|
</li>
|
61
61
|
</ul>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="page-title">
|
2
|
-
<h2><span class="fa fa-usd"></span> <%= !@price[:id].present? ? t('
|
2
|
+
<h2><span class="fa fa-usd"></span> <%= !@price[:id].present? ? t('plugins.ecommerce.add_price') : "#{t('plugins.ecommerce.edit_price')}: #{@price[:code]}" %></h2>
|
3
3
|
</div>
|
4
4
|
|
5
5
|
<!-- PAGE CONTENT WRAPPER -->
|
@@ -9,7 +9,7 @@
|
|
9
9
|
<div class="col-md-8 col-md-offset-2">
|
10
10
|
<div class="panel panel-default">
|
11
11
|
<div class="panel-heading ui-draggable-handle">
|
12
|
-
<h3 class="panel-title"><%= t('
|
12
|
+
<h3 class="panel-title"><%= t('plugins.ecommerce.form_price') %></h3>
|
13
13
|
</div>
|
14
14
|
<%#= form_tag ({url:{action: @price.blank? ? :create : :update}}, :method => "post", :class => "form" ) do %>
|
15
15
|
<%= form_tag(@price[:id].present? ? {action: :update, id: @price[:id]} : {action: :create}, :method => @price[:id].present? ? "patch" :"post", :class => "validate-price") do %>
|
@@ -17,19 +17,19 @@
|
|
17
17
|
<div class="row">
|
18
18
|
|
19
19
|
<div class="form-group col-md-6">
|
20
|
-
<label><%= t('
|
20
|
+
<label><%= t('plugins.ecommerce.table.code') %></label><br>
|
21
21
|
<%= text_field_tag( "price[code]", @price[:code], class: "form-control required") %>
|
22
22
|
</div>
|
23
23
|
<div class="form-group col-md-6">
|
24
|
-
<label><%= t('
|
24
|
+
<label><%= t('plugins.ecommerce.product.price') %> </label> (<%= e_system_currency %>)<br>
|
25
25
|
<%= number_field_tag( "price[price]", @price[:price], class: "form-control required") %>
|
26
26
|
</div>
|
27
27
|
<div class="form-group col-md-6">
|
28
|
-
<label><%= t('
|
28
|
+
<label><%= t('plugins.ecommerce.table.min_weight') %> </label> (<%= current_site.current_weight %>)<br>
|
29
29
|
<%= number_field_tag( "price[min_weight]", @price[:min_weight], class: "form-control required") %>
|
30
30
|
</div>
|
31
31
|
<div class="form-group col-md-6">
|
32
|
-
<label><%= t('
|
32
|
+
<label><%= t('plugins.ecommerce.table.max_weight') %> </label> (<%= current_site.current_weight %>)<br>
|
33
33
|
<%= number_field_tag( "price[max_weight]", @price[:max_weight], class: "form-control required") %>
|
34
34
|
</div>
|
35
35
|
</div>
|
@@ -1,18 +1,18 @@
|
|
1
1
|
<div class="panel panel-default">
|
2
2
|
<div class="panel-heading">
|
3
|
-
<h4><span class="fa fa-usd"></span> <%= t('
|
4
|
-
<%= link_to raw("<i class='fa fa-plus'></i> #{t('
|
3
|
+
<h4><span class="fa fa-usd"></span> <%= t('plugins.ecommerce.shipping_prices') %></h4>
|
4
|
+
<%= link_to raw("<i class='fa fa-plus'></i> #{t('plugins.ecommerce.add_price')}"), {action: :new}, class: "btn btn-primary pull-right" %>
|
5
5
|
</div>
|
6
6
|
<div class="panel-body">
|
7
7
|
|
8
8
|
<table class="table">
|
9
9
|
<thead>
|
10
10
|
<tr>
|
11
|
-
<th><%= t('
|
12
|
-
<th><%= t('
|
13
|
-
<th><%= t('
|
14
|
-
<th><%= t('
|
15
|
-
<th><%= t('
|
11
|
+
<th><%= t('plugins.ecommerce.table.code')%></th>
|
12
|
+
<th><%= t('plugins.ecommerce.product.price')%></th>
|
13
|
+
<th><%= t('plugins.ecommerce.table.min_weight') %></th>
|
14
|
+
<th><%= t('plugins.ecommerce.table.max_weight') %></th>
|
15
|
+
<th><%= t('plugins.ecommerce.table.actions') %></th>
|
16
16
|
</tr>
|
17
17
|
</thead>
|
18
18
|
<tbody>
|
@@ -21,7 +21,7 @@
|
|
21
21
|
%>
|
22
22
|
<tr>
|
23
23
|
<td><%= row[:code] %></td>
|
24
|
-
<td><%=
|
24
|
+
<td><%= e_parse_price(row[:price]) %></td>
|
25
25
|
<td><%= row[:min_weight] %> <%= current_site.current_weight %></td>
|
26
26
|
<td><%= row[:max_weight] %> <%= current_site.current_weight %></td>
|
27
27
|
<td>
|
@@ -31,7 +31,7 @@
|
|
31
31
|
</div>
|
32
32
|
</div>
|
33
33
|
</div>
|
34
|
-
<ul class="values_sortable">
|
34
|
+
<ul class="values_sortable" style="padding: 0; list-style: none;">
|
35
35
|
<% (attr.values.to_a + (attr.id.present? ? [] : [Plugins::Ecommerce::Attribute.new])).each do |value| %>
|
36
36
|
<li class="item-custom-field product_attribute_value_<%= value.id %>">
|
37
37
|
<%= hidden_field_tag "attribute[#{attr.id}][][position]", value.position, class: 'value_position' %>
|
@@ -18,7 +18,7 @@
|
|
18
18
|
<%= hidden_field_tag "product_variation[#{variation.id}][position]", variation.position, class: 'product_variation_position' %>
|
19
19
|
<div class="variation_attributes form-group">
|
20
20
|
<label><%= t('.attributes', default: 'Attributes') %></label>
|
21
|
-
<ul class="item-custom-field sortable_values">
|
21
|
+
<ul class="item-custom-field sortable_values" style="padding: 0; list-style: none;">
|
22
22
|
<% (variation.id.present? ? variation.attribute_values : [variation.attribute_values.rewhere(id: nil).new]).each do |val| %>
|
23
23
|
<li>
|
24
24
|
<div class="actions">
|
@@ -27,10 +27,10 @@
|
|
27
27
|
</div>
|
28
28
|
<div class="row group-input-fields-content">
|
29
29
|
<div class="col-md-4">
|
30
|
-
<%= select_tag "product_variation[#{variation.id}][attributes][][id]", options_from_collection_for_select(current_site.product_attributes, :id,
|
30
|
+
<%= select_tag "product_variation[#{variation.id}][attributes][][id]", options_from_collection_for_select(current_site.product_attributes, :id, lambda{|i| i.label.to_s.translate }, val.parent_id), class: 'form-control required product_attribute_select' %>
|
31
31
|
</div>
|
32
32
|
<div class="col-md-8">
|
33
|
-
<%= select_tag "product_variation[#{variation.id}][attributes][][value]", val.id.present? ? options_from_collection_for_select(val.product_attribute.values, :id,
|
33
|
+
<%= select_tag "product_variation[#{variation.id}][attributes][][value]", val.id.present? ? options_from_collection_for_select(val.product_attribute.values, :id, lambda{|i| i.label.to_s.translate }, val.id) : [], class: 'form-control required product_attribute_vals_select' %>
|
34
34
|
</div>
|
35
35
|
</div>
|
36
36
|
</li>
|
@@ -69,4 +69,4 @@
|
|
69
69
|
<a class="btn btn-warning add_new_variation btn-xs" href="#"><i class="fa fa-plus"></i> <%= t('.add_new_variation', default: 'Add new variation') %></a>
|
70
70
|
</div>
|
71
71
|
</div>
|
72
|
-
<script>var PRODUCT_ATTRIBUTES = <%= raw current_site.product_attributes.to_json(include: :
|
72
|
+
<script>var PRODUCT_ATTRIBUTES = <%= raw current_site.product_attributes.map{|item| item.label = item.label.to_s.translate; item }.to_json(include: :translated_values) %></script>
|
@@ -23,13 +23,13 @@
|
|
23
23
|
<table class="table table-hover ecomerce" id="posts-table-list">
|
24
24
|
<thead>
|
25
25
|
<tr>
|
26
|
-
<th><%= t('
|
26
|
+
<th><%= t('plugins.ecommerce.product.sku') %></th>
|
27
27
|
<th><%= t('camaleon_cms.admin.table.title') %></th>
|
28
28
|
<th><%= t('camaleon_cms.admin.table.status') %></th>
|
29
|
-
<th><%= t('
|
30
|
-
<th><%= t('
|
31
|
-
<th><%= t('
|
32
|
-
<th><%= t('
|
29
|
+
<th><%= t('plugins.ecommerce.product.price') %></th>
|
30
|
+
<th><%= t('plugins.ecommerce.product.weight') %></th>
|
31
|
+
<th><%= t('plugins.ecommerce.product.stock') %></th>
|
32
|
+
<th><%= t('plugins.ecommerce.product.qty') %></th>
|
33
33
|
<th><%= t('camaleon_cms.admin.table.author')%></th>
|
34
34
|
<% if @post_type.manage_categories? %>
|
35
35
|
<th><%= t('camaleon_cms.admin.table.categories')%></th>
|
@@ -1,20 +1,28 @@
|
|
1
1
|
<div class="panel panel-default">
|
2
2
|
<div class="panel-heading ui-draggable-handle">
|
3
|
-
<h4><span class="fa fa-cogs"></span> <%=
|
3
|
+
<h4><span class="fa fa-cogs"></span> <%= cama_t('plugins.ecommerce.e_commerce_settings') %></h4>
|
4
4
|
</div>
|
5
|
-
<%= form_tag(action: :saved, :method => "post", :class => "validate-settings") do %>
|
5
|
+
<%= form_tag(url_for(action: :saved, :method => "post"), :class => "validate-settings", id: 'ecommerce_settings_form') do %>
|
6
6
|
<div class="panel-body">
|
7
|
+
<div class="form-group col-md-4">
|
8
|
+
<label><%= cama_t('plugins.ecommerce.table.system_currency_unit') %></label><br>
|
9
|
+
<%= select_tag( "setting[current_unit]", options_for_select(e_get_all_currencies.collect{|k, x| ["#{x[:label]} (#{x[:symbol]})", k]}, e_system_currency), class: "form-control required masked_select", 'data-live-search' => true) %>
|
10
|
+
</div>
|
7
11
|
|
8
|
-
<div class="form-group col-md-
|
9
|
-
<label><%=
|
10
|
-
<%= select_tag( "setting[
|
12
|
+
<div class="form-group col-md-4">
|
13
|
+
<label><%= cama_t('plugins.ecommerce.table.available_currencies_unit') %></label><br>
|
14
|
+
<%= select_tag( "setting[visitor_unit_currencies]", options_for_select(e_get_all_currencies.collect{|k, x| ["#{x[:label]} (#{x[:symbol]})", k]}, e_visitor_unit_currencies), class: "form-control required", multiple: true, 'data-live-search' => true) %>
|
11
15
|
</div>
|
12
16
|
|
13
|
-
<div class="form-group col-md-
|
14
|
-
<label><%=
|
15
|
-
<%= select_tag( "setting[current_weight]", options_for_select(
|
17
|
+
<div class="form-group col-md-4">
|
18
|
+
<label><%= cama_t('plugins.ecommerce.table.currency_weight') %></label><br>
|
19
|
+
<%= select_tag( "setting[current_weight]", options_for_select(e_get_currency_weights.collect{|k,x| ["#{x} (#{k})", k]}, @setting[:current_weight] || 'kg'), class: "form-control required") %>
|
16
20
|
</div>
|
17
21
|
|
22
|
+
<div class="form-group col-md-4">
|
23
|
+
<label><%= cama_t('plugins.ecommerce.table.shipping_countries') %></label><br>
|
24
|
+
<%= country_select :setting, :shipping_countries, {locale: I18n.locale.to_s, iso_codes: true, selected: e_shipping_countries}, { :name => 'setting[shipping_countries][]', class: 'form-control', multiple: true, 'data-live-search' => true, 'data-actions-box' => true } %>
|
25
|
+
</div>
|
18
26
|
</div>
|
19
27
|
<div class="panel-footer">
|
20
28
|
<a class="btn btn-default" href="<%= url_for action: :index %>" role="back"><%= t('camaleon_cms.admin.button.back')%></a>
|
@@ -22,3 +30,7 @@
|
|
22
30
|
</div>
|
23
31
|
<% end %>
|
24
32
|
</div>
|
33
|
+
<script type="application/javascript">jQuery(function(){
|
34
|
+
var form = $('#ecommerce_settings_form');
|
35
|
+
form.find('select[multiple], .masked_select').selectpicker();
|
36
|
+
})</script>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<div class="panel panel-default">
|
2
2
|
<div class="panel-heading ui-draggable-handle">
|
3
|
-
<h4><span class="fa fa-credit-card"></span> <%= @shipping_method.new_record? ? t('
|
3
|
+
<h4><span class="fa fa-credit-card"></span> <%= @shipping_method.new_record? ? t('plugins.ecommerce.new_shipping_methods') : "#{t('plugins.ecommerce.edit_shipping_methods')}: #{@shipping_method.name}" %></h4>
|
4
4
|
</div>
|
5
5
|
<%= form_for @shipping_method, url:{action: @shipping_method.new_record? ? :create : :update}, html: {class: 'validate-shipping_method', id: 'form-shipping_method'} do |f| %>
|
6
6
|
<div class="panel-body">
|
7
7
|
<%= render partial: 'layouts/camaleon_cms/admin/form_error', locals: {data: @shipping_method} %>
|
8
8
|
<div class="form-group">
|
9
|
-
<%= f.label t('
|
9
|
+
<%= f.label t('plugins.ecommerce.table.name') %><br>
|
10
10
|
<%= f.text_field :name, :class => "form-control required" %>
|
11
11
|
</div>
|
12
12
|
<div class="form-group">
|
@@ -22,13 +22,13 @@
|
|
22
22
|
options = params[:options] if params[:options].present?
|
23
23
|
%>
|
24
24
|
<div class="form-group">
|
25
|
-
<label><%= t('
|
25
|
+
<label><%= t('plugins.ecommerce.table.url_tracking') %></label><br>
|
26
26
|
<%= text_field_tag( "options[url_tracking]", options[:url_tracking], class: "form-control required") %>
|
27
|
-
<small><%= t('
|
27
|
+
<small><%= t('plugins.ecommerce.message.consignment_number') %></small>
|
28
28
|
</div>
|
29
29
|
|
30
30
|
<div class="form-group">
|
31
|
-
<label><%= f.check_box :status %> <%= t('
|
31
|
+
<label><%= f.check_box :status %> <%= t('plugins.ecommerce.active') %></label>
|
32
32
|
</div>
|
33
33
|
</div>
|
34
34
|
<div class="panel-footer">
|
@@ -1,18 +1,18 @@
|
|
1
1
|
<div class="panel panel-default">
|
2
2
|
<div class="panel-heading">
|
3
|
-
<h4><span class="fa fa-credit-card"></span> <%= t('
|
4
|
-
<%= link_to raw("<i class='fa fa-plus'></i> #{t('
|
3
|
+
<h4><span class="fa fa-credit-card"></span> <%= t('plugins.ecommerce.shipping_methods') %> </h4>
|
4
|
+
<%= link_to raw("<i class='fa fa-plus'></i> #{t('plugins.ecommerce.add_shipping_methods')}"), {action: :new}, class: "btn btn-primary pull-right" %>
|
5
5
|
</div>
|
6
6
|
<div class="panel-body">
|
7
7
|
|
8
8
|
<table class="table">
|
9
9
|
<thead>
|
10
10
|
<tr>
|
11
|
-
<th id=""><%= t('
|
12
|
-
<th id=""><%= t('
|
13
|
-
<th id=""><%= t('
|
14
|
-
<th id=""><%= t('
|
15
|
-
<th><%= t('
|
11
|
+
<th id=""><%= t('plugins.ecommerce.table.id') %></th>
|
12
|
+
<th id=""><%= t('plugins.ecommerce.table.name') %></th>
|
13
|
+
<th id=""><%= t('plugins.ecommerce.table.status') %></th>
|
14
|
+
<th id=""><%= t('plugins.ecommerce.table.description') %></th>
|
15
|
+
<th><%= t('plugins.ecommerce.table.actions') %></th>
|
16
16
|
</tr>
|
17
17
|
</thead>
|
18
18
|
<tbody>
|
@@ -25,8 +25,7 @@
|
|
25
25
|
<td><%= row.status %></td>
|
26
26
|
<td><%= row.description %></td>
|
27
27
|
<td>
|
28
|
-
<%= link_to raw('<i class="fa fa-
|
29
|
-
<%= link_to raw('<i class="fa fa-usd"></i> ' + "#{t('plugin.ecommerce.product.price')}"), admin_plugins_ecommerce_shipping_method_prices_path(row.id), class: "btn btn-primary btn-xs" %>
|
28
|
+
<%= link_to raw('<i class="fa fa-usd"></i> ' + "#{t('plugins.ecommerce.shipping_prices', default: 'Prices')}"), admin_plugins_ecommerce_shipping_method_prices_path(row.id), class: "btn btn-primary btn-xs" %>
|
30
29
|
<%= link_to raw('<i class="fa fa-edit"></i>'), {action: :edit, id: row.id }, class: "btn btn-default btn-xs", title: "#{t('camaleon_cms.admin.button.edit')}" %>
|
31
30
|
</td>
|
32
31
|
</tr>
|
@@ -1,15 +1,15 @@
|
|
1
1
|
<div class="panel panel-default">
|
2
2
|
<div class="panel-heading">
|
3
3
|
<h4><span class="fa fa-taxi"></span> <%= @shipping_method.name %></h4>
|
4
|
-
<%= link_to raw("<i class='fa fa-edit'></i> #{t('
|
4
|
+
<%= link_to raw("<i class='fa fa-edit'></i> #{t('plugins.ecommerce.edit_shipping_methods')}"), {action: :edit, id: @shipping_method.id}, class: "btn btn-primary pull-right" %>
|
5
5
|
</div>
|
6
6
|
<div class="panel-body">
|
7
7
|
<div class="row">
|
8
8
|
<div class="col-md-6">
|
9
|
-
<h3><%= t('
|
9
|
+
<h3><%= t('plugins.ecommerce.info') %></h3>
|
10
10
|
<ul class="ec-list-orders-address">
|
11
|
-
<li><strong><%= t('
|
12
|
-
<li><strong><%= t('
|
11
|
+
<li><strong><%= t('plugins.ecommerce.table.name') %>:</strong> <span> <%= @shipping_method.name %></span></li>
|
12
|
+
<li><strong><%= t('plugins.ecommerce.table.description') %>:</strong> <span> <%= @shipping_method.description %></span></li>
|
13
13
|
</ul>
|
14
14
|
</div>
|
15
15
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<div class="panel panel-default">
|
2
2
|
<div class="panel-heading ui-draggable-handle">
|
3
|
-
<h4><span class="fa fa-money"></span> <%= @tax_rate.new_record? ? t('
|
3
|
+
<h4><span class="fa fa-money"></span> <%= @tax_rate.new_record? ? t('plugins.ecommerce.new_tax_rate') : "#{t('plugins.ecommerce.edit_tax_rate')}: #{@tax_rate.name}" %></h4>
|
4
4
|
</div>
|
5
5
|
<%= form_for @tax_rate, url:{action: @tax_rate.new_record? ? :create : :update}, html: {class: 'validate-tax_rate', id: 'form-tax_rate'} do |f| %>
|
6
6
|
<div class="panel-body">
|
@@ -11,7 +11,7 @@
|
|
11
11
|
</div>
|
12
12
|
<% options = params[:options].present? ? params[:options] : @tax_rate.options rescue {} %>
|
13
13
|
<div class="form-group">
|
14
|
-
<label for=""><%= t('
|
14
|
+
<label for=""><%= t('plugins.ecommerce.table.rate') %></label> (%)<br>
|
15
15
|
<%= number_field_tag "options[rate]", options[:rate] || '', :class => "form-control required" %>
|
16
16
|
</div>
|
17
17
|
|
@@ -19,7 +19,7 @@
|
|
19
19
|
|
20
20
|
|
21
21
|
<div class="form-group">
|
22
|
-
<label><%= f.check_box :status %> <%= t('
|
22
|
+
<label><%= f.check_box :status %> <%= t('plugins.ecommerce.active')%></label>
|
23
23
|
</div>
|
24
24
|
</div>
|
25
25
|
<div class="panel-footer">
|
@@ -1,18 +1,18 @@
|
|
1
1
|
<div class="panel panel-default">
|
2
2
|
<div class="panel-heading">
|
3
|
-
<h4><span class="fa fa-tag"></span> <%= t('
|
4
|
-
<%= link_to raw("<i class='fa fa-plus'></i> #{t('
|
3
|
+
<h4><span class="fa fa-tag"></span> <%= t('plugins.ecommerce.tax_rates') %></h4>
|
4
|
+
<%= link_to raw("<i class='fa fa-plus'></i> #{t('plugins.ecommerce.add_tax_rate')}"), {action: :new}, class: "btn btn-primary pull-right" %>
|
5
5
|
</div>
|
6
6
|
<div class="panel-body">
|
7
7
|
|
8
8
|
<table class="table">
|
9
9
|
<thead>
|
10
10
|
<tr>
|
11
|
-
<th id=""><%= t('
|
12
|
-
<th id=""><%= t('
|
13
|
-
<th id=""><%= t('
|
14
|
-
<th id=""><%= t('
|
15
|
-
<th><%= t('
|
11
|
+
<th id=""><%= t('plugins.ecommerce.table.id') %></th>
|
12
|
+
<th id=""><%= t('plugins.ecommerce.table.name') %></th>
|
13
|
+
<th id=""><%= t('plugins.ecommerce.table.rate') %></th>
|
14
|
+
<th id=""><%= t('plugins.ecommerce.table.status') %></th>
|
15
|
+
<th><%= t('plugins.ecommerce.table.actions') %></th>
|
16
16
|
</tr>
|
17
17
|
</thead>
|
18
18
|
<tbody>
|
@@ -4,20 +4,20 @@
|
|
4
4
|
<% end %>
|
5
5
|
<div id="cama_checkout_view" class="row checkout_view">
|
6
6
|
<%= render plugin_view('partials/cart_widget') %>
|
7
|
-
<h1
|
7
|
+
<h1><%= t('.check_out_process', default: 'Checkout Process') %></h1>
|
8
8
|
<div class="stepwizard col-md-offset-3 col-sm-offset-3">
|
9
9
|
<div class="stepwizard-row setup-panel">
|
10
10
|
<div class="stepwizard-step">
|
11
11
|
<a href="#step-1" type="button" class="btn btn-default btn-circle" disabled="disabled">1</a>
|
12
|
-
<p
|
12
|
+
<p><%= t('.step', default: 'Step') %> 1</p>
|
13
13
|
</div>
|
14
14
|
<div class="stepwizard-step">
|
15
15
|
<a href="#step-2" type="button" class="btn btn-default btn-circle" disabled="disabled">2</a>
|
16
|
-
<p
|
16
|
+
<p><%= t('.step', default: 'Step') %> 2</p>
|
17
17
|
</div>
|
18
18
|
<div class="stepwizard-step">
|
19
19
|
<a href="#step-3" type="button" class="btn btn-default btn-circle" disabled="disabled">3</a>
|
20
|
-
<p
|
20
|
+
<p><%= t('.step', default: 'Step') %> 3</p>
|
21
21
|
</div>
|
22
22
|
</div>
|
23
23
|
</div>
|