Skip to content

Add TaxonRevenue condition#6492

Open
mamhoff wants to merge 2 commits into
solidusio:mainfrom
mamhoff:taxon-revenue-condition
Open

Add TaxonRevenue condition#6492
mamhoff wants to merge 2 commits into
solidusio:mainfrom
mamhoff:taxon-revenue-condition

Conversation

@mamhoff
Copy link
Copy Markdown
Contributor

@mamhoff mamhoff commented Jun 3, 2026

Summary

This condition adds a promotion condition that allows store owners to trigger a benefit if the revenue from a defined set of taxons exceeds some value. For example, with this condition we can do things like: If you spend 150 USD on pants, you get a free belt.

image

Checklist

The following are not always needed:

  • 📖 I have updated the README to account for my changes.
  • 📑 I have documented new code with YARD.
  • 🛣️ I have opened a PR to update the guides.
  • ✅ I have added automated tests to cover my changes.
  • 📸 I have attached screenshots to demo visual changes.

@mamhoff mamhoff requested a review from a team as a code owner June 3, 2026 07:07
@github-actions github-actions Bot added the changelog:solidus_promotions Changes to the solidus_promotions gem label Jun 3, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.68%. Comparing base (c7e850d) to head (2c05beb).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6492   +/-   ##
=======================================
  Coverage   89.68%   89.68%           
=======================================
  Files         992      993    +1     
  Lines       20845    20863   +18     
=======================================
+ Hits        18694    18712   +18     
  Misses       2151     2151           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mamhoff mamhoff force-pushed the taxon-revenue-condition branch from 72589ee to 2c05beb Compare June 3, 2026 07:56
mamhoff added 2 commits June 3, 2026 09:56
This condition adds a promotion condition that allows store owners to
trigger a benefit if the revenue from a defined set of taxons exceeds
some value. For example, with this condition we can do things like: If
you spend 150 USD on pants, you get a free belt.
This fixes an edge case, a taxon condition without any taxons defined.
Prior to this commit, that would error on MySQL and Postgres.
Copy link
Copy Markdown
Contributor

@AlistairNorman AlistairNorman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, seems like a useful condition to have!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog:solidus_promotions Changes to the solidus_promotions gem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants