![]() Now u can create rules, like: When user creates new published product call our custom action. I copied the Fetch entity by id code and modified it so my returned numeric value can be saved and used in other Actions. In my case, the action will just be sending an email to prove I found a product. ![]() The Rules 'Send email' action allows you specify a list of recipients, a subject, an email body, and. The condition we need is to check that the line item contains the product you expect, and the action can be whatever you want - publish a node based on a certain field or whatever. At this point the Rule will trigger and the email will be sent. Fill the additional fields and when you finish, click on 'Done. To trigger this rule, go to / admin / structure / taxonomy / manage / tags / overview, click on the 'Add term' button, fill in the term 'Name' and 'Description', then press 'Save'. Some actions will only show the full form after you save it. Fill each field and click on 'Save' button. Providing Custom Actions to Rules Rules actions are responses to events and conditions detected by the Rules module. ![]() Then select the appropriated Action type and click on the 'Continue' button. Example use cases Build flexible content publishing workflows changes Send customized mails to notify your users about important Create custom redirections, system messages, breadcrumbs. So, I implemented a custom action which will take the Product-Display URL(node/77) and return 77. To create a new action, access the 'Actions' tab at the Business Rules page and click on 'Add Action' button. Array ( 'label' => t ( 'Sync company prices' ), 'arguments' => array ( // action will recieve product node and its author 'node' => array ( 'type' => 'node', 'label' => t ( 'Content' ) ), 'author' => array ( 'type' => 'user', 'label' => t ( 'User, which is set as author' ) ), ), 'module' => 'Node', ), ) } // custom action function sync_company_prices_action ( $node, $author ) ?> 210 The Rules module allows site administrators to define conditionally executed actions based on occurring events (known as reactive or ECA rules). I have created an custom action form updating the order field value.But its not working as its not updating the value,the same code is working on some other entity view.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |