uc_cart.rules.inc 767 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. /**
  3. * @file
  4. * This file contains the Rules hooks and functions necessary to
  5. * make the cart related entity, conditions, events, and actions work.
  6. */
  7. /**
  8. * Implements hook_rules_event_info().
  9. */
  10. function uc_cart_rules_event_info() {
  11. $events['uc_checkout_complete'] = array(
  12. 'label' => t('Customer completes checkout'),
  13. 'group' => t('Cart'),
  14. 'variables' => array(
  15. 'order' => array(
  16. 'type' => 'uc_order',
  17. 'label' => t('Order'),
  18. ),
  19. ),
  20. );
  21. $events['uc_cart_checkout_start'] = array(
  22. 'label' => t('Customer starts checkout'),
  23. 'group' => t('Cart'),
  24. 'variables' => array(
  25. 'order' => array(
  26. 'type' => 'uc_order',
  27. 'label' => t('Order'),
  28. ),
  29. ),
  30. );
  31. return $events;
  32. }