spree_core 5.1.6 → 5.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3e90428ce89c62f05918a8c7d2645e3ed5a0c8f6e2bf5d504449c02d061d2e0
|
4
|
+
data.tar.gz: a35d5f33881801b2378568cd6b74ece89ea605be53eb55a0c2dbcf1e4858cdd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58de2ea5287871bd79d851c088e26db20f8446702dd29f01ec9f26c2814fdfa511910df3fbeaeb1a48d70c715545602fade93a454b0247bc6891516b52436dbc
|
7
|
+
data.tar.gz: 5e990e7726d44c047abb3d3ee65eb221953ace057e0465b69fb619cb1b78c19d5c151bd3af20e3ea5e1452bc61acbe5a7194dafbadf5f7befa0899d374bb8c4c
|
data/app/models/spree/price.rb
CHANGED
@@ -66,8 +66,10 @@ module Spree
|
|
66
66
|
Spree::Money.new(compare_at_amount || 0, currency: currency)
|
67
67
|
end
|
68
68
|
|
69
|
-
def compare_at_amount=(
|
70
|
-
|
69
|
+
def compare_at_amount=(value)
|
70
|
+
calculated_value = Spree::LocalizedNumber.parse(value) if value.present?
|
71
|
+
|
72
|
+
self[:compare_at_amount] = calculated_value
|
71
73
|
end
|
72
74
|
|
73
75
|
alias_attribute :price, :amount
|
@@ -191,8 +191,7 @@ module Spree
|
|
191
191
|
if discount || created_line_items
|
192
192
|
handle_coupon_code(discount, coupon_code) if discount
|
193
193
|
|
194
|
-
order.
|
195
|
-
order.persist_totals
|
194
|
+
order.update_with_updater!
|
196
195
|
set_success_code :coupon_code_applied
|
197
196
|
elsif order.promotions.with_coupon_code(order.coupon_code)
|
198
197
|
# since CouponCode is disposable...
|
data/lib/spree/core/version.rb
CHANGED
data/lib/tasks/core.rake
CHANGED
@@ -204,4 +204,17 @@ namespace :core do
|
|
204
204
|
task archive_products: :environment do |_t, _args|
|
205
205
|
Spree::Product.where('discontinue_on <= ?', Time.current).where.not(status: 'archived').update_all(status: 'archived', updated_at: Time.current)
|
206
206
|
end
|
207
|
+
|
208
|
+
desc 'Migrate amount spree_prices.compare_at_amount.'
|
209
|
+
task migrate_compare_at_amount: :environment do |_t, _args|
|
210
|
+
include ActionView::Helpers::TextHelper
|
211
|
+
puts '... started'
|
212
|
+
total = 0
|
213
|
+
Spree::Price.where(compare_at_amount: 0).in_batches do |prices|
|
214
|
+
prices.update_all(compare_at_amount: nil)
|
215
|
+
total += prices.count
|
216
|
+
end
|
217
|
+
puts '... done'
|
218
|
+
puts "... migrated #{pluralize(total, 'record')}"
|
219
|
+
end
|
207
220
|
end
|
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: 5.1.
|
4
|
+
version: 5.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sean Schofield
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2025-09-
|
13
|
+
date: 2025-09-29 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: i18n-tasks
|
@@ -1383,9 +1383,9 @@ licenses:
|
|
1383
1383
|
- BSD-3-Clause
|
1384
1384
|
metadata:
|
1385
1385
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
1386
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v5.1.
|
1386
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v5.1.7
|
1387
1387
|
documentation_uri: https://docs.spreecommerce.org/
|
1388
|
-
source_code_uri: https://github.com/spree/spree/tree/v5.1.
|
1388
|
+
source_code_uri: https://github.com/spree/spree/tree/v5.1.7
|
1389
1389
|
post_install_message:
|
1390
1390
|
rdoc_options: []
|
1391
1391
|
require_paths:
|