You are here

function commerce_email_install in Commerce Email 7

Implements hook_install().

File

./commerce_email.install, line 77
Install file for Commerce Email Sets default emails and settings

Code

function commerce_email_install() {

  // Insert default HTML order email
  $data = array(
    'type' => 'order',
    'language' => LANGUAGE_NONE,
    'subject' => 'Order [commerce-order:order-number] at [site:name]',
    'content' => '<p>Thanks for your order [commerce-order:order-number] at [site:name].</p><p>[commerce-email:order-items]</p><p>If this is your first order with us, you will receive a separate e-mail with login instructions.</p><p>You can view your order history with us at any time by logging into our website at: [site:login-url]</p><p>You can find the status of your current order at: [commerce-order:customer-url]</p><p>Please contact us if you have any questions about your order.</p><p>Commerce Email - Textarea</p>',
  );
  drupal_write_record('commerce_email', $data);

  // Insert default HTML account email
  $data = array(
    'type' => 'account',
    'language' => LANGUAGE_NONE,
    'subject' => 'An administrator created an account for you at [site:name]',
    'content' => '<p>[user:name],</p><p>A site administrator at [site:name] has created an account for you. You may now log in by clicking this link or copying and pasting it to your browser:</p><p>[user:one-time-login-url]</p><p>This link can only be used once to log in and will lead you to a page where you can set your password.</p><p>After setting your password, you will be able to log in at [site:login-url] in the future using:</p><p>username: [user:name]</p><p>password: Your password</p><p>--  [site:name] team</p>',
  );
  drupal_write_record('commerce_email', $data);
}