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
data/config/routes.rb CHANGED
@@ -3,26 +3,36 @@ Rails.application.routes.draw do
3
3
  # frontend
4
4
  namespace :plugins do
5
5
  namespace 'ecommerce' do
6
- get 'index' => 'front#index'
6
+ controller :front do
7
+ get 'login'
8
+ post 'login' => :do_login
9
+ get 'register'
10
+ post 'register' => :do_register
11
+ end
12
+
13
+ scope :checkout, as: :checkout do
14
+ controller 'front/checkout' do
15
+ get 'success_paypal'
16
+ get 'cancel_paypal'
17
+ post 'pay_by_bank_transfer'
18
+ post 'pay_by_credit_card'
19
+ post 'pay_by_authorize_net'
20
+ post 'pay_by_stripe'
21
+ post 'pay_by_paypal'
22
+ end
23
+ end
7
24
 
8
25
  get 'checkout' => 'front/checkout#index'
9
- post 'checkout/processing' => 'front/checkout#processing'
26
+ post 'checkout/step_address' => 'front/checkout#step_address'
27
+ post 'checkout/step_shipping' => 'front/checkout#step_shipping'
10
28
  get 'checkout/cart' => 'front/checkout#cart_index'
29
+ get 'checkout/complete_free_order' => 'front/checkout#complete_free_order'
11
30
  post 'checkout/cart/add' => 'front/checkout#cart_add'
12
31
  post 'checkout/cart/update' => 'front/checkout#cart_update'
13
32
  get 'checkout/cart/remove' => 'front/checkout#cart_remove'
14
- post 'res_coupon' => 'front/orders#res_coupon'
33
+ post 'res_coupon' => 'front/checkout#res_coupon'
15
34
  get 'orders' => 'front/orders#index'
16
35
  get 'orders/:order/show' => 'front/orders#show', as: :order_show
17
- get 'orders/:order/select_payment' => 'front/orders#select_payment', as: :order_select_payment
18
- post 'orders/:order/select_payment' => 'front/orders#set_select_payment', as: :order_set_select_payment
19
- get 'orders/:order/pay' => 'front/orders#pay', as: :order_pay
20
- get 'orders/:order/success' => 'front/orders#success', as: :order_success
21
- get 'orders/:order/cancel' => 'front/orders#cancel', as: :order_cancel
22
- post 'orders/:order/pay_by_bank_transfer' => 'front/orders#pay_by_bank_transfer', as: :order_pay_by_bank_transfer
23
- post 'orders/:order/pay_by_credit_card' => 'front/orders#pay_by_credit_card', as: :order_pay_by_credit_card
24
- post 'orders/:order/pay_by_credit_card_authorize_net' => 'front/orders#pay_by_credit_card_authorize_net', as: :order_pay_by_credit_card_authorize_net
25
- post 'orders/:order/pay_by_authorize_net' => 'front/orders#pay_by_authorize_net', as: :order_pay_by_authorize_net
26
36
  end
27
37
  end
28
38
  end
@@ -33,10 +43,10 @@ Rails.application.routes.draw do
33
43
  namespace 'ecommerce' do
34
44
  get 'index' => 'admin#index'
35
45
  resources :orders, controller: 'admin/orders' do
36
- post 'accepted'
37
- post 'shipped'
38
- post 'closed'
39
- get 'canceled'
46
+ get 'mark_accepted'
47
+ get 'mark_bank_confirmed'
48
+ post 'mark_shipped'
49
+ post 'mark_canceled'
40
50
  end
41
51
  resources :payment_methods, controller: 'admin/payment_methods'
42
52
  resources :shipping_methods, controller: 'admin/shipping_methods' do
