function amazon_storage_settings_form in Amazon Product Advertisement API 6
Same name and namespace in other branches
- 7.2 amazon.admin.inc \amazon_storage_settings_form()
- 7 amazon.admin.inc \amazon_storage_settings_form()
Form to determine how often cache is refreshed, etc.
1 string reference to 'amazon_storage_settings_form'
- amazon_menu in ./
amazon.module - Implementation of hook_menu. Adds the url path for the Amazon settings page.
File
- ./
amazon.admin.inc, line 153
Code
function amazon_storage_settings_form() {
$period = drupal_map_assoc(array(
3600,
7200,
14400,
21600,
43200,
86400,
), 'format_interval');
$form['details']['amazon_refresh_schedule'] = array(
'#type' => 'select',
'#title' => t('Amazon refresh schedule'),
'#description' => t('Cached information on Amazon items must be refreshed regularly to keep pricing and stock information up to date. Cron must be enabled for this function to work properly.'),
'#default_value' => variable_get('amazon_refresh_schedule', 86400),
'#options' => $period,
);
$form['details']['amazon_core_data'] = array(
'#type' => 'checkboxes',
'#title' => t('Store extended product data'),
'#default_value' => variable_get('amazon_core_data', array(
'creators',
'images',
'editorial_reviews',
)),
'#options' => array(
'creators' => t('Book authors, film actors, etc.'),
'images' => t('Product images'),
'editorial_reviews' => t('Editorial reviews'),
),
);
// Now add the Javascript that does the fancy hide/show effects.
drupal_add_js(drupal_get_path('module', 'amazon') . '/amazon.admin.js');
return system_settings_form($form);
}