uc_cart.variable.inc 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php
  2. /**
  3. * @file
  4. * Variable module hook implementations.
  5. */
  6. /**
  7. * Implements hook_variable_group_info().
  8. */
  9. function uc_cart_variable_group_info() {
  10. $groups['uc_cart_checkout'] = array(
  11. 'title' => t('Ubercart checkout settings'),
  12. 'access' => 'administer store',
  13. 'path' => array('admin/store/settings/checkout'),
  14. );
  15. return $groups;
  16. }
  17. /**
  18. * Implements hook_variable_info().
  19. */
  20. function uc_cart_variable_info($options) {
  21. $variables['uc_msg_order_submit'] = array(
  22. 'type' => 'text',
  23. 'title' => t('Completion message header', array(), $options),
  24. 'description' => t('Header for message displayed after a user checks out.', array(), $options),
  25. 'group' => 'uc_cart_checkout',
  26. 'default' => uc_get_message('completion_message'),
  27. );
  28. $variables['uc_msg_order_logged_in'] = array(
  29. 'type' => 'text',
  30. 'title' => t('Completion message for logged in users', array(), $options),
  31. 'description' => t('Message displayed upon checkout for a user who is logged in.', array(), $options),
  32. 'group' => 'uc_cart_checkout',
  33. 'default' => uc_get_message('completion_logged_in'),
  34. );
  35. $variables['uc_msg_order_existing_user'] = array(
  36. 'type' => 'text',
  37. 'title' => t('Completion message for existing users', array(), $options),
  38. 'description' => t("Message displayed upon checkout for a user who has an account but wasn't logged in.", array(), $options),
  39. 'group' => 'uc_cart_checkout',
  40. 'default' => uc_get_message('completion_existing_user'),
  41. );
  42. $variables['uc_msg_order_new_user'] = array(
  43. 'type' => 'text',
  44. 'title' => t('Completion message for new users', array(), $options),
  45. 'description' => t("Message displayed upon checkout for a new user whose account was just created. You may use the special tokens !new_username for the username of a newly created account and !new_password for that account's password.", array(), $options),
  46. 'group' => 'uc_cart_checkout',
  47. 'default' => uc_get_message('completion_new_user'),
  48. );
  49. $variables['uc_msg_order_new_user_logged_in'] = array(
  50. 'type' => 'text',
  51. 'title' => t('Completion message for new logged in users', array(), $options),
  52. 'description' => t('Message displayed upon checkout for a new user whose account was just created and also <em>"Login users when new customer accounts are created at checkout."</em> is set on the <a href="!user_login_setting_ur">checkout settings</a>.', array('!user_login_setting_ur' => 'admin/store/settings/checkout'), $options),
  53. 'group' => 'uc_cart_checkout',
  54. 'default' => uc_get_message('completion_new_user_logged_in'),
  55. );
  56. $variables['uc_msg_continue_shopping'] = array(
  57. 'type' => 'text',
  58. 'title' => t('Continue shopping message', array(), $options),
  59. 'description' => t('Message displayed upon checkout to direct customers to another part of your site.', array(), $options),
  60. 'group' => 'uc_cart_checkout',
  61. 'default' => uc_get_message('continue_shopping'),
  62. );
  63. $variables['uc_cart_new_account_details'] = array(
  64. 'type' => 'text',
  65. 'title' => t('New account details help message', array(), $options),
  66. 'description' => t('Enter the help message displayed in the new account details fieldset when shown.', array(), $options),
  67. 'group' => 'uc_cart_checkout',
  68. 'default' => t('<b>Optional.</b> New customers may supply custom account details.<br />We will create these for you if no values are entered.', array(), $options),
  69. );
  70. $variables['uc_checkout_instructions'] = array(
  71. 'type' => 'text',
  72. 'title' => t('Checkout instructions', array(), $options),
  73. 'description' => t('Provide instructions for customers at the top of the checkout screen.', array(), $options),
  74. 'group' => 'uc_cart_checkout',
  75. 'default' => '',
  76. );
  77. $variables['uc_checkout_review_instructions'] = array(
  78. 'type' => 'text',
  79. 'title' => t('Checkout review instructions', array(), $options),
  80. 'description' => t('Provide instructions for customers at the top of the checkout review screen.', array(), $options),
  81. 'group' => 'uc_cart_checkout',
  82. 'default' => t("Your order is almost complete. Please review the details below and click 'Submit order' if all the information is correct. You may use the 'Back' button to make changes to your order if necessary.", array(), $options),
  83. );
  84. return $variables;
  85. }