@@ -0,0 +1,12 @@
1
+ class AddCamaEcommerceStructurePlugin < ActiveRecord::Migration
2
+ def change
3
+ unless table_exists? 'plugins_order_details'
4
+ create_table :plugins_order_details do |t|
5
+ t.integer :order_id
6
+ t.string :customer, :email, :phone
7
+ t.datetime :received_at, :accepted_at, :shipped_at, :closed_at
8
+ t.timestamps
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,15 @@
1
+ class MoveFeaturedAttributeOfProducts < ActiveRecord::Migration
2
+ def change
3
+ Cama::Site.all.each do |site|
4
+ ptype = site.post_types.where(slug: 'commerce').first
5
+ if ptype.present?
6
+ ptype.posts.filter_by_field('ecommerce_featured', value: '1').each do |post|
7
+ post.update_column(:is_feature, true)
8
+ end
9
+ field = ptype.get_field_object('ecommerce_featured')
10
+ field.destroy if field.present?
11
+ ptype.set_option('has_featured', true)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,21 @@
1
+ class AddNewCartStructure < ActiveRecord::Migration
2
+ def change
3
+ create_table :plugins_ecommerce_orders do |t|
4
+ t.string :name, :slug, :kind, :coupon, :the_coupon_amount, :currency_code, :payment_data
5
+ t.string :status, default: 'unpaid'
6
+ t.integer :shipping_method_id, :user_id, :site_id, :payment_method_id, index: true
7
+ t.timestamp :paid_at, :received_at, :accepted_at, :shipped_at, :closed_at
8
+ t.string :cache_the_total, :cache_the_sub_total, :cache_the_tax, :cache_the_weight, :cache_the_discounts, :cache_the_shipping
9
+ t.decimal :amount, :precision => 8, :scale => 2
10
+ t.text :description
11
+ t.timestamps null: false
12
+ end
13
+
14
+ create_table :plugins_ecommerce_products do |t|
15
+ t.integer :qty, :product_id, :order_id, index: true
16
+ t.string :cache_the_price, :cache_the_title, :cache_the_tax, :cache_the_sub_total
17
+ end
18
+
19
+ drop_table :plugins_order_details
20
+ end
21
+ end
@@ -1,3 +1,3 @@
1
1
  module Ecommerce
2
- VERSION = '0.0.4'
2
+ VERSION = '1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: camaleon_ecommerce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: '1.1'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Owen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-06 00:00:00.000000000 Z
11
+ date: 2016-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.54'
55
+ - !ruby/object:Gem::Dependency
56
+ name: stripe
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: sqlite3
57
71
  requirement: !ruby/object:Gem::Requirement
@@ -81,6 +95,7 @@ files:
81
95
  - app/assets/javascripts/plugins/ecommerce/fix_form.js
82
96
  - app/assets/javascripts/plugins/ecommerce/jquery.creditCardValidator.js
83
97
  - app/assets/stylesheets/plugins/ecommerce/admin.scss
98
+ - app/assets/stylesheets/plugins/ecommerce/checkout.css.scss
84
99
  - app/assets/stylesheets/plugins/ecommerce/front.scss
85
100
  - app/controllers/plugins/ecommerce/admin/coupons_controller.rb
86
101
  - app/controllers/plugins/ecommerce/admin/orders_controller.rb
@@ -93,27 +108,31 @@ files:
93
108
  - app/controllers/plugins/ecommerce/front/checkout_controller.rb
94
109
  - app/controllers/plugins/ecommerce/front/orders_controller.rb
95
110
  - app/controllers/plugins/ecommerce/front_controller.rb
111
+ - app/decorators/plugins/ecommerce/cart_decorator.rb
112
+ - app/decorators/plugins/ecommerce/coupon_decorator.rb
113
+ - app/decorators/plugins/ecommerce/order_decorator.rb
114
+ - app/decorators/plugins/ecommerce/product_decorator.rb
115
+ - app/decorators/plugins/ecommerce/product_item_decorator.rb
96
116
  - app/helpers/plugins/ecommerce/ecommerce_email_helper.rb
97
117
  - app/helpers/plugins/ecommerce/ecommerce_functions_helper.rb
98
118
  - app/helpers/plugins/ecommerce/ecommerce_helper.rb
99
119
  - app/helpers/plugins/ecommerce/ecommerce_payment_helper.rb
100
120
  - app/models/plugins/ecommerce/cart.rb
101
121
  - app/models/plugins/ecommerce/coupon.rb
102
- - app/models/plugins/ecommerce/coupon_decorator.rb
103
122
  - app/models/plugins/ecommerce/order.rb
104
- - app/models/plugins/ecommerce/order_decorator.rb
105
123
  - app/models/plugins/ecommerce/order_detail.rb
106
124
  - app/models/plugins/ecommerce/payment_method.rb
107
- - app/models/plugins/ecommerce/product.rb
125
+ - app/models/plugins/ecommerce/product_item.rb
108
126
  - app/models/plugins/ecommerce/shipping_method.rb
109
127
  - app/models/plugins/ecommerce/tax_rate.rb
128
+ - app/views/camaleon_cms/html_mailer/order_canceled.html.erb
129
+ - app/views/camaleon_cms/html_mailer/order_confirmed.html.erb
110
130
  - app/views/camaleon_cms/html_mailer/order_received.html.erb
111
131
  - app/views/camaleon_cms/html_mailer/order_received_admin.html.erb
132
+ - app/views/camaleon_cms/html_mailer/order_shipped.html.erb
112
133
  - app/views/camaleon_cms/html_mailer/recovery_cart.html.erb
113
- - app/views/layouts/plugins/ecommerce/mailer.html.erb
114
134
  - app/views/plugins/ecommerce/admin/coupons/form.html.erb
115
135
  - app/views/plugins/ecommerce/admin/coupons/index.html.erb
116
- - app/views/plugins/ecommerce/admin/index.html.erb
117
136
  - app/views/plugins/ecommerce/admin/orders/form.html.erb
118
137
  - app/views/plugins/ecommerce/admin/orders/index.html.erb
119
138
  - app/views/plugins/ecommerce/admin/orders/show.html.erb
@@ -130,29 +149,32 @@ files:
130
149
  - app/views/plugins/ecommerce/admin/shipping_methods/show.html.erb
131
150
  - app/views/plugins/ecommerce/admin/tax_rates/form.html.erb
132
151
  - app/views/plugins/ecommerce/admin/tax_rates/index.html.erb
133
- - app/views/plugins/ecommerce/front/_post_list_item.html.erb
134
152
  - app/views/plugins/ecommerce/front/checkout/cart_index.html.erb
135
153
  - app/views/plugins/ecommerce/front/checkout/index.html.erb
136
- - app/views/plugins/ecommerce/front/index.html.erb
137
- - app/views/plugins/ecommerce/front/list_products.html.erb
154
+ - app/views/plugins/ecommerce/front/login.html.erb
138
155
  - app/views/plugins/ecommerce/front/orders/index.html.erb
139
- - app/views/plugins/ecommerce/front/orders/pay_by_bank_transfer.html.erb
140
- - app/views/plugins/ecommerce/front/orders/pay_by_credit_card.html.erb
141
- - app/views/plugins/ecommerce/front/orders/pay_by_credit_card_authorize_net.erb
142
- - app/views/plugins/ecommerce/front/orders/select_payment.html.erb
143
156
  - app/views/plugins/ecommerce/front/orders/show.html.erb
144
- - app/views/plugins/ecommerce/front/product.html.erb
145
- - app/views/plugins/ecommerce/layouts/_ecommerce.html.erb
146
- - app/views/plugins/ecommerce/partials/_form_address.html.erb
147
- - app/views/plugins/ecommerce/partials/_table_order_products.html.erb
157
+ - app/views/plugins/ecommerce/partials/_cart_widget.html.erb
158
+ - app/views/plugins/ecommerce/partials/checkout/_details.html.erb
159
+ - app/views/plugins/ecommerce/partials/checkout/_payments.html.erb
160
+ - app/views/plugins/ecommerce/partials/checkout/_products_detail.html.erb
161
+ - app/views/plugins/ecommerce/partials/checkout/_user_info.html.erb
162
+ - app/views/post_types/commerce.html.erb
163
+ - app/views/post_types/commerce/_product_widget.html.erb
164
+ - app/views/post_types/commerce/category.html.erb
165
+ - app/views/post_types/commerce/single.html.erb
148
166
  - config/camaleon_plugin.json
149
167
  - config/currency.json
150
168
  - config/currency_en.json
151
169
  - config/currency_es.json
152
170
  - config/custom_models.rb
171
+ - config/locales/en.yml
172
+ - config/locales/es.yml
153
173
  - config/locales/readme.txt
154
- - config/locales/translation.yml
155
174
  - config/routes.rb
175
+ - db/migrate/20160502221327_add_cama_ecommerce_structure_plugin.rb
176
+ - db/migrate/20160504162311_move_featured_attribute_of_products.rb
177
+ - db/migrate/20160527184747_add_new_cart_structure.rb
156
178
  - lib/camaleon_ecommerce.rb
157
179
  - lib/ecommerce.rb
158
180
  - lib/ecommerce/engine.rb
@@ -183,3 +205,4 @@ signing_key:
183
205
  specification_version: 4
184
206
  summary: ": Summary of Ecommerce."
185
207
  test_files: []
