camaleon_ecommerce 0.0.4 → 1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (83) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/plugins/ecommerce/admin.js +0 -33
  3. data/app/assets/javascripts/plugins/ecommerce/cart.js +83 -200
  4. data/app/assets/javascripts/plugins/ecommerce/fix_form.js +1 -4
  5. data/app/assets/stylesheets/plugins/ecommerce/checkout.css.scss +46 -0
  6. data/app/assets/stylesheets/plugins/ecommerce/front.scss +2 -30
  7. data/app/controllers/plugins/ecommerce/admin/coupons_controller.rb +2 -2
  8. data/app/controllers/plugins/ecommerce/admin/orders_controller.rb +45 -34
  9. data/app/controllers/plugins/ecommerce/admin/payment_methods_controller.rb +4 -3
  10. data/app/controllers/plugins/ecommerce/admin/prices_controller.rb +5 -5
  11. data/app/controllers/plugins/ecommerce/admin/settings_controller.rb +0 -2
  12. data/app/controllers/plugins/ecommerce/admin/shipping_methods_controller.rb +3 -3
  13. data/app/controllers/plugins/ecommerce/admin/tax_rates_controller.rb +2 -2
  14. data/app/controllers/plugins/ecommerce/admin_controller.rb +1 -1
  15. data/app/controllers/plugins/ecommerce/front/checkout_controller.rb +162 -110
  16. data/app/controllers/plugins/ecommerce/front/orders_controller.rb +7 -234
  17. data/app/controllers/plugins/ecommerce/front_controller.rb +42 -3
  18. data/app/decorators/plugins/ecommerce/cart_decorator.rb +27 -0
  19. data/app/{models → decorators}/plugins/ecommerce/coupon_decorator.rb +1 -1
  20. data/app/decorators/plugins/ecommerce/order_decorator.rb +22 -0
  21. data/app/decorators/plugins/ecommerce/product_decorator.rb +88 -0
  22. data/app/decorators/plugins/ecommerce/product_item_decorator.rb +18 -0
  23. data/app/helpers/plugins/ecommerce/ecommerce_email_helper.rb +91 -28
  24. data/app/helpers/plugins/ecommerce/ecommerce_helper.rb +30 -136
  25. data/app/helpers/plugins/ecommerce/ecommerce_payment_helper.rb +14 -20
  26. data/app/models/plugins/ecommerce/cart.rb +139 -15
  27. data/app/models/plugins/ecommerce/coupon.rb +33 -7
  28. data/app/models/plugins/ecommerce/order.rb +47 -31
  29. data/app/models/plugins/ecommerce/{product.rb → product_item.rb} +11 -5
  30. data/app/views/camaleon_cms/html_mailer/order_canceled.html.erb +2 -0
  31. data/app/views/camaleon_cms/html_mailer/order_confirmed.html.erb +2 -0
  32. data/app/views/camaleon_cms/html_mailer/order_received_admin.html.erb +1 -1
  33. data/app/views/camaleon_cms/html_mailer/order_shipped.html.erb +2 -0
  34. data/app/views/plugins/ecommerce/admin/coupons/form.html.erb +10 -10
  35. data/app/views/plugins/ecommerce/admin/coupons/index.html.erb +1 -1
  36. data/app/views/plugins/ecommerce/admin/orders/form.html.erb +5 -49
  37. data/app/views/plugins/ecommerce/admin/orders/index.html.erb +140 -80
  38. data/app/views/plugins/ecommerce/admin/orders/show.html.erb +7 -169
  39. data/app/views/plugins/ecommerce/admin/payment_methods/form.html.erb +30 -3
  40. data/app/views/plugins/ecommerce/admin/payment_methods/index.html.erb +1 -3
  41. data/app/views/plugins/ecommerce/admin/prices/index.html.erb +0 -2
  42. data/app/views/plugins/ecommerce/admin/prices/show.html.erb +0 -2
  43. data/app/views/plugins/ecommerce/admin/products/index.html.erb +1 -1
  44. data/app/views/plugins/ecommerce/admin/settings/index.html.erb +0 -1
  45. data/app/views/plugins/ecommerce/admin/tax_rates/form.html.erb +1 -1
  46. data/app/views/plugins/ecommerce/front/checkout/cart_index.html.erb +46 -57
  47. data/app/views/plugins/ecommerce/front/checkout/index.html.erb +34 -158
  48. data/app/views/plugins/ecommerce/front/login.html.erb +67 -0
  49. data/app/views/plugins/ecommerce/front/orders/index.html.erb +36 -44
  50. data/app/views/plugins/ecommerce/front/orders/show.html.erb +121 -67
  51. data/app/views/plugins/ecommerce/partials/_cart_widget.html.erb +38 -0
  52. data/app/views/plugins/ecommerce/partials/checkout/_details.html.erb +35 -0
  53. data/app/views/plugins/ecommerce/partials/checkout/_payments.html.erb +123 -0
  54. data/app/views/plugins/ecommerce/partials/checkout/_products_detail.html.erb +49 -0
  55. data/app/views/plugins/ecommerce/partials/checkout/_user_info.html.erb +93 -0
  56. data/app/views/post_types/commerce.html.erb +22 -0
  57. data/app/views/post_types/commerce/_product_widget.html.erb +13 -0
  58. data/app/views/post_types/commerce/category.html.erb +23 -0
  59. data/app/views/post_types/commerce/single.html.erb +91 -0
  60. data/config/custom_models.rb +24 -57
  61. data/config/locales/en.yml +192 -0
  62. data/config/locales/es.yml +405 -0
  63. data/config/routes.rb +26 -16
  64. data/db/migrate/20160502221327_add_cama_ecommerce_structure_plugin.rb +12 -0
  65. data/db/migrate/20160504162311_move_featured_attribute_of_products.rb +15 -0
  66. data/db/migrate/20160527184747_add_new_cart_structure.rb +21 -0
  67. data/lib/ecommerce/version.rb +1 -1
  68. metadata +42 -19
  69. data/app/models/plugins/ecommerce/order_decorator.rb +0 -54
  70. data/app/views/layouts/plugins/ecommerce/mailer.html.erb +0 -22
  71. data/app/views/plugins/ecommerce/admin/index.html.erb +0 -2
  72. data/app/views/plugins/ecommerce/front/_post_list_item.html.erb +0 -18
  73. data/app/views/plugins/ecommerce/front/index.html.erb +0 -2
  74. data/app/views/plugins/ecommerce/front/list_products.html.erb +0 -34
  75. data/app/views/plugins/ecommerce/front/orders/pay_by_bank_transfer.html.erb +0 -67
  76. data/app/views/plugins/ecommerce/front/orders/pay_by_credit_card.html.erb +0 -131
  77. data/app/views/plugins/ecommerce/front/orders/pay_by_credit_card_authorize_net.erb +0 -150
  78. data/app/views/plugins/ecommerce/front/orders/select_payment.html.erb +0 -70
  79. data/app/views/plugins/ecommerce/front/product.html.erb +0 -105
  80. data/app/views/plugins/ecommerce/layouts/_ecommerce.html.erb +0 -41
  81. data/app/views/plugins/ecommerce/partials/_form_address.html.erb +0 -84
  82. data/app/views/plugins/ecommerce/partials/_table_order_products.html.erb +0 -85
  83. data/config/locales/translation.yml +0 -371
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c14d3d8eaab3ba498a24093c9335126ecd5c77e3
4
- data.tar.gz: 09308d694b0989d78edab11a4a731c0af1f2901c
3
+ metadata.gz: d5cc87402a61c087120824e13a203ac5316c3263
4
+ data.tar.gz: 628b52f2b7913355b97bf5434a60e8f773a1c900
5
5
  SHA512:
