Search by

johnhenry / craft-pricing-rules-relationship

johnhenry

A field that ties Craft Commerce catalog pricing rules to any element, so offer pages list the products those rules cover.

Package info

github.com/john-henry/craft-pricing-rules-relationship

Homepage

Documentation

Type:craft-plugin

pkg:composer/johnhenry/craft-pricing-rules-relationship

Fund package maintenance!

john-henry

Buy Me A Coffee

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

1.1.0 2026-09-28 12:27 UTC

This package is auto-updated.

Last update: 2026-09-28 12:27:42 UTC


README

Stable Version Static Badge

Pricing Rules Relationship for Craft Commerce

Pricing Rules Relationship for Craft Commerce

A field that ties Craft Commerce catalog pricing rules to any element. Tick the rules on an entry and your template gets the products those rules cover, so a Special Offers page fills itself and keeps itself right as rules start and expire.

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

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

Documentation

Full documentation is at johnhenry.ie/plugins/pricing-rules-relationship/docs.

Requirements

  • Craft CMS 5.0 or later
  • Craft Commerce 5.0 or later
  • PHP 8.2 or later

Accessibility

How accessible the plugin is, what's been checked, and how to report a problem are all in the accessibility statement.

Support

Need a hand? Open an issue on the GitHub Issues page.

License

This plugin is free to use under the MIT License.

John Henry - Craft CMS Plugins