Doug DeBold
09/17/2025, 9:07 PMAlex P
09/17/2025, 9:13 PMDoug DeBold
09/17/2025, 9:19 PMAlex P
09/17/2025, 9:21 PMThemodel defines essential information about a promotion… `apply_automatically`: IfSpree::Promotion, the promotion is activated and applied automatically once all of the eligibility checks have passed.true
Doug DeBold
09/17/2025, 9:21 PMChris Todorov
09/17/2025, 9:28 PMPricingOptions class - https://github.com/solidusio/solidus/blob/main/core/app/models/spree/variant/pricing_options.rb and adding your custom logic to the price_for_options method on the price selector - https://github.com/solidusio/solidus/blob/main/core/app/models/spree/variant/price_selector.rb#L28-L34
Essentially the data model for Spree::Price had to be extended to add another field for category or type that would track which is the "member" price, and you would create a separate Spree::Price for each variant that has that. Then you would have some logic that would build the price_options passed to price_for_options depending on the user member status.
This can be tricky to do if you want this pricing to be displayed on PDP etc, as well, so generally we showed both the member and non-member price and if the user is logged in they would get the member price when they add to cart. If a user adds it before they log in you may have to have some custom logic to update the LineItem#price because that generally doesn't get updated.Chris Todorov
09/17/2025, 9:30 PMChris Todorov
09/17/2025, 9:31 PMJared Norman
Doug DeBold
09/17/2025, 9:39 PMtvdeyen
kennyadsl