6
- metadata.gz: 094b55b0b27af000cf5c8e73dfee3423d78bedba057570a4b26e1261496ac3b7e393d6838afab20e70eb1794c89a2756820fba12a4e96886816d2dace187ac11
7
- data.tar.gz: e5acc4616ff7beb1ec8dfd59b1eb5510aa040d197a6583bd2fb8927db01151d7892e732cf1da1d5bebae38e0c2832c536139b2246f432afce546faa6820c4b5c
6
+ metadata.gz: a1dd90758e4e8acd43257a017c39bf0a8fa9c11e2584b71c416985ba047eae410a8fb917f541c8c1ac282364ae6f7a7f8a5b57f476d3f27c76efcead07d64aa2
7
+ data.tar.gz: 7be6a2554e77b857cbd75f037eeac76569244442f6961b6abaf316b49dc4c40c3b3e3fc025be556df412d1195008b9c5af3d6267660f3e8eae5a485ea78531ed
@@ -1,33 +0,0 @@
1
- jQuery(function(){
2
- if($.fn.datepicker)$('#options_expirate_date').datepicker({
3
- format: 'yyyy-mm-dd'
4
- })
5
-
6
-
7
- if($('#tab-select-payment-method > ul a').size() > 0)
8
- {
9
- $('#tab-select-payment-method > ul a').click(function (e) {
10
- e.preventDefault()
11
- disabled_inputs(this)
12
- //$(this).tab('show')
13
- })
14
-
15
- function disabled_inputs(dom_a){
16
- var attr_id = $(dom_a).attr('href')
17
- $('#tab-select-payment-method .tab-content .tab-pane').find('input, select, textarea').attr('disabled', 'disabled');
18
- $(attr_id).find('input, select, textarea').removeAttr('disabled');
19
- }
20
- disabled_inputs($('#tab-select-payment-method > ul li.active a')[0])
21
- }
22
-
23
- $('.box-adv-search').each(function(){
24
- var cont = $(this);
25
- var rnd = "input_"+Math.floor((Math.random() * 1000000) + 1);
26
- cont.find('#adv-search > input').change(function(){
27
- cont.find('form .' + rnd).val($(this).val());
28
- }).clone().attr('type','hidden').addClass(rnd).appendTo(cont.find('form'));
29
- cont.find('#adv-search .btn-group > button').click(function(){
30
- cont.find('form').submit();
31
- });
32
- })
33
- })
@@ -1,207 +1,90 @@
1
- jQuery(function(){
2
- if($('#table-shopping-cart td .text-qty').size() > 0)
3
- {
4
- $('#table-shopping-cart td .text-qty').change(function(){
5
- if ($(this).val() < 1) return false;
6
- var total = $('#table-shopping-cart tbody tr').map(function(){
7
- var $tr = $(this);
8
- var price = parseFloat($tr.find('td[data-price]').attr('data-price'));
9
- var tax = parseFloat($tr.find('td[data-tax]').attr('data-tax'));
10
- var qty = parseFloat($tr.find('td[data-qty] input.text-qty').val());
11
- if(qty < 0) qty = 0;
12
- var subtotal = (price + tax) * qty;
13
- $tr.find('td[data-subtotal]').html('$'+subtotal.toFixed(2))
14
- return subtotal;
15
- }).get().reduce(function(a, b) { return a + b; }, 0);
16
-
17
- $('#table-shopping-cart #total').html('$'+total.toFixed(2))
18
- })
19
- }
20
- $('#checkout #ec_copy').click(function(){
21
- $('#checkout #shipping_address').find('input, select, textarea').each(function(){
22
- var id_from = $(this).attr('id').replace('shipping', 'billing');
23
- $(this).val($('#billing_address #'+id_from).val())
24
- })
25
- return false;
26
- });
27
-
28
- if($('#e-payments-types > ul a').size() > 0)
29
- {
30
- $('#e-payments-types > ul a').click(function (e) {
31
- e.preventDefault()
32
- disabled_inputs(this)
33
- //$(this).tab('show')
34
- })
35
-
36
- function disabled_inputs(dom_a){
37
- var attr_id = $(dom_a).attr('href')
38
- $('#e-payments-types .tab-content .tab-pane').find('input, select, textarea').attr('disabled', 'disabled');
39
- $(attr_id).find('input, select, textarea').removeAttr('disabled');
40
- }
41
- disabled_inputs($('#e-payments-types > ul a')[0])
42
- }
43
-
44
- function set_total_amount(){
45
- var value = parseFloat($('#checkout #shipping_methods option:checked').attr('data-price'));
46
- var pre_total = parseFloat($('#checkout #order_total').attr('data-total'));
47
- var dis = $('#checkout #coupon_application_total').attr('data-amount');
48
- $('#checkout #shipping_total span').html(value.toFixed(2));
49
- if(dis == 'free')
50
- {
51
- $('#checkout #order_total span').html(0);
52
- $('#shipping_total').parent().hide()
53
- }else{
54
- $('#shipping_total').parent().show()
55
- var total_final = (value + pre_total - parseFloat(dis)).toFixed(2);
56
- $('#checkout #order_total span').html(total_final);
57
- }
58
- }
59
-
60
- $('#checkout #shipping_methods').change(function(){
61
- set_total_amount()
62
- });
1
+ function cama_ecommerce_call_validator(callback){
2
+ $.getScript('http://ajax.aspnetcdn.com/ajax/jquery.validate/1.15.0/jquery.validate.min.js', callback);
3
+ }
63
4
 
64
- $('#checkout #e_coupon_apply_box button').click(function(){
65
- var href = $('#e_coupon_apply_box').attr('data-href');
66
- var token = $('#e_coupon_apply_box').attr('data-token');
67
- var code = $('#e_coupon_apply_box .coupon-text').val();
68
- $.post(href, {code: code, authenticity_token: token}, function(res){
69
- if(res.error){
70
- alert(res.error)
71
- }else{
5
+ function cama_ecommerce_payments(){
6
+ var panel = $('#e-payments-types');
7
+ panel.find('form').each(function(){ $(this).validate(); });
8
+ }
72
9
 
73
- var text = res.data.text;
74
- var discount_type = res.data.options.discount_type;
75
- var amount = 0;
76
- var pre_total = parseFloat($('#checkout #order_total').attr('data-total'));
77
- if(discount_type == 'free_ship'){
78
- amount = 'free';
79
- }else if(discount_type == 'percent'){
80
- amount = (parseFloat(res.data.options.amount) * pre_total / 100).toFixed(2);
81
- text += ' ('+ res.data.current_unit +' '+ amount +')';
82
- }else if(discount_type == 'money'){
83
- amount = res.data.options.amount;
84
- }
85
- $('#checkout #coupon_application_total').attr('data-amount', amount);
86
- $('#checkout #coupon_application_row').show().find('#coupon_application_total span').html(text)
87
- $('#checkout #coupon_code').val(res.data.code)
88
- $('#checkout #coupon_options').val(JSON.stringify(res.data.options))
89
- set_total_amount()
90
- }
91
- }, 'json')
10
+ function cama_checkout_actions(){
11
+ if(!jQuery.fn.validate) return cama_ecommerce_call_validator(cama_checkout_actions);
12
+ var panel = $('#cama_checkout_view');
13
+ var steps = panel.find('.stepwizard-row .stepwizard-step').bind('next_step', function(){
14
+ var link = $(this).find('a');
15
+ var step = $(this);
16
+ if(step.hasClass('active')) return false;
17
+ link.removeClass('btn-default').addClass('btn-primary').parent().addClass('active').siblings().removeClass('active').find('a').removeClass('btn-primary').addClass('btn-default');
18
+ step.prevAll().find('a').add(link).removeAttr('disabled');
19
+ panel.find(link.attr('href')).fadeIn().siblings().hide();
20
+ return false;
92
21
  });
93
-
94
-
95
- // pay by credit card
96
- var card_valid = false;
97
- var $form = $('#payment-form');
98
- if($form.size() > 0){
99
- /* If you're using Stripe for payments */
100
- function payWithStripe(e) {
101
- // e.preventDefault();
102
-
103
- /* Visual feedback */
104
- $form.find('[type=submit]').html('Validating <i class="fa fa-spinner fa-pulse"></i>');
105
-
106
- if(!card_valid)
107
- {
108
- /* Visual feedback */
109
- $form.find('[type=submit]').html('Try again');
110
- /* Show Stripe errors on the form */
111
- $form.find('.payment-errors').text("Credit Card Invalid");
112
- $form.find('.payment-errors').closest('.row').show();
113
- return false
114
- }else{
115
- if($form.valid()){
116
- /* Visual feedback */
117
- $form.find('[type=submit]').html('Processing <i class="fa fa-spinner fa-pulse"></i>');
118
- /* Hide Stripe errors on the form */
119
- $form.find('.payment-errors').closest('.row').hide();
120
- $form.find('.payment-errors').text("");
121
- }else{
122
- return false;
123
- }
124
- }
125
- }
126
-
127
- $form.on('submit', payWithStripe);
128
- $form.find('input[name="cardNumber"]').validateCreditCard(function(result) {
129
- card_valid = result.valid;
130
- // $('#credit_card_log').html('Card type: ' + (result.card_type == null ? '-' : result.card_type.name) + (result.valid ? '<span class="label label-success">Valid</span>' : '<span class="label label-danger">Not Valid</span>'))
22
+ steps.find('.btn-circle').click(function(){ if(!$(this).attr('disabled')) $(this).parent().trigger('next_step'); return false; });
23
+ steps.first().trigger('next_step');
24
+
25
+
26
+ // billing address
27
+ panel.find('#checkout_address_form').validate({submitHandler: function(form){
28
+ $(form).fadeTo("fast", 0.4);
29
+ $.post($(form).attr('action'), $(form).serialize(), function(res){
30
+ steps.filter('.active').next().trigger('next_step');
31
+ }).complete(function(){
32
+ $(form).fadeTo("fast", 1);
33
+ }).error(function(e){
34
+ alert(e.responseText);
131
35
  });
132
-
133
- /* Form validation */
134
- jQuery.validator.addMethod("month", function(value, element) {
135
- return this.optional(element) || /^(01|02|03|04|05|06|07|08|09|10|11|12)$/.test(value);
136
- }, "Please specify a valid 2-digit month.");
137
-
138
- jQuery.validator.addMethod("year", function(value, element) {
139
- return this.optional(element) || /^[0-9]{2}$/.test(value);
140
- }, "Please specify a valid 2-digit year.");
141
-
142
- validator = $form.validate({
143
- rules: {
144
- cardNumber: {
145
- required: true,
146
- creditcard: true,
147
- digits: true
148
- },
149
- expMonth: {
150
- required: true,
151
- month: true
152
- },
153
- expYear: {
154
- required: true,
155
- year: true
156
- },
157
- cvCode: {
158
- required: true,
159
- digits: true
160
- }
161
- },
162
- highlight: function(element) {
163
- $(element).closest('.form-control').removeClass('success').addClass('error');
164
- },
165
- unhighlight: function(element) {
166
- $(element).closest('.form-control').removeClass('error').addClass('success');
167
- },
168
- errorPlacement: function(error, element) {
169
- $(element).closest('.form-group').append(error);
170
- }
36
+ return false;
37
+ }});
38
+
39
+ // shipping form
40
+ panel.find('#checkout_shipping_form').validate({submitHandler: function(form){
41
+ $(form).fadeTo("fast", 0.4);
42
+ $.post($(form).attr('action'), $(form).serialize()+'&next_step=true', function(res){
43
+ panel.find('#step-3').html(res);
44
+ steps.last().trigger('next_step');
45
+ }).complete(function(){
46
+ $(form).fadeTo("fast", 1);
47
+ }).error(function(e){
48
+ alert(e.responseText);
171
49
  });
50
+ return false;
51
+ }});
52
+
53
+ // shipping methods
54
+ panel.find('#shipping_methods').change(function(){
55
+ var form = panel.find('#checkout_shipping_form');
56
+ form.fadeTo("fast", 0.4);
57
+ $.post(form.attr('action'), form.serialize(), function(res){
58
+ panel.find('#product_details').html(res);
59
+ }).complete(function(){
60
+ form.fadeTo("fast", 1);
61
+ }).error(function(e){
62
+ alert(e.responseText);
63
+ });
64
+ }).trigger('change');
65
+
66
+ // coupons
67
+ panel.find('#e_coupon_apply_box input:text').keydown(function(e){ if(e.keyCode == 13){ $(this).next().find('button').click(); return false; } })
68
+ panel.find('#e_coupon_apply_box button').click(function(){
69
+ var btn = $(this);
70
+ var form = panel.find('#checkout_shipping_form');
71
+ form.fadeTo("fast", 0.4);
72
+ $.post($('#e_coupon_apply_box').attr('data-href'), {code: panel.find('.coupon-text').val(), authenticity_token: panel.find('#e_coupon_apply_box').attr('data-token')}, function(res){
73
+ panel.find('#product_details').html(res);
74
+ btn.closest('#coupon').html('');
75
+ }).error(function(e){
76
+ alert(e.responseText);
77
+ }).complete(function(){
78
+ form.fadeTo("fast", 1);
79
+ });
80
+ });
172
81
 
173
- paymentFormReady = function() {
174
- if ($form.find('[name=cardNumber]').hasClass("success") &&
175
- $form.find('[name=expMonth]').hasClass("success") &&
176
- $form.find('[name=expYear]').hasClass("success") &&
177
- $form.find('[name=cvCode]').val().length > 1) {
178
- return true;
179
- } else {
180
- return false;
181
- }
182
- }
183
-
184
- $form.find('[type=submit]').prop('disabled', true);
185
- var readyInterval = setInterval(function() {
186
- if (paymentFormReady()) {
187
- $form.find('[type=submit]').prop('disabled', false);
188
- clearInterval(readyInterval);
189
- }
190
- }, 250);
191
- }
192
-
193
- if($.fn.validate){
194
- $('.form-validate-ec').validate();
195
- }
196
-
197
- })
198
- function log(d){
199
- console.log(d)
82
+ // copy billing address
83
+ panel.find('#ec_copy').click(function(){
84
+ panel.find('#shipping_address').find('input, select, textarea').each(function(){
85
+ var id_from = $(this).attr('id').replace('shipping', 'billing');
86
+ $(this).val($('#billing_address #'+id_from).val())
87
+ });
88
+ return false;
89
+ });
200
90
  }
201
-
202
- /*! jQuery Validation Plugin - v1.14.0 - 6/30/2015
203
- * http://jqueryvalidation.org/
204
- * Copyright (c) 2015 Jörn Zaefferer; Licensed MIT */
205
- !function(a){"function"==typeof define&&define.amd?define(["jquery.creditCardValidator.js"],a):a(jQuery)}(function(a){a.extend(a.fn,{validate:function(b){if(!this.length)return void(b&&b.debug&&window.console&&console.warn("Nothing selected, can't validate, returning nothing."));var c=a.data(this[0],"validator");return c?c:(this.attr("novalidate","novalidate"),c=new a.validator(b,this[0]),a.data(this[0],"validator",c),c.settings.onsubmit&&(this.on("click.validate",":submit",function(b){c.settings.submitHandler&&(c.submitButton=b.target),a(this).hasClass("cancel")&&(c.cancelSubmit=!0),void 0!==a(this).attr("formnovalidate")&&(c.cancelSubmit=!0)}),this.on("submit.validate",function(b){function d(){var d,e;return c.settings.submitHandler?(c.submitButton&&(d=a("<input type='hidden'/>").attr("name",c.submitButton.name).val(a(c.submitButton).val()).appendTo(c.currentForm)),e=c.settings.submitHandler.call(c,c.currentForm,b),c.submitButton&&d.remove(),void 0!==e?e:!1):!0}return c.settings.debug&&b.preventDefault(),c.cancelSubmit?(c.cancelSubmit=!1,d()):c.form()?c.pendingRequest?(c.formSubmitted=!0,!1):d():(c.focusInvalid(),!1)})),c)},valid:function(){var b,c,d;return a(this[0]).is("form")?b=this.validate().form():(d=[],b=!0,c=a(this[0].form).validate(),this.each(function(){b=c.element(this)&&b,d=d.concat(c.errorList)}),c.errorList=d),b},rules:function(b,c){var d,e,f,g,h,i,j=this[0];if(b)switch(d=a.data(j.form,"validator").settings,e=d.rules,f=a.validator.staticRules(j),b){case"add":a.extend(f,a.validator.normalizeRule(c)),delete f.messages,e[j.name]=f,c.messages&&(d.messages[j.name]=a.extend(d.messages[j.name],c.messages));break;case"remove":return c?(i={},a.each(c.split(/\s/),function(b,c){i[c]=f[c],delete f[c],"required"===c&&a(j).removeAttr("aria-required")}),i):(delete e[j.name],f)}return g=a.validator.normalizeRules(a.extend({},a.validator.classRules(j),a.validator.attributeRules(j),a.validator.dataRules(j),a.validator.staticRules(j)),j),g.required&&(h=g.required,delete g.required,g=a.extend({required:h},g),a(j).attr("aria-required","true")),g.remote&&(h=g.remote,delete g.remote,g=a.extend(g,{remote:h})),g}}),a.extend(a.expr[":"],{blank:function(b){return!a.trim(""+a(b).val())},filled:function(b){return!!a.trim(""+a(b).val())},unchecked:function(b){return!a(b).prop("checked")}}),a.validator=function(b,c){this.settings=a.extend(!0,{},a.validator.defaults,b),this.currentForm=c,this.init()},a.validator.format=function(b,c){return 1===arguments.length?function(){var c=a.makeArray(arguments);return c.unshift(b),a.validator.format.apply(this,c)}:(arguments.length>2&&c.constructor!==Array&&(c=a.makeArray(arguments).slice(1)),c.constructor!==Array&&(c=[c]),a.each(c,function(a,c){b=b.replace(new RegExp("\\{"+a+"\\}","g"),function(){return c})}),b)},a.extend(a.validator,{defaults:{messages:{},groups:{},rules:{},errorClass:"error",validClass:"valid",errorElement:"label",focusCleanup:!1,focusInvalid:!0,errorContainer:a([]),errorLabelContainer:a([]),onsubmit:!0,ignore:":hidden",ignoreTitle:!1,onfocusin:function(a){this.lastActive=a,this.settings.focusCleanup&&(this.settings.unhighlight&&this.settings.unhighlight.call(this,a,this.settings.errorClass,this.settings.validClass),this.hideThese(this.errorsFor(a)))},onfocusout:function(a){this.checkable(a)||!(a.name in this.submitted)&&this.optional(a)||this.element(a)},onkeyup:function(b,c){var d=[16,17,18,20,35,36,37,38,39,40,45,144,225];9===c.which&&""===this.elementValue(b)||-1!==a.inArray(c.keyCode,d)||(b.name in this.submitted||b===this.lastElement)&&this.element(b)},onclick:function(a){a.name in this.submitted?this.element(a):a.parentNode.name in this.submitted&&this.element(a.parentNode)},highlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).addClass(c).removeClass(d):a(b).addClass(c).removeClass(d)},unhighlight:function(b,c,d){"radio"===b.type?this.findByName(b.name).removeClass(c).addClass(d):a(b).removeClass(c).addClass(d)}},setDefaults:function(b){a.extend(a.validator.defaults,b)},messages:{required:"This field is required.",remote:"Please fix this field.",email:"Please enter a valid email address.",url:"Please enter a valid URL.",date:"Please enter a valid date.",dateISO:"Please enter a valid date ( ISO ).",number:"Please enter a valid number.",digits:"Please enter only digits.",creditcard:"Please enter a valid credit card number.",equalTo:"Please enter the same value again.",maxlength:a.validator.format("Please enter no more than {0} characters."),minlength:a.validator.format("Please enter at least {0} characters."),rangelength:a.validator.format("Please enter a value between {0} and {1} characters long."),range:a.validator.format("Please enter a value between {0} and {1}."),max:a.validator.format("Please enter a value less than or equal to {0}."),min:a.validator.format("Please enter a value greater than or equal to {0}.")},autoCreateRanges:!1,prototype:{init:function(){function b(b){var c=a.data(this.form,"validator"),d="on"+b.type.replace(/^validate/,""),e=c.settings;e[d]&&!a(this).is(e.ignore)&&e[d].call(c,this,b)}this.labelContainer=a(this.settings.errorLabelContainer),this.errorContext=this.labelContainer.length&&this.labelContainer||a(this.currentForm),this.containers=a(this.settings.errorContainer).add(this.settings.errorLabelContainer),this.submitted={},this.valueCache={},this.pendingRequest=0,this.pending={},this.invalid={},this.reset();var c,d=this.groups={};a.each(this.settings.groups,function(b,c){"string"==typeof c&&(c=c.split(/\s/)),a.each(c,function(a,c){d[c]=b})}),c=this.settings.rules,a.each(c,function(b,d){c[b]=a.validator.normalizeRule(d)}),a(this.currentForm).on("focusin.validate focusout.validate keyup.validate",":text, [type='password'], [type='file'], select, textarea, [type='number'], [type='search'], [type='tel'], [type='url'], [type='email'], [type='datetime'], [type='date'], [type='month'], [type='week'], [type='time'], [type='datetime-local'], [type='range'], [type='color'], [type='radio'], [type='checkbox']",b).on("click.validate","select, option, [type='radio'], [type='checkbox']",b),this.settings.invalidHandler&&a(this.currentForm).on("invalid-form.validate",this.settings.invalidHandler),a(this.currentForm).find("[required], [data-rule-required], .required").attr("aria-required","true")},form:function(){return this.checkForm(),a.extend(this.submitted,this.errorMap),this.invalid=a.extend({},this.errorMap),this.valid()||a(this.currentForm).triggerHandler("invalid-form",[this]),this.showErrors(),this.valid()},checkForm:function(){this.prepareForm();for(var a=0,b=this.currentElements=this.elements();b[a];a++)this.check(b[a]);return this.valid()},element:function(b){var c=this.clean(b),d=this.validationTargetFor(c),e=!0;return this.lastElement=d,void 0===d?delete this.invalid[c.name]:(this.prepareElement(d),this.currentElements=a(d),e=this.check(d)!==!1,e?delete this.invalid[d.name]:this.invalid[d.name]=!0),a(b).attr("aria-invalid",!e),this.numberOfInvalids()||(this.toHide=this.toHide.add(this.containers)),this.showErrors(),e},showErrors:function(b){if(b){a.extend(this.errorMap,b),this.errorList=[];for(var c in b)this.errorList.push({message:b[c],element:this.findByName(c)[0]});this.successList=a.grep(this.successList,function(a){return!(a.name in b)})}this.settings.showErrors?this.settings.showErrors.call(this,this.errorMap,this.errorList):this.defaultShowErrors()},resetForm:function(){a.fn.resetForm&&a(this.currentForm).resetForm(),this.submitted={},this.lastElement=null,this.prepareForm(),this.hideErrors();var b,c=this.elements().removeData("previousValue").removeAttr("aria-invalid");if(this.settings.unhighlight)for(b=0;c[b];b++)this.settings.unhighlight.call(this,c[b],this.settings.errorClass,"");else c.removeClass(this.settings.errorClass)},numberOfInvalids:function(){return this.objectLength(this.invalid)},objectLength:function(a){var b,c=0;for(b in a)c++;return c},hideErrors:function(){this.hideThese(this.toHide)},hideThese:function(a){a.not(this.containers).text(""),this.addWrapper(a).hide()},valid:function(){return 0===this.size()},size:function(){return this.errorList.length},focusInvalid:function(){if(this.settings.focusInvalid)try{a(this.findLastActive()||this.errorList.length&&this.errorList[0].element||[]).filter(":visible").focus().trigger("focusin")}catch(b){}},findLastActive:function(){var b=this.lastActive;return b&&1===a.grep(this.errorList,function(a){return a.element.name===b.name}).length&&b},elements:function(){var b=this,c={};return a(this.currentForm).find("input, select, textarea").not(":submit, :reset, :image, :disabled").not(this.settings.ignore).filter(function(){return!this.name&&b.settings.debug&&window.console&&console.error("%o has no name assigned",this),this.name in c||!b.objectLength(a(this).rules())?!1:(c[this.name]=!0,!0)})},clean:function(b){return a(b)[0]},errors:function(){var b=this.settings.errorClass.split(" ").join(".");return a(this.settings.errorElement+"."+b,this.errorContext)},reset:function(){this.successList=[],this.errorList=[],this.errorMap={},this.toShow=a([]),this.toHide=a([]),this.currentElements=a([])},prepareForm:function(){this.reset(),this.toHide=this.errors().add(this.containers)},prepareElement:function(a){this.reset(),this.toHide=this.errorsFor(a)},elementValue:function(b){var c,d=a(b),e=b.type;return"radio"===e||"checkbox"===e?this.findByName(b.name).filter(":checked").val():"number"===e&&"undefined"!=typeof b.validity?b.validity.badInput?!1:d.val():(c=d.val(),"string"==typeof c?c.replace(/\r/g,""):c)},check:function(b){b=this.validationTargetFor(this.clean(b));var c,d,e,f=a(b).rules(),g=a.map(f,function(a,b){return b}).length,h=!1,i=this.elementValue(b);for(d in f){e={method:d,parameters:f[d]};try{if(c=a.validator.methods[d].call(this,i,b,e.parameters),"dependency-mismatch"===c&&1===g){h=!0;continue}if(h=!1,"pending"===c)return void(this.toHide=this.toHide.not(this.errorsFor(b)));if(!c)return this.formatAndAdd(b,e),!1}catch(j){throw this.settings.debug&&window.console&&console.log("Exception occurred when checking element "+b.id+", check the '"+e.method+"' method.",j),j instanceof TypeError&&(j.message+=". Exception occurred when checking element "+b.id+", check the '"+e.method+"' method."),j}}if(!h)return this.objectLength(f)&&this.successList.push(b),!0},customDataMessage:function(b,c){return a(b).data("msg"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase())||a(b).data("msg")},customMessage:function(a,b){var c=this.settings.messages[a];return c&&(c.constructor===String?c:c[b])},findDefined:function(){for(var a=0;a<arguments.length;a++)if(void 0!==arguments[a])return arguments[a];return void 0},defaultMessage:function(b,c){return this.findDefined(this.customMessage(b.name,c),this.customDataMessage(b,c),!this.settings.ignoreTitle&&b.title||void 0,a.validator.messages[c],"<strong>Warning: No message defined for "+b.name+"</strong>")},formatAndAdd:function(b,c){var d=this.defaultMessage(b,c.method),e=/\$?\{(\d+)\}/g;"function"==typeof d?d=d.call(this,c.parameters,b):e.test(d)&&(d=a.validator.format(d.replace(e,"{$1}"),c.parameters)),this.errorList.push({message:d,element:b,method:c.method}),this.errorMap[b.name]=d,this.submitted[b.name]=d},addWrapper:function(a){return this.settings.wrapper&&(a=a.add(a.parent(this.settings.wrapper))),a},defaultShowErrors:function(){var a,b,c;for(a=0;this.errorList[a];a++)c=this.errorList[a],this.settings.highlight&&this.settings.highlight.call(this,c.element,this.settings.errorClass,this.settings.validClass),this.showLabel(c.element,c.message);if(this.errorList.length&&(this.toShow=this.toShow.add(this.containers)),this.settings.success)for(a=0;this.successList[a];a++)this.showLabel(this.successList[a]);if(this.settings.unhighlight)for(a=0,b=this.validElements();b[a];a++)this.settings.unhighlight.call(this,b[a],this.settings.errorClass,this.settings.validClass);this.toHide=this.toHide.not(this.toShow),this.hideErrors(),this.addWrapper(this.toShow).show()},validElements:function(){return this.currentElements.not(this.invalidElements())},invalidElements:function(){return a(this.errorList).map(function(){return this.element})},showLabel:function(b,c){var d,e,f,g=this.errorsFor(b),h=this.idOrName(b),i=a(b).attr("aria-describedby");g.length?(g.removeClass(this.settings.validClass).addClass(this.settings.errorClass),g.html(c)):(g=a("<"+this.settings.errorElement+">").attr("id",h+"-error").addClass(this.settings.errorClass).html(c||""),d=g,this.settings.wrapper&&(d=g.hide().show().wrap("<"+this.settings.wrapper+"/>").parent()),this.labelContainer.length?this.labelContainer.append(d):this.settings.errorPlacement?this.settings.errorPlacement(d,a(b)):d.insertAfter(b),g.is("label")?g.attr("for",h):0===g.parents("label[for='"+h+"']").length&&(f=g.attr("id").replace(/(:|\.|\[|\]|\$)/g,"\\$1"),i?i.match(new RegExp("\\b"+f+"\\b"))||(i+=" "+f):i=f,a(b).attr("aria-describedby",i),e=this.groups[b.name],e&&a.each(this.groups,function(b,c){c===e&&a("[name='"+b+"']",this.currentForm).attr("aria-describedby",g.attr("id"))}))),!c&&this.settings.success&&(g.text(""),"string"==typeof this.settings.success?g.addClass(this.settings.success):this.settings.success(g,b)),this.toShow=this.toShow.add(g)},errorsFor:function(b){var c=this.idOrName(b),d=a(b).attr("aria-describedby"),e="label[for='"+c+"'], label[for='"+c+"'] *";return d&&(e=e+", #"+d.replace(/\s+/g,", #")),this.errors().filter(e)},idOrName:function(a){return this.groups[a.name]||(this.checkable(a)?a.name:a.id||a.name)},validationTargetFor:function(b){return this.checkable(b)&&(b=this.findByName(b.name)),a(b).not(this.settings.ignore)[0]},checkable:function(a){return/radio|checkbox/i.test(a.type)},findByName:function(b){return a(this.currentForm).find("[name='"+b+"']")},getLength:function(b,c){switch(c.nodeName.toLowerCase()){case"select":return a("option:selected",c).length;case"input":if(this.checkable(c))return this.findByName(c.name).filter(":checked").length}return b.length},depend:function(a,b){return this.dependTypes[typeof a]?this.dependTypes[typeof a](a,b):!0},dependTypes:{"boolean":function(a){return a},string:function(b,c){return!!a(b,c.form).length},"function":function(a,b){return a(b)}},optional:function(b){var c=this.elementValue(b);return!a.validator.methods.required.call(this,c,b)&&"dependency-mismatch"},startRequest:function(a){this.pending[a.name]||(this.pendingRequest++,this.pending[a.name]=!0)},stopRequest:function(b,c){this.pendingRequest--,this.pendingRequest<0&&(this.pendingRequest=0),delete this.pending[b.name],c&&0===this.pendingRequest&&this.formSubmitted&&this.form()?(a(this.currentForm).submit(),this.formSubmitted=!1):!c&&0===this.pendingRequest&&this.formSubmitted&&(a(this.currentForm).triggerHandler("invalid-form",[this]),this.formSubmitted=!1)},previousValue:function(b){return a.data(b,"previousValue")||a.data(b,"previousValue",{old:null,valid:!0,message:this.defaultMessage(b,"remote")})},destroy:function(){this.resetForm(),a(this.currentForm).off(".validate").removeData("validator")}},classRuleSettings:{required:{required:!0},email:{email:!0},url:{url:!0},date:{date:!0},dateISO:{dateISO:!0},number:{number:!0},digits:{digits:!0},creditcard:{creditcard:!0}},addClassRules:function(b,c){b.constructor===String?this.classRuleSettings[b]=c:a.extend(this.classRuleSettings,b)},classRules:function(b){var c={},d=a(b).attr("class");return d&&a.each(d.split(" "),function(){this in a.validator.classRuleSettings&&a.extend(c,a.validator.classRuleSettings[this])}),c},normalizeAttributeRule:function(a,b,c,d){/min|max/.test(c)&&(null===b||/number|range|text/.test(b))&&(d=Number(d),isNaN(d)&&(d=void 0)),d||0===d?a[c]=d:b===c&&"range"!==b&&(a[c]=!0)},attributeRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)"required"===c?(d=b.getAttribute(c),""===d&&(d=!0),d=!!d):d=f.attr(c),this.normalizeAttributeRule(e,g,c,d);return e.maxlength&&/-1|2147483647|524288/.test(e.maxlength)&&delete e.maxlength,e},dataRules:function(b){var c,d,e={},f=a(b),g=b.getAttribute("type");for(c in a.validator.methods)d=f.data("rule"+c.charAt(0).toUpperCase()+c.substring(1).toLowerCase()),this.normalizeAttributeRule(e,g,c,d);return e},staticRules:function(b){var c={},d=a.data(b.form,"validator");return d.settings.rules&&(c=a.validator.normalizeRule(d.settings.rules[b.name])||{}),c},normalizeRules:function(b,c){return a.each(b,function(d,e){if(e===!1)return void delete b[d];if(e.param||e.depends){var f=!0;switch(typeof e.depends){case"string":f=!!a(e.depends,c.form).length;break;case"function":f=e.depends.call(c,c)}f?b[d]=void 0!==e.param?e.param:!0:delete b[d]}}),a.each(b,function(d,e){b[d]=a.isFunction(e)?e(c):e}),a.each(["minlength","maxlength"],function(){b[this]&&(b[this]=Number(b[this]))}),a.each(["rangelength","range"],function(){var c;b[this]&&(a.isArray(b[this])?b[this]=[Number(b[this][0]),Number(b[this][1])]:"string"==typeof b[this]&&(c=b[this].replace(/[\[\]]/g,"").split(/[\s,]+/),b[this]=[Number(c[0]),Number(c[1])]))}),a.validator.autoCreateRanges&&(null!=b.min&&null!=b.max&&(b.range=[b.min,b.max],delete b.min,delete b.max),null!=b.minlength&&null!=b.maxlength&&(b.rangelength=[b.minlength,b.maxlength],delete b.minlength,delete b.maxlength)),b},normalizeRule:function(b){if("string"==typeof b){var c={};a.each(b.split(/\s/),function(){c[this]=!0}),b=c}return b},addMethod:function(b,c,d){a.validator.methods[b]=c,a.validator.messages[b]=void 0!==d?d:a.validator.messages[b],c.length<3&&a.validator.addClassRules(b,a.validator.normalizeRule(b))},methods:{required:function(b,c,d){if(!this.depend(d,c))return"dependency-mismatch";if("select"===c.nodeName.toLowerCase()){var e=a(c).val();return e&&e.length>0}return this.checkable(c)?this.getLength(b,c)>0:b.length>0},email:function(a,b){return this.optional(b)||/^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/.test(a)},url:function(a,b){return this.optional(b)||/^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})).?)(?::\d{2,5})?(?:[/?#]\S*)?$/i.test(a)},date:function(a,b){return this.optional(b)||!/Invalid|NaN/.test(new Date(a).toString())},dateISO:function(a,b){return this.optional(b)||/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$/.test(a)},number:function(a,b){return this.optional(b)||/^(?:-?\d+|-?\d{1,3}(?:,\d{3})+)?(?:\.\d+)?$/.test(a)},digits:function(a,b){return this.optional(b)||/^\d+$/.test(a)},creditcard:function(a,b){if(this.optional(b))return"dependency-mismatch";if(/[^0-9 \-]+/.test(a))return!1;var c,d,e=0,f=0,g=!1;if(a=a.replace(/\D/g,""),a.length<13||a.length>19)return!1;for(c=a.length-1;c>=0;c--)d=a.charAt(c),f=parseInt(d,10),g&&(f*=2)>9&&(f-=9),e+=f,g=!g;return e%10===0},minlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d},maxlength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||d>=e},rangelength:function(b,c,d){var e=a.isArray(b)?b.length:this.getLength(b,c);return this.optional(c)||e>=d[0]&&e<=d[1]},min:function(a,b,c){return this.optional(b)||a>=c},max:function(a,b,c){return this.optional(b)||c>=a},range:function(a,b,c){return this.optional(b)||a>=c[0]&&a<=c[1]},equalTo:function(b,c,d){var e=a(d);return this.settings.onfocusout&&e.off(".validate-equalTo").on("blur.validate-equalTo",function(){a(c).valid()}),b===e.val()},remote:function(b,c,d){if(this.optional(c))return"dependency-mismatch";var e,f,g=this.previousValue(c);return this.settings.messages[c.name]||(this.settings.messages[c.name]={}),g.originalMessage=this.settings.messages[c.name].remote,this.settings.messages[c.name].remote=g.message,d="string"==typeof d&&{url:d}||d,g.old===b?g.valid:(g.old=b,e=this,this.startRequest(c),f={},f[c.name]=b,a.ajax(a.extend(!0,{mode:"abort",port:"validate"+c.name,dataType:"json",data:f,context:e.currentForm,success:function(d){var f,h,i,j=d===!0||"true"===d;e.settings.messages[c.name].remote=g.originalMessage,j?(i=e.formSubmitted,e.prepareElement(c),e.formSubmitted=i,e.successList.push(c),delete e.invalid[c.name],e.showErrors()):(f={},h=d||e.defaultMessage(c,"remote"),f[c.name]=g.message=a.isFunction(h)?h(b):h,e.invalid[c.name]=!0,e.showErrors(f)),g.valid=j,e.stopRequest(c,j)}},d)),"pending")}}});var b,c={};a.ajaxPrefilter?a.ajaxPrefilter(function(a,b,d){var e=a.port;"abort"===a.mode&&(c[e]&&c[e].abort(),c[e]=d)}):(b=a.ajax,a.ajax=function(d){var e=("mode"in d?d:a.ajaxSettings).mode,f=("port"in d?d:a.ajaxSettings).port;return"abort"===e?(c[f]&&c[f].abort(),c[f]=b.apply(this,arguments),c[f]):b.apply(this,arguments)})});
206
-
207
-
@@ -1,10 +1,7 @@
1
- /**
2
- * Created by Froilan on 02/09/2015.
3
- */
4
1
  jQuery(function($){
5
2
  $( '#form-post' ).on( "change", '.editor-custom-fields input[name="field_options[ecommerce_weight][values][]"], .editor-custom-fields .input-value.number', function() {
6
3
  setTimeout(function(){
7
4
  $(this).val(Math.abs($(this).val()) || 0);
8
5
  }.bind(this), 60)
9
6
  });
10
- });
7
+ });
@@ -0,0 +1,46 @@
1
+ #cama_checkout_view{
2
+ .stepwizard-step p {
3
+ margin-top: 10px;
4
+ }
5
+ .stepwizard-row {
6
+ display: table-row;
7
+ }
8
+ .stepwizard {
9
+ display: table;
10
+ width: 100%;
11
+ position: relative;
12
+ margin-bottom: 20px;
13
+ margin-top: 20px;
14
+ }
15
+ .stepwizard-step button[disabled] {
16
+ opacity: 1 !important;
17
+ filter: alpha(opacity=100) !important;
18
+ }
19
+ .stepwizard-row:before {
20
+ top: 14px;
21
+ bottom: 0;
22
+ position: absolute;
23
+ content: " ";
24
+ width: 100%;
25
+ height: 1px;
26
+ background-color: #ccc;
27
+ z-order: 0;
28
+ }
29
+ .stepwizard-step {
30
+ display: table-cell;
31
+ text-align: center;
32
+ position: relative;
33
+ }
34
+ .btn-circle {
35
+ width: 30px;
36
+ height: 30px;
37
+ text-align: center;
38
+ padding: 6px 0;
39
+ font-size: 12px;
40
+ line-height: 1.428571429;
41
+ border-radius: 15px;
42
+ }
43
+ }
44
+ @media all and (min-width: 760px){
45
+ #cama_checkout_view .stepwizard{ width: 50% !important; }
46
+ }
@@ -1,36 +1,8 @@
1
1
  .ec-list-orders-address{
2
- padding: 0;
3
2
  list-style: none;
4
- li{
5
- overflow: hidden;
6
- margin-bottom: 2px;
7
- list-style: none !important;
8
- strong{
9
- width: 80px;
10
- float: left;
11
- }
12
- span{
13
- display: block;
14
- float: left;
15
- }
16
- }
17
3
  }
18
4
 
19
- .shopping_cart_box{
20
- h5{
21
- margin-top: 0;
22
- margin-bottom: 4px;
23
- }
24
- p{
25
- margin-bottom: 4px;
26
- }
27
- }
28
- .form-validate-ec label.error{
29
- color: #ff4d00;
30
- font-size: 12px;
5
+ form label.error{
6
+ color: red;
31
7
  font-weight: normal;
32
8
  }
33
-
34
- .form-validate-ec .form-control.error{
35
- border-color: #ff4d00;
36
- }
@@ -15,7 +15,7 @@ class Plugins::Ecommerce::Admin::CouponsController < Plugins::Ecommerce::AdminCo
15
15
 
16
16
  def new
17
17
  @coupon = current_site.coupons.new
18
- admin_breadcrumb_add("#{t('plugin.ecommerce.new')}")
18
+ add_breadcrumb("#{t('plugin.ecommerce.new')}")
19
19
  render 'form'
20
20
  end
21
21
 
@@ -23,7 +23,7 @@ class Plugins::Ecommerce::Admin::CouponsController < Plugins::Ecommerce::AdminCo
23
23
  end
24
24
 
25
25
  def edit
26
- admin_breadcrumb_add("#{t('camaleon_cms.admin.button.edit')}")
26
+ add_breadcrumb("#{t('camaleon_cms.admin.button.edit')}")
27
27
  render 'form'
28
28
  end
29
29