You are here

commerce_invoice_receipt.rules_defaults.inc in Commerce Invoice Receipt 7.2

Default rules that are shipped with the module.

File

commerce_invoice_receipt.rules_defaults.inc
View source
<?php

/**
 * @file
 * Default rules that are shipped with the module.
 */

/**
 * Implements hook_default_rules_configuration().
 */
function commerce_invoice_receipt_default_rules_configuration() {
  $rules = array();

  // Rule for sending the invoice receipt upon completing the checkout process.
  $rules['rules_commerce_invoice_receipt_email'] = entity_import('rules_config', '{"commerce_invoice_receipt_email":{"LABEL":"Send an order invoice","PLUGIN":"reaction rule","OWNER":"rules","TAGS":["Commerce Checkout","Commerce Invoice Receipt"],"REQUIRES":["rules","commerce_invoice_receipt","commerce_checkout"],"ON":{"commerce_checkout_complete":[]},"DO":[{"commerce_invoice_receipt_action_mail":{"commerce_order":["commerce_order"],"to":"[commerce-order:owner] \\u003C[commerce-order:mail]\\u003E","subject":"[site:name]: Order #[commerce-order:order-id]"}},{"drupal_message":{"message":"The invoice has been sent to \\u003Cem\\u003E[commerce-order:mail]\\u003C\\/em\\u003E."}}]}}');

  // Rule for sending the invoice receipt upon submitting the admin/front end
  // forms.
  $rules['rules_commerce_invoice_receipt_email_form'] = entity_import('rules_config', '{"rules_commerce_invoice_receipt_email_form":{"LABEL":"Send an order invoice from admin\\/front end form","PLUGIN":"reaction rule","OWNER":"rules","TAGS":["Commerce Checkout","Commerce Invoice Receipt"],"REQUIRES":["rules","commerce_invoice_receipt"],"ON":{"commerce_invoice_receipt_rules_event_invoice_from_front":[],"commerce_invoice_receipt_rules_event_invoice_from_admin":[]},"DO":[{"commerce_invoice_receipt_action_mail":{"commerce_order":["commerce_order"],"to":"[email:value]","subject":"[site:name]: Order #[commerce-order:order-id]"}},{"drupal_message":{"message":"The invoice has been sent to \\u003Cem\\u003E[email:value]\\u003C\\/em\\u003E."}}]}}');
  return $rules;
}