You are here

commerce_wishlist.admin.inc in Commerce Wishlist 7.2

Same filename and directory in other branches
  1. 7.3 commerce_wishlist.admin.inc
  2. 7 commerce_wishlist.admin.inc

Provides the wishlist for use in Drupal Commerce.

File

commerce_wishlist.admin.inc
View source
<?php

/**
 * @file
 * Provides the wishlist for use in Drupal Commerce.
 */
function commerce_wishlist_admin_form($form, &$form_state) {
  $form['commerce_wishlist_weight'] = array(
    '#type' => 'textfield',
    '#title' => t('Button/link weight'),
    '#description' => t('Set the position of the button/link "Add to wishlist".'),
    '#default_value' => variable_get('commerce_wishlist_weight', 0),
    '#required' => TRUE,
  );
  $form['commerce_wishlist_element'] = array(
    '#type' => 'select',
    '#title' => t('"Add to wishlist" element'),
    '#options' => array(
      'link' => t('Ajax link'),
      'button' => t('Button'),
    ),
    '#description' => t('The way "Add to wishlist" element will be displayed. Either as a button or link.'),
    '#default_value' => variable_get('commerce_wishlist_element', 'button'),
  );
  $form['commerce_wishlist_product_types'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Product types'),
    '#options' => commerce_product_type_options_list(),
    '#description' => t('Enable "Add to wishlist" element for these product types. If none selected, all types will be allowed.'),
    '#default_value' => variable_get('commerce_wishlist_product_types', array()),
  );
  return system_settings_form($form);
}

Functions

Namesort descending Description
commerce_wishlist_admin_form @file Provides the wishlist for use in Drupal Commerce.