定制 blmage/magento2-rule-operators 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

blmage/magento2-rule-operators

最新稳定版本:1.1.0

Composer 安装命令:

composer require blmage/magento2-rule-operators

包简介

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

README 文档

README

Installation

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

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

to any rule condition based on Magento\Rule\Model\Condition\AbstractCondition. This includes conditions from:

  • catalog price rules
  • catalog widget rules
  • cart price rules

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.

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.

Support / Suggestions

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

统计信息

  • 总下载量: 983
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 6
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: OSL-3.0
  • 更新时间: 2018-05-21