effective_orders 6.5.0 → 6.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 658dc93673ea1d94b4ef09a9ad65fc267a58d36c7560f8e70a12a8719ee1f917
4
- data.tar.gz: 190fcc09c8cd4de5ff184c54bc5612a3ccba50f2c97ea6b579d9cf3ec6b32fd5
3
+ metadata.gz: 8cd209b4bfdd333ea96dfa7c850a3d136738b8bb355547707d389521dfad03c2
4
+ data.tar.gz: 2df312bdfb0ecb45095f2dd7067f95f091e3fe0247cfdb44957de1b517eb52ef
5
5
  SHA512:
6
- metadata.gz: a75d33e8b848a0a64d1e73617cc45a57070b98bcdf93ebe872d63f2e3f1f1158d697b6fe8786195de74068479c1e7e999b47d0ef25fa1c1482b405c671b53c59
7
- data.tar.gz: e13b5214ba7fe0da6e68c981c89a391aedf6e0fbfb0bf1365689f4cb885b9342cca7b32ab21a31d91d215f6ac81fb4b66fc7fe1337daedcf3ccfd38ac0bfc217
6
+ metadata.gz: f4d65e073900587f76a08122998cb06d84da8df4006226fb5fd6c272015c277e9440d8719a989b563d5795743fe4a23f0a06cc004d57ed5dd19f4547d544cb8b
7
+ data.tar.gz: 630ce183e1a5691800eec6ad28fedb074fa6a17dcbb05ff85e8c1f671df5148cd075c09d02193b0ea93bbd77e026fa07af325694e69668e9c9441c87e8ec3ff4
@@ -12,7 +12,7 @@ module Effective
12
12
 
13
13
  if flash[:success].blank?
14
14
  if email && @order.send_order_receipt_to_buyer?
15
- flash[:success] = "Payment successful! A receipt has been sent to #{@order.emails_send_to}"
15
+ flash[:success] = "Payment successful! A receipt has been sent to #{@order.email}"
16
16
  else
17
17
  flash[:success] = "Payment successful! An email receipt has not been sent."
18
18
  end
@@ -21,7 +21,8 @@ module Effective
21
21
  subject = subject_for(__method__, "Order Receipt: ##{@order.to_param}", resource, opts)
22
22
  headers = headers_for(resource, opts)
23
23
 
24
- mail(to: @order.emails, cc: @order.cc.presence, subject: subject, **headers)
24
+ # Just @order.email here. Not everyone.
25
+ mail(to: @order.email, cc: @order.cc.presence, subject: subject, **headers)
25
26
  end
26
27
 
27
28
  # This is sent when an admin creates a new order or /admin/orders/new
@@ -112,6 +112,7 @@ module Effective
112
112
  before_validation { assign_user_address }
113
113
  before_validation { assign_billing_name }
114
114
  before_validation { assign_billing_email }
115
+ before_validation { assign_order_item_values }
115
116
  before_validation { assign_order_values }
116
117
  before_validation { assign_order_charges }
117
118
  end
@@ -840,12 +841,14 @@ module Effective
840
841
  end
841
842
  end
842
843
 
843
- # This overwrites the prices, taxes, surcharge, etc on every save.
844
+ # These two overwrites the prices, taxes, surcharge, etc on every save.
844
845
  # Does not get run from the before_validate on purchase.
845
- def assign_order_values
846
+ def assign_order_item_values
846
847
  # Copies prices from purchasable into order items
847
848
  present_order_items.each { |oi| oi.assign_purchasable_attributes }
849
+ end
848
850
 
851
+ def assign_order_values
849
852
  # Calculated from each item
850
853
  self.subtotal = get_subtotal()
851
854
 
@@ -3,4 +3,4 @@
3
3
 
4
4
  - if EffectiveResources.authorized?(controller, :send_buyer_receipt, order)
5
5
  = dropdown_link_to 'E-mail Receipt', effective_orders.send_buyer_receipt_order_path(order),
6
- data: { method: :post, confirm: "Send receipt to #{order.emails_send_to}?" }
6
+ data: { method: :post, confirm: "Send receipt to #{order.email}?" }
@@ -1,3 +1,3 @@
1
1
  module EffectiveOrders
2
- VERSION = '6.5.0'.freeze
2
+ VERSION = '6.5.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_orders
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.5.0
4
+ version: 6.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-02 00:00:00.000000000 Z
11
+ date: 2023-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -340,7 +340,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
340
340
  - !ruby/object:Gem::Version
341
341
  version: '0'
342
342
  requirements: []
343
- rubygems_version: 3.1.2
343
+ rubygems_version: 3.4.10
344
344
  signing_key:
345
345
  specification_version: 4
346
346
  summary: Quickly build an online store with carts, orders, automatic email receipts