uc_stock.variable.inc 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /**
  3. * @file
  4. * Variable module hook implementations.
  5. */
  6. /**
  7. * Implements hook_variable_group_info().
  8. */
  9. function uc_stock_variable_group_info() {
  10. $groups['uc_stock'] = array(
  11. 'title' => t('Ubercart stock settings'),
  12. 'access' => 'administer store',
  13. 'path' => array('admin/store/settings/stock'),
  14. );
  15. return $groups;
  16. }
  17. /**
  18. * Implements hook_variable_info().
  19. */
  20. function uc_stock_variable_info($options) {
  21. $variables['uc_stock_threshold_notification_message'] = array(
  22. 'type' => 'text',
  23. 'title' => t('Message text', array(), $options),
  24. 'description' => t('The message the user receives when the stock level reaches its threshold value.', array(), $options),
  25. 'group' => 'uc_stock',
  26. 'default' => t('[store:name]: Stock threshold limit reached', array(), $options),
  27. );
  28. $variables['uc_stock_threshold_notification_subject'] = array(
  29. 'type' => 'text',
  30. 'title' => t('Message subject', array(), $options),
  31. 'description' => t('The subject line of the message the user receives when the stock level reaches its threshold value.', array(), $options),
  32. 'group' => 'uc_stock',
  33. 'default' => t('This message has been sent to let you know that the stock level for "[node:title]" with SKU [uc_stock:model] has reached [uc_stock:level]. There may not be enough units in stock to fulfill order #[uc_order:link].', array(), $options),
  34. );
  35. return $variables;
  36. }