208
+ has_rdoc:
@@ -1,54 +0,0 @@
1
- =begin
2
- Camaleon CMS is a content management system
3
- Copyright (C) 2015 by Owen Peredo Diaz
4
- Email: owenperedo@gmail.com
5
- This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
6
- This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
7
- See the GNU Affero General Public License (GPLv3) for more details.
8
- =end
9
- class Plugins::Ecommerce::OrderDecorator < CamaleonCms::TermTaxonomyDecorator
10
- delegate_all
11
-
12
- # Define presentation-specific methods here. Helpers are accessed through
13
- # `helpers` (aka `h`). You can override attributes, for example:
14
- #
15
- # def created_at
16
- # helpers.content_tag :span, class: 'time' do
17
- # object.created_at.strftime("%a %m/%d/%y")
18
- # end
19
- # end
20
-
21
- def the_status
22
- case self.status
23
- when 'unpaid'
24
- "<span class='label label-danger'>#{I18n.t('plugin.ecommerce.select.unpaid')}</span>"
25
- when 'accepted'
26
- "<span class='label label-info'>#{I18n.t('plugin.ecommerce.select.accepted')}</span>"
27
- when 'shipped'
28
- "<span class='label label-primary'>#{I18n.t('plugin.ecommerce.select.shipped')}</span>"
29
- when 'closed'
30
- "<span class='label label-default'>#{I18n.t('plugin.ecommerce.select.closed')}</span>"
31
- when 'canceled'
32
- "<span class='label label-default'>#{I18n.t('plugin.ecommerce.select.canceled')}</span>"
33
- else
34
- "<span class='label label-success'>#{I18n.t('plugin.ecommerce.select.received')}</span>"
35
- end
36
- end
37
-
38
- def the_pay_status
39
- if object.paid?
40
- "<span class='label label-success'>#{I18n.t('plugin.ecommerce.select.received')}</span>"
41
- elsif object.canceled?
42
- "<span class='label label-default'>#{I18n.t('plugin.ecommerce.select.canceled')}</span>"
43
- elsif object.get_meta("payment", {})[:coupon].to_s.parameterize == 'free'
44
- "<span class='label label-success'>Free</span>"
45
- else
46
- "<span class='label label-danger'>#{I18n.t('plugin.ecommerce.select.unpaid')}</span>"
47
- end
48
- end
49
-
50
- def the_url_tracking
51
- consignment_number = object.get_meta("payment")[:consignment_number] rescue 'none'
52
- object.shipping_method.options[:url_tracking].gsub("{{consignment_number}}", consignment_number) rescue "#{I18n.t('plugin.ecommerce.message.not_shipped')}"
53
- end
54
- end
@@ -1,22 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <title></title>
6
- </head>
7
- <body>
8
- <table style="width: 100%">
9
- <tr>
10
- <td style="text-align: center; background-color: #fe5e00; padding: 10px;"><img src="http://camaleon.tuzitio.com/media/132/logo2.png"></td>
11
- </tr>
12
- <tr>
13
- <td>
14
- <%= yield %>
15
- </td>
16
- </tr>
17
- <tr>
18
- <td style="text-align: center; background-color: #fe5e00;"><a href="<%= @url_base %>" style="color: #ffffff;">Visit Site</a></td>
19
- </tr>
20
- </table>
21
- </body>
22
- </html>
@@ -1,2 +0,0 @@
1
- <!--<script src="<%#= plugin_asset_path("<my_plugin>", "js/front.js") %>"></script>-->
2
- Plugin ready to use in admin panel!.
@@ -1,18 +0,0 @@
1
- <div class="col-sm-6 col-md-4 post-list-item">
2
- <div class="thumbnail">
3
- <span style="position: absolute; top: 5px; right: 22px"><%= raw post.the_featured_status %></span>
4
- <%= raw post.the_link_thumb({}, {style: "height: 200px; width: 100%; display: block;"}) %>
5
- <div class="caption">
6
- <h4 id="thumbnail-label">
7
- <a href="<%= post.the_url %>"><%= post.the_title %></a>
8
- </h4>
9
- <small>SKU: <%= post.the_sku %></small><br>
10
- <strong><%= post.the_price %> <span class="pull-right"><%= raw post.the_stock_status %></span></strong><br>
11
- <hr/>
12
- <p><%= raw post.the_excerpt %></p>
13
- </div>
14
- </div>
15
-
16
- <%#= debug post.get_field_values_hash %>
17
- </div>
18
-
@@ -1,2 +0,0 @@
1
- <!--<script src="<%#= plugin_asset_path("my_plugin", "js/admin.js") %>"></script>-->
2
- Plugin ready to use! in frontend.
@@ -1,34 +0,0 @@
1
- <%= render layout: 'plugins/ecommerce/layouts/ecommerce', locals: {} do %>
2
-
3
- <article id="post_type-view" class="post_type_<%= @post_type.slug %>" style="position: relative">
4
- <h1><%= @post_type.the_title %></h1>
5
-
6
- <div class="content">
7
- <%= raw @post_type.the_content %>
8
- </div><br><br>
9
-
10
- <% if @categories.present? %>
11
- <div class="panel panel-primary no-line">
12
- <div class="panel-heading">Categories</div>
13
- <div class="panel-body">
14
- <%= render partial: "partials/categories_list", locals: {categories: @categories} %>
15
- </div>
16
- </div>
17
- <% end %>
18
-
19
- <div class="panel panel-primary post_list no-line">
20
- <div class="panel-heading">Products</div>
21
- <div class="panel-body">
22
- <div class="row">
23
- <% @posts.each_with_index do |post, index| %>
24
- <%= raw "<div class='clearfix'></div>" if index%3 == 0 && index > 0 %>
25
- <%= render partial: 'plugins/ecommerce/front/post_list_item', locals: {post: post.decorate} %>
26
- <% end %>
27
- </div>
28
- <%= content_tag("div", raw(ct('no_contents_found')), class: "alert alert-warning") if @posts.empty? %>
29
- <%= will_paginate @posts, renderer: BootstrapPagination::Rails if @posts.present? %>
30
- </div>
31
- </div>
32
-
33
- </article>
34
- <% end %>
@@ -1,67 +0,0 @@
1
- <%= render layout: 'plugins/ecommerce/layouts/ecommerce', locals: {} do %>
2
- <%= form_tag(plugins_ecommerce_order_pay_by_bank_transfer_path(order: @order.slug), :method => "post", :class => "form") do %>
3
-
4
- <div class="row">
5
- <h3 class="text-center">Details Ticket Bank Transfer (order: <%= @order.slug %>)</h3>
6
- <div id="user_details" class="col-md-6 col-md-offset-1">
7
-
8
-
9
-
10
- <div class="panel panel-default">
11
- <div class="panel-heading">
12
- <h3 class="panel-title">Payment Details</h3>
13
- </div>
14
- <div class="panel-body">
15
-
16
- <div class="form-group">
17
- <label for="">Bank name</label>
18
- <input class="form-control" type="text" name="details[bank_name]" id="">
19
- </div>
20
- <div class="form-group">
21
- <label for="">Owner name of bank account</label>
22
- <input class="form-control" type="text" name="details[owner_name]" id="">
23
- </div>
24
- <div class="form-group">
25
- <label for="">CODE / ID / KEY / TICKET</label>
26
- <input class="form-control" type="text" name="details[code]" id="">
27
- </div>
28
- <div class="form-group">
29
- <label for="">Description</label>
30
- <textarea name="details[description]" rows="4" class="form-control" ></textarea>
31
- </div>
32
-
33
- <div class="row">
34
- <div class="col-xs-12">
35
- <button class="btn btn-success btn-lg btn-block" type="submit">Send Information</button>
36
- </div>
37
- </div>
38
- <div class="row" style="display:none;">
39
- <div class="col-xs-12">
40
- <p class="payment-errors"></p>
41
- </div>
42
- </div>
43
- </div>
44
- </div>
45
-
46
-
47
-
48
-
49
-
50
- </div>
51
- <div class="col-md-4">
52
- <label for="">Details Bank Transfer</label>
53
- <div class="well">
54
- <h4><%= @payment_methods.name %></h4>
55
- <p><%= @payment_methods.description %></p>
56
- <ul class="ec-list-orders-address">
57
- <li><strong>Amount:</strong> <span><%= current_site.current_unit %> <%= @order.get_meta("payment")[:amount] %></span></li>
58
- <li><strong>Number Account:</strong> <span> <%= @payment_methods.options[:bank_transfer_number_account] %></span></li>
59
- <li><strong>Details:</strong> <span> <%= @payment_methods.options[:bank_transfer_detail] %></span></li>
60
- </ul>
61
- </div>
62
- </div>
63
- </div>
64
-
65
- <% end %>
66
-
67
- <% end %>