workflow change

Posts: 95
Joined: 10/29/2007
Bug Finder

Ryan,
what exactly does this do?

From Bazaar
Adding in workflow-ng support for user account conditions on the checkout event.

Posts: 5269
Joined: 08/07/2007
AdministratorHead Code Monkey - I eat bugs.

Dunno how much you know about Workflow-ng, so briefly at admin/build/workflow-ng you can define "configurations" - these are rulesets that get evaluated on certain events and perform a set of actions assuming it passes a set of conditions you have setup. One event I defined for Ubercart was "Customer completes checkout", but I was only passing to it the order object for use in conditions and actions. In order to check the user's roles, I had to also pass in their account data (whether they're logged in or not). This means if someone checks out with, for example, a reseller role, you can send them a specific e-mail instead of the normal message or even redirect them to a different page on your website.

I wish Workflow-ng had come out last year... so much of our code involves this workflow type stuff that we had to hardcode in and make our own settings for, but we could've just done it all as default workflow configurations and given people much more flexibility! Oh well... here's to the future. Eye-wink