PHPackages                             johnhenry/craft-pricing-rules-relationship - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. johnhenry/craft-pricing-rules-relationship

ActiveCraft-plugin[Utility &amp; Helpers](/categories/utility)

johnhenry/craft-pricing-rules-relationship
==========================================

A field to add relationships between Commerce Pricing Rules and an element

1.0.3(2w ago)11MITPHPPHP ^8.2 || ^8.3 || ^8.4CI failing

Since Feb 24Pushed 2w ago1 watchersCompare

[ Source](https://github.com/john-henry/craft-pricing-rules-relationship)[ Packagist](https://packagist.org/packages/johnhenry/craft-pricing-rules-relationship)[ Docs](https://johnhenry.ie/plugins/pricing-rules-relationship/)[ Fund](https://www.buymeacoffee.com/john.henry)[ GitHub Sponsors](https://github.com/john-henry)[ RSS](/packages/johnhenry-craft-pricing-rules-relationship/feed)WikiDiscussions craft-5 Synced 1w ago

READMEChangelog (3)Dependencies (12)Versions (5)Used By (0)

[![Stable Version](https://camo.githubusercontent.com/74e9fb9caad7b970cbf35f3aa37f029d012b6b1ca4daa4d20780956b445ce5cf/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f686e68656e72792f63726166742d70726963696e672d72756c65732d72656c6174696f6e736869703f6c6162656c3d737461626c65267374796c653d666f722d7468652d6261646765)](https://packagist.org/packages/johnhenry/craft-pricing-rules-relationship)[![Static Badge](https://camo.githubusercontent.com/5926ddeb7550aec593756a4e006beec5372f54ef5d90d7f8067fb3e0add9e331/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f667265652d706c7567696e3f7374796c653d666f722d7468652d6261646765266c6f676f3d6372616674636d73266c6f676f436f6c6f723d7768697465266c6f676f53697a653d6175746f266c6162656c3d4372616674253230506c7567696e25323053746f7265266c6162656c436f6c6f723d253233453534323242)](https://plugins.craftcms.com/pricing-rules-relationship?craft5)

[![pricing-rules-plugin-icon](https://camo.githubusercontent.com/2b12784ea90c3a2e34d19149a172b5d950ccb56dac47c39e873e145e8388e0c1/68747470733a2f2f6a6f686e68656e72792e69652f696d616765732f706c7567696e732f63726166742d70726963696e672d72756c65732d72656c6174696f6e736869702e737667)](https://camo.githubusercontent.com/2b12784ea90c3a2e34d19149a172b5d950ccb56dac47c39e873e145e8388e0c1/68747470733a2f2f6a6f686e68656e72792e69652f696d616765732f706c7567696e732f63726166742d70726963696e672d72756c65732d72656c6174696f6e736869702e737667)

Pricing Rules Relationship for Craft Commerce
=============================================

[](#pricing-rules-relationship-for-craft-commerce)

Craft Pricing Rules Relationship is a field that ties Craft Commerce catalog pricing rules to your elements. It fills the gap between Commerce's own pricing rule management and Craft's element relationships, so store managers can link a rule to any element type and then pull the matching products straight into their templates.

Features
--------

[](#features)

- **Relate rules to anything** – Link Commerce catalog pricing rules to entries, products, categories, or any custom element type
- **Plain checkbox field** – Editors tick the rules they want from a straightforward list, no fuss
- **Expiry-aware** – Expired rules drop out of your templates on their own, so nobody has to untick anything by hand. You can show each rule's expiry date beside it too
- **Respects customer groups** – A rule scoped to a customer group only returns its products to users in that group, so nothing leaks across groups
- **In-stock filtering** – Pass `hasStock: true` and out-of-stock products are left off the list
- **Quick rule creation** – A "New Catalog Pricing Rule" button drops editors straight into Commerce to add one
- **Template-ready** – `craft.pricingRulesRelationship.getSaleIds()` hands you the matching product IDs, ready for a product query

Perfect For
-----------

[](#perfect-for)

- Tying pricing rules to specific content
- Linking catalog pricing rules to marketing campaigns
- Keeping your pricing strategies organised across the commerce site

Documentation
-------------

[](#documentation)

Full Documentation can be found at

Support
-------

[](#support)

For support, please visit our [GitHub Issues page](https://github.com/john-henry/craft-pricing-rules-relationship/issues)

License
-------

[](#license)

This package is licensed for free under the MIT License.

Requirements
------------

[](#requirements)

- Craft CMS 5.0 or later
- Craft Commerce 5.0 or later
- PHP 8.2 or later.

---

[ ![John Henry - Craft CMS Plugins](https://camo.githubusercontent.com/7fe2cde5004b1727e3c7af871108a0f568a276b1c075ddd07c816ffb1cbbcc42/68747470733a2f2f6a6f686e68656e72792e69652f696d616765732f706c7567696e732f6c6f676f2e737667)](https://johnhenry.ie/plugins/)

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance96

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~66 days

Total

3

Last Release

19d ago

PHP version history (2 changes)1.0.1PHP &gt;=8.2

1.0.2PHP ^8.2 || ^8.3 || ^8.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/393817?v=4)[John Henry](/maintainers/johnhenry)[@johnhenry](https://github.com/johnhenry)

---

Top Contributors

[![john-henry](https://avatars.githubusercontent.com/u/44709?v=4)](https://github.com/john-henry "john-henry (24 commits)")

---

Tags

craftcraft-plugincraft5craftcmscraftcommercecmsCraftcraftcmscraft-plugincraft-commercesales relationshipcatalog pricing rulespromotional sales

### Embed Badge

![Health badge](/badges/johnhenry-craft-pricing-rules-relationship/health.svg)

```
[![Health](https://phpackages.com/badges/johnhenry-craft-pricing-rules-relationship/health.svg)](https://phpackages.com/packages/johnhenry-craft-pricing-rules-relationship)
```

###  Alternatives

[verbb/events

A full-featured plugin for event management and ticketing.

2311.9k](/packages/verbb-events)[verbb/formie

The most user-friendly forms plugin for Craft.

101393.6k74](/packages/verbb-formie)[verbb/comments

Add comments to your site.

13753.9k1](/packages/verbb-comments)[verbb/navigation

Create navigation menus for your site.

92705.0k19](/packages/verbb-navigation)[verbb/vizy

A flexible visual editor field for Craft.

4250.4k](/packages/verbb-vizy)[verbb/hyper

A user-friendly links field for Craft.

24147.8k12](/packages/verbb-hyper)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
