PHPackages                             windandkite/module-additional-conditions - 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. windandkite/module-additional-conditions

ActiveMagento2-module

windandkite/module-additional-conditions
========================================

Adds starts with, does not start with, and regex condition operators to Magento 2 price rules.

1.0.0(today)01↑2900%MITPHPPHP &gt;=8.1

Since Jul 23Pushed todayCompare

[ Source](https://github.com/windandkite/module-additional-conditions)[ Packagist](https://packagist.org/packages/windandkite/module-additional-conditions)[ RSS](/packages/windandkite-module-additional-conditions/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

[![image logo](docs/favicon.svg)](docs/favicon.svg) WindAndKite\_AdditionalConditions
=====================================================================================

[](#-windandkite_additionalconditions)

A Magento 2 Module that extends Magento 2 cart and catalog price rule conditions by adding custom global pattern-matching operators (`starts with`, `starts with (case sensitive)`, `does not start with`, `does not start with (case sensitive)`, and `matches regex`) for all string attributes.

Why is it needed
----------------

[](#why-is-it-needed)

Standard Magento Open Source provides limited condition operators for text attributes in sales rules (such as *contains*, *is*, or *is one of*). This creates significant limitations when attempting to build targeted promotional or shipping rules:

- **Postcode Prefixes:** Matching UK postcode areas (e.g. matching `BG1 5TG` starting with `BG` without false-positive matching on postcodes like `TS1 5BG`) is impossible with native `contains`.
- **RegEx Pattern Matching:** Grouping multiple postcode prefixes, SKU patterns, or regional names natively requires creating dozens of repetitive rule conditions.
- **Case Sensitivity Control:** Easily distinguish exact-case identifiers (e.g. `shirt-red` vs `SHIRT-RED`) without needing complex regular expressions.

`WindAndKite_AdditionalConditions` solves this globally by adding five high-performance, vendor-prefixed operators (`wk_starts_with`, `wk_starts_with_case`, `wk_not_starts_with`, `wk_not_starts_with_case`, `wk_regex`) to **all string input conditions** across Magento price rules using modern PHP 8.1+ syntax.

---

Installation
------------

[](#installation)

### Install via composer

[](#install-via-composer)

Our modules are hosted on our public packagist account and can very easily be installed via composer:

```
composer require windandkite/module-additional-conditions
```

---

### Enable the module

[](#enable-the-module)

You can enable the module by running one of the following commands:

```
bin/magento module:enable WindAndKite_AdditionalConditions
```

or

```
bin/magento setup:upgrade
```

Setup
-----

[](#setup)

No additional administrative configuration is required. Once enabled, navigate to **Marketing &gt; Cart Price Rules** (or **Catalog Price Rules**), create or edit a rule, and select any text/string attribute (such as *Shipping Postcode*, *SKU*, or *City*).

The new options will automatically appear in the operator dropdown menu:

- **starts with:** Case-insensitive prefix evaluation (`str_starts_with`).
- **starts with (case sensitive):** Strict case-sensitive prefix evaluation (`str_starts_with`).
- **does not start with:** Inverted case-insensitive prefix evaluation (`!str_starts_with`).
- **does not start with (case sensitive):** Inverted strict case-sensitive prefix evaluation (`!str_starts_with`).
- **matches regex:** Fully featured Regular Expression matching using `preg_match`.

### Examples

[](#examples)

Rule ScenarioAttributeSelected OperatorValueTarget single area postcodes (e.g. `BG1...`)Shipping Postcode`starts with``BG`Exclude specific region postcodesShipping Postcode`does not start with``BT`Match precise case-sensitive SKU prefixesSKU`starts with (case sensitive)``PROMO_`Exclude specific case-sensitive SKUsSKU`does not start with (case sensitive)``DRAFT_`Target multiple UK Postcode prefixesShipping Postcode`matches regex``/^(BGMatch SKUs with specific naming patternsSKU`matches regex``/^SHIRT-(REDContributions
-------------

[](#contributions)

To contribute to this project please install the package with the `--prefer-source` flag to download the Git source, any changes should then be pushed to GitHub and follow the usual Code Review Process. Once reviewed and merged in please create a release and appropriate tag for the changes ensuring to follow Semver.

###  Health Score

39

—

LowBetter than 84% of packages

Maintenance100

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

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

Unknown

Total

1

Last Release

0d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b99eb745db0622c303622d9fdf299e9c9579ced2b3863d121cdf5cfaeacd73a8?d=identicon)[WindAndKite](/maintainers/WindAndKite)

---

Top Contributors

[![natedawg92](https://avatars.githubusercontent.com/u/34889378?v=4)](https://github.com/natedawg92 "natedawg92 (8 commits)")

### Embed Badge

![Health badge](/badges/windandkite-module-additional-conditions/health.svg)

```
[![Health](https://phpackages.com/badges/windandkite-module-additional-conditions/health.svg)](https://phpackages.com/packages/windandkite-module-additional-conditions)
```

###  Alternatives

[mollie/magento2

Mollie Payment Module for Magento 2

1131.9M16](/packages/mollie-magento2)[fastly/magento2

Fastly CDN Module for Magento 2.4.x

1564.4M1](/packages/fastly-magento2)[buckaroo/magento2

Buckaroo Magento 2 extension

32420.3k8](/packages/buckaroo-magento2)[dotdigital/dotdigital-magento2-extension

Dotdigital for Magento 2

50398.5k20](/packages/dotdigital-dotdigital-magento2-extension)[smile/module-gift-sales-rule

Extension of Magento2 Sales Rule to provide gifted (free) products.

35124.3k2](/packages/smile-module-gift-sales-rule)[myparcelnl/magento

A Magento 2 module that creates MyParcel labels

1860.2k](/packages/myparcelnl-magento)

PHPackages © 2026

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