effective_orders 1.5.4 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/effective/datatables/orders.rb +3 -2
- data/lib/effective_orders/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c35da0558303f282bbfbfcb20c376fa2c2d5a31
|
4
|
+
data.tar.gz: 69dad29645d72609176efe6efc6895ecee34ed75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0bc9242bb237594aa22f088063e26b3fdd3065ba8a8ad145465c561eda6143a9952304fbb0da55c1b1ea40545bb5e44ec7b798262e288c457749d3277a1f493
|
7
|
+
data.tar.gz: b18ed09bc2179b7f89cca163c162eab5d9fc619d12a3b3cfec915774d84599234dc7458501bedbdb7642f4247537d94146b1f7089504e2e6fa209ac3cc4af45c
|
@@ -46,6 +46,7 @@ if defined?(EffectiveDatatables)
|
|
46
46
|
.select('orders.*, users.email AS email')
|
47
47
|
.select("#{query_total} AS total")
|
48
48
|
.select("string_agg(order_items.title, '!!SEP!!') AS order_items")
|
49
|
+
.select("#{query_payment_method} AS payment_method")
|
49
50
|
|
50
51
|
if EffectiveOrders.require_billing_address && defined?(EffectiveAddresses)
|
51
52
|
addresses_tbl = EffectiveAddresses.addresses_table_name
|
@@ -72,7 +73,7 @@ if defined?(EffectiveDatatables)
|
|
72
73
|
end
|
73
74
|
|
74
75
|
def query_payment_method
|
75
|
-
"SUBSTRING(payment FROM 'card: (\\w{1,2})\\n')"
|
76
|
+
"COALESCE(SUBSTRING(payment FROM 'card: (\\w{1,2})\\n'), SUBSTRING(payment FROM 'action: (\\w+)_postback\\n'))"
|
76
77
|
end
|
77
78
|
|
78
79
|
def search_column(collection, table_column, search_term)
|
@@ -86,7 +87,7 @@ if defined?(EffectiveDatatables)
|
|
86
87
|
when 'purchase_state'
|
87
88
|
then search_term == 'abandoned' ? collection.where(purchase_state: nil) : super
|
88
89
|
when 'payment_method'
|
89
|
-
then collection.having("#{query_payment_method}
|
90
|
+
then collection.having("#{query_payment_method} LIKE ?", "#{search_term}%")
|
90
91
|
else
|
91
92
|
super
|
92
93
|
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: 1.5.
|
4
|
+
version: 1.5.5
|
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: 2015-
|
11
|
+
date: 2015-11-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|