You are here

function mailchimp_ecommerce_admin_sync_orders in Mailchimp E-Commerce 7

The Mailchimp eCommerce historical order data sync form.

1 string reference to 'mailchimp_ecommerce_admin_sync_orders'
mailchimp_ecommerce_menu in ./mailchimp_ecommerce.module
Implements hook_menu().

File

includes/mailchimp_ecommerce.admin.inc, line 274
Administration forms for Mailchimp eCommerce.

Code

function mailchimp_ecommerce_admin_sync_orders() {
  $form['sync_orders'] = [
    '#type' => 'checkbox',
    '#title' => t('Sync Orders'),
    '#description' => t('Sync historical orders to Mailchimp.'),
  ];
  $form['timespan'] = [
    '#type' => 'textfield',
    '#title' => t('Time span'),
    '#default_value' => 6,
    '#field_suffix' => 'months',
    '#description' => 'Mailchimp recommends syncing the past 6 months of order data. Leave blank to sync all orders.',
    '#size' => 3,
    '#maxlength' => 3,
  ];
  $form['actions']['submit'] = [
    '#type' => 'submit',
    '#value' => t('Sync with Mailchimp'),
  ];
  $form['#submit'][] = 'mailchimp_ecommerce_admin_sync_submit';
  return $form;
}