spree_core 4.2.3.1 → 4.2.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/spree.js +2 -2
- data/app/models/spree/product.rb +11 -2
- data/lib/spree/core/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73a956aa0f5f8359d02e3804606a880d73af297547ef3eca07066e7ee244a728
|
4
|
+
data.tar.gz: 55cb848ec873396022bcaa67b8d8f6281ce4dd2d48dd1692e59f72e012c0dd13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '0749dcc7a17168458bfa742d9f4df1ad99c2f642fd6a4654be232cc8b75c8f72f73286effb135909a17bbcc27d5bdf7932f75c073068eb1492d4159f23793a66'
|
7
|
+
data.tar.gz: 8ddae63ba67bf3c68492f80605646176bb82bdb2ca1d80ffa3139cafca4402d4156e9f14d15353bff0b7d7fa1f72cd340b4dbf826697ee0b995c64383bfcf5a2
|
@@ -32,9 +32,9 @@ Spree.localizedPathFor = function(path) {
|
|
32
32
|
if (pathName.match(/api\/v/)) {
|
33
33
|
params.set('locale', SPREE_LOCALE)
|
34
34
|
} else {
|
35
|
-
pathName = SPREE_LOCALE + '/' + path
|
35
|
+
pathName = (this.mountedAt()) + SPREE_LOCALE + '/' + path
|
36
36
|
}
|
37
|
-
return fullUrl.origin +
|
37
|
+
return fullUrl.origin + pathName + '?' + params.toString()
|
38
38
|
}
|
39
39
|
return Spree.pathFor(path)
|
40
40
|
}
|
data/app/models/spree/product.rb
CHANGED
@@ -102,8 +102,9 @@ module Spree
|
|
102
102
|
validates :meta_title
|
103
103
|
end
|
104
104
|
with_options presence: true do
|
105
|
-
validates :name
|
106
|
-
validates :
|
105
|
+
validates :name
|
106
|
+
validates :shipping_category, if: :requires_shipping_category?
|
107
|
+
validates :price, if: :requires_price?
|
107
108
|
end
|
108
109
|
|
109
110
|
validates :slug, presence: true, uniqueness: { allow_blank: true, case_sensitive: false }
|
@@ -485,5 +486,13 @@ module Spree
|
|
485
486
|
instance_variable_set(:"@#{v}", nil)
|
486
487
|
end
|
487
488
|
end
|
489
|
+
|
490
|
+
def requires_price?
|
491
|
+
Spree::Config[:require_master_price]
|
492
|
+
end
|
493
|
+
|
494
|
+
def requires_shipping_category?
|
495
|
+
true
|
496
|
+
end
|
488
497
|
end
|
489
498
|
end
|
data/lib/spree/core/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.2.
|
4
|
+
version: 4.2.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-05-
|
12
|
+
date: 2021-05-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activemerchant
|
@@ -1175,9 +1175,9 @@ licenses:
|
|
1175
1175
|
- BSD-3-Clause
|
1176
1176
|
metadata:
|
1177
1177
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
1178
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.
|
1178
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v4.2.4
|
1179
1179
|
documentation_uri: https://guides.spreecommerce.org/
|
1180
|
-
source_code_uri: https://github.com/spree/spree/tree/v4.2.
|
1180
|
+
source_code_uri: https://github.com/spree/spree/tree/v4.2.4
|
1181
1181
|
post_install_message:
|
1182
1182
|
rdoc_options: []
|
1183
1183
|
require_paths:
|