You are here

fz152_commerce_checkout.module in FZ152 7

File

module/commerce_checkout/fz152_commerce_checkout.module
View source
<?php

/**
 * Implements hook_commerce_checkout_pane_info().
 */
function fz152_commerce_checkout_commerce_checkout_pane_info() {
  $checkout_panes = array();
  $checkout_panes['fz152_commerce_checkout_pane'] = array(
    'name' => t('FZ152 pane'),
    'base' => 'fz152_commerce_checkout_pane',
    'page' => 'checkout',
    'locked' => FALSE,
    'review' => FALSE,
    'weight' => 99,
  );
  return $checkout_panes;
}

/**
 * Checkout pane callback: returns a pane with checkbox inside.
 */
function fz152_commerce_checkout_pane_checkout_form($form, &$form_state, $checkout_pane, $order) {
  $pane_form = array();

  // Otherwise add any enabled checkout panes that are visible on review.
  $pane_form['fz152_agreement'] = array(
    '#type' => 'checkbox',
    '#required' => TRUE,
    '#title' => variable_get_value('fz152_checkbox_title'),
  );
  return $pane_form;
}

Functions

Namesort descending Description
fz152_commerce_checkout_commerce_checkout_pane_info Implements hook_commerce_checkout_pane_info().
fz152_commerce_checkout_pane_checkout_form Checkout pane callback: returns a pane with checkbox inside.