Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## Solidus 1.3.0 (unreleased)

* Make Spree::Product#prices association return all prices

Previously, only non-master variant prices would have been returned here.
Now, we get all the prices, including those from the master variant.

https://github.com/solidusio/solidus/pull/969

* Changes to Spree::Stock::Estimator

* The package passed to Spree::Stock::Estimator#shipping_rates must have its
Expand Down
2 changes: 1 addition & 1 deletion core/app/models/spree/product.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Product < Spree::Base
class_name: 'Spree::Variant',
dependent: :destroy

has_many :prices, -> { order(Spree::Variant.arel_table[:position].asc, Spree::Variant.arel_table[:id].asc, :currency) }, through: :variants
has_many :prices, -> { order(Spree::Variant.arel_table[:position].asc, Spree::Variant.arel_table[:id].asc, :currency) }, through: :variants_including_master

has_many :stock_items, through: :variants_including_master

Expand Down