valken-shipping 1.1.3 → 1.1.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa9324cff477a6c9ab22438c530c614b020f66e209ae5e50ac88f0ced04b7a49
|
4
|
+
data.tar.gz: 0dc95eabe9d8fcfe12cd667288f9b0a84548b3e2ecf631d0a0b04189c1b20724
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e8b065cc02c8af0d8ecee5a34ea80fcb7f6d86fe3e22ed6d2824513c956637404f8bc4973bcbfe3afa5851fa6e58423bf2e8de2227ee26a0c336bbf4078eae0
|
7
|
+
data.tar.gz: 34f59bb3e5fdb30bdf227120aca4b1d71016b5af15b79a094d9c5d9c3d8a02f4ac47d5a7ef0e1aa1303c0a4489b40bde4de86a425a75dd40e02fa40dfe37be94
|
@@ -15,7 +15,7 @@ module Workarea
|
|
15
15
|
carrier_data = collect_carrier_data(selected_carrier)
|
16
16
|
if Workarea.config.gateways.ups_carrier.class != ActiveShipping::Workarea
|
17
17
|
carrier_data.push(get_ltl_shipping)
|
18
|
-
carrier_data.push(get_free_shipping)
|
18
|
+
carrier_data.push(get_free_shipping) if Workarea.config.show_free_shipping
|
19
19
|
end
|
20
20
|
carrier_data
|
21
21
|
end
|
@@ -27,11 +27,11 @@ module Workarea
|
|
27
27
|
def selected_carrier
|
28
28
|
product_ids = order.items.to_a.map(&:product_id)
|
29
29
|
product_details = Catalog::Product.in(id: product_ids).pluck(:details)
|
30
|
-
|
31
|
-
|
32
|
-
return "UPS" if
|
33
|
-
return "FedEx" if
|
34
|
-
return "none" unless
|
30
|
+
is_ups = product_details.any? {|item| item["en"]["Type"] && item["en"]["Type"].first == "UPS"}
|
31
|
+
is_fedex = product_details.any? {|item| item["en"]["Type"] && item["en"]["Type"].first == "FEDEX"}
|
32
|
+
return "UPS" if is_ups
|
33
|
+
return "FedEx" if is_fedex
|
34
|
+
return "none" unless is_ups && is_fedex
|
35
35
|
end
|
36
36
|
|
37
37
|
# If the carrier is ups then it will print ups data...or if carrier is fedex then prinnt fedex data...
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: valken-shipping
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- sushmitha02
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|