caboose-cms 0.5.170 → 0.5.171

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzAwYTBkNTk5NjJjYzI1ZTM2ODFlYTk3YWE5NDBhMDRiNzEzMjg4ZQ==
4
+ NjA1Y2RjYjIzZmNkMGY3MGVhNmJlZTRmMTRhMzViYmUyOTBmNDAwYg==
5
5
  data.tar.gz: !binary |-
6
- YTM3YTc5ZGQ4MDk2OTdhZGQ5YWFjYmMzZDFmMWZiY2RmNzA3MGUxOQ==
6
+ ZmE5NWM4MTU1NzZkMDU1MGNmMGE0OTEzYjUxYzczMzdlMWQ0MWExMQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MWRlZTYxMjU2OTBmMjUwZDAwZDg2MjYyMDM1ZGY5ZjM4NDhlODEzZjY3MDlm
10
- MDhiNGI0NjZkNzdhZDc0OGM3YzQ5ZjM0MTFhYTNhMTJmMjEwMzU2NmVkMzgw
11
- NzlmMGM0Y2I4NzhhMWQ0ZTgzYzUzOWMzN2IwN2QxNzU1NTZiMWE=
9
+ ZDkxMTVkMDk4MzU0NDA1YjI1M2EyMTMxNDAyMTMwZDhmMGYzNzlmY2ZhMDIy
10
+ ZTBmZWU4ZmI5OWUzMDRmYjBhNjA0NmZjYjRjMzViYzdiZjM3ZWNkZjUyNmYy
11
+ Zjk4ZWExNTkzZWQwYmVjNWQ1NDZjMGYzMzc5NTc2YWQyMzNiYzE=
12
12
  data.tar.gz: !binary |-
13
- NWM1YWY5NDVmZDc0ZjYzOTUwMDRmYmE0NmQ0Y2RlNWMyNzU1ZDVmYjg0NmM0
14
- MTZiZmQ4OGY0ZWFlZDkxMDhmNjUyZDRjNjkwNjhhN2FmNjNiZGU1MDgyZjM5
15
- MmU2N2MxYWJkZWY2NTcxMTE5YWE5MjAwMDg5NGU1NzY5Njc2NmY=
13
+ ZDE2MzlkN2Q0MzgwMmUyZDU2M2MzN2JlMmI1MDIwNWFmMWNmMjNmN2I3ZWI4
14
+ MjU4NmZiM2FiOTI2MzRjNGM1MTM4YTUwYWUxY2RlYjBiZDczOTg5N2U4YTJm
15
+ ZTllYzY5MTU5NzVjMTc4ZjZlYmI3OTU1YTBkMWY1NWU5NDZhY2U=
@@ -454,7 +454,7 @@ MyAccountOrderController.prototype = {
454
454
  if (resp.success == true)
455
455
  {
456
456
  $('#payment_form').empty();
457
- $('#payment_message').empty().html("<p class='success'>Your payment has been processed successfully.</p>");
457
+ $('#payment_message').empty().html("<p class='note success'>Your payment has been processed successfully.</p>");
458
458
  setTimeout(function() { $('#payment_message').empty() }, 5000);
459
459
  that.refresh();
460
460
  }
@@ -170,7 +170,12 @@ module Caboose
170
170
  })
171
171
  end
172
172
 
173
-
173
+ # GET /admin/orders/:id/send-for-authorization
174
+ def admin_send_for_authorization
175
+ return if !user_is_allowed('orders', 'edit')
176
+ OrdersMailer.configure_for_site(@site.id).delay.customer_payment_authorization(order)
177
+ render :json =>
178
+ end
174
179
 
175
180
  # GET /admin/orders/status-options
176
181
  def admin_status_options
@@ -43,6 +43,12 @@ module Caboose
43
43
  @order = order
44
44
  mail(:to => order.customer.email, :subject => 'Order status update')
45
45
  end
46
+
47
+ # Sends an email to the customer telling them they need to authorize payment on an order
48
+ def customer_payment_authorization(order)
49
+ @order = order
50
+ mail(:to => order.customer.email, :subject => "Order #{@order.order_number} ready for payment")
51
+ end
46
52
  end
47
53
  end
48
54
 
@@ -0,0 +1,5 @@
1
+ <p><img src='<%= @order.site.logo.url(:thumb) %>' /></p>
2
+
3
+ <h1>Order <%= @order.order_number %> is ready for payment!</h1>
4
+ <p>Please <a href='http://<%= raw @order.site.primary_domain %>/my-account/orders/<%= @order.id %>'>review your order</a> and submit payment.</p>
5
+ <p>Thank you!</p>
data/config/routes.rb CHANGED
@@ -517,6 +517,7 @@ Caboose::Engine.routes.draw do
517
517
  get "/admin/orders/status-options" => "orders#admin_status_options"
518
518
  get "/admin/orders/new" => "orders#admin_new"
519
519
  get "/admin/orders/print-pending" => "orders#admin_print_pending"
520
+ get "/admin/orders/:id/send-for-authorization" => "orders#admin_send_for_authorization"
520
521
  get "/admin/orders/:id/capture" => "orders#capture_funds"
521
522
  get "/admin/orders/:id/json" => "orders#admin_json"
522
523
  get "/admin/orders/:id/print" => "orders#admin_print"
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.5.170'
2
+ VERSION = '0.5.171'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caboose-cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.170
4
+ version: 0.5.171
5
5
  platform: ruby
6
6
  authors:
7
7
  - William Barry
@@ -790,6 +790,7 @@ files:
790
790
  - app/views/caboose/orders/admin_new.html.erb
791
791
  - app/views/caboose/orders/admin_print.html.erb
792
792
  - app/views/caboose/orders_mailer/customer_new_order.html.erb
793
+ - app/views/caboose/orders_mailer/customer_payment_authorization.html.erb
793
794
  - app/views/caboose/orders_mailer/customer_status_updated.html.erb
794
795
  - app/views/caboose/orders_mailer/fulfillment_new_order.html.erb
795
796
  - app/views/caboose/orders_mailer/shipping_order_ready.html.erb