uc_quote.rules_defaults.inc 566 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * @file
  4. * Rules configurations for shipping quotes modules.
  5. */
  6. /**
  7. * Implements hook_default_rules_configuration().
  8. */
  9. function uc_quote_default_rules_configuration() {
  10. $configs = array();
  11. $methods = module_invoke_all('uc_shipping_method');
  12. foreach ($methods as $method) {
  13. $set = rules_and(array(
  14. 'order' => array('type' => 'uc_order', 'label' => t('Order')),
  15. ));
  16. $set->label = t('@method conditions', array('@method' => $method['title']));
  17. $configs['get_quote_from_' . $method['id']] = $set;
  18. }
  19. return $configs;
  20. }