2017 © Pedro PelĆ”ez
 

magento2-module magento2-rule-operators

Additional rule operators for Magento 2 (matches regex, starts/ends with)

image

blmage/magento2-rule-operators

Additional rule operators for Magento 2 (matches regex, starts/ends with)

  • Wednesday, July 25, 2018
  • by blmage
  • Repository
  • 0 Watchers
  • 1 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Additional rule operators for Magento 2

Installation

The extension must be installed via composer. To proceed, run these commands in your terminal:, (*1)

composer require blmage/magento2-rule-operators
php bin/magento module:enable BL_RuleOperators
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy

Documentation

This extension adds new operators (along with their negative variants): * starts with * ends with * matches regular expression, (*2)

to any rule condition based on Magento\Rule\Model\Condition\AbstractCondition. This includes conditions from: * catalog price rules * catalog widget rules * cart price rules, (*3)

Starts / ends with

This is the same as the original "contains" operator, except that the searched value must be strictly located respectively at the start or at the end of the tested value., (*4)

Matches regular expression

This performs a test based on a PCRE regular expression. You can either supply: * just a pattern (eg: ^59\d{3}$), which will applied with the i (case insensitivity) and u (UTF-8) modifiers. Note that you do not have to worry about which delimiter is actually used, as they will automatically be escaped in your pattern. * a full regex, including (valid) delimiters and modifiers (eg: /^59\d{3}$/D), which will be used as-is. This is especially useful when you want to have full control over the used modifiers., (*5)

Support / Suggestions

If you encounter a bug, or if you have a suggestion regarding a new operator, don't hesitate to post an issue!, (*6)

The Versions

25/07 2018

dev-master

9999999-dev https://www.github.com/blmage/magento2-rule-operators

Additional rule operators for Magento 2 (matches regex, starts/ends with)

  Sources   Download

OSL-3.0

The Requires

  • magento/framework >=100.0.1
  • magento/module-rule >=100.0.1
  • php >=7.0

 

by BenoƮt Leulliette

rules magento regex conditions operators

21/05 2018

1.0.0

1.0.0.0 https://www.github.com/blmage/magento2-rule-operators

Additional rule operators for Magento 2 (matches regex, starts/ends with)

  Sources   Download

OSL-3.0

The Requires

  • magento/framework >=100.0.1
  • magento/module-rule >=100.0.1
  • php >=7.0

 

by BenoƮt Leulliette

rules magento regex conditions operators