Ideally we'd embed the Rules conditions into the UI, then serialize them and store them in a single field (just like config entities do).

We need to make sure that the UI is decent enough.

CommentFileSizeAuthor
#4 integrate_with-2763001-4.patch10.29 KBmglaman

Comments

bojanz created an issue. See original summary.

bojanz’s picture

The initial conditions would accept the order as context. We can start with the order total condition.

mglaman’s picture

Title: Integrate Rules conditions » Integrate with condition plugins
Assigned: Unassigned » mglaman

Changing title. We do not need rules 100% for integrating with condition plugins. Rules just provide a UI for extended condition plugins so that you can set the context value. Most of our use cases will have a specific context value we are passing.

mglaman’s picture

Status: Active » Needs work
StatusFileSize
new10.29 KB

Initial work with passing tests. PR open: https://github.com/drupalcommerce/commerce/pull/436

Need to add a field setting which limits what condition plugins are availale. The condition manager supports categories, however Core doesn't actually do so. But we will.

mglaman’s picture

Component: User experience » Promotions
Status: Needs work » Needs review
mglaman’s picture

Title: Integrate with condition plugins » Integrate with plugins

Renaming to match end result.

  • mglaman committed 128bae2 on 8.x-2.x
    Issue #2763001 by mglaman: Integrate with plugins
    
mglaman’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.