summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorg089h515r8062012-08-11 11:53:11 (GMT)
committerg089h515r8062012-08-11 11:53:11 (GMT)
commitd679b06564dffcc1e82181d0969103128c75a151 (patch)
tree721021ea064b33ead3f6c48ef94d5f272e5e22ce
parent27eb857a7398a10685b2601f1d3966e5d53a1018 (diff)
add example for checkout pane
-rw-r--r--uc_ctools_example/plugins/ubercart/checkout_pane/test_checkout_pane.inc42
1 files changed, 42 insertions, 0 deletions
diff --git a/uc_ctools_example/plugins/ubercart/checkout_pane/test_checkout_pane.inc b/uc_ctools_example/plugins/ubercart/checkout_pane/test_checkout_pane.inc
new file mode 100644
index 0000000..1a7580e
--- /dev/null
+++ b/uc_ctools_example/plugins/ubercart/checkout_pane/test_checkout_pane.inc
@@ -0,0 +1,42 @@
+<?php
+
+/**
+ * @file
+ * A checkout pane plugin for Ubercart.
+ */
+/**
+ * Define this checkout paneI plugin.
+ */
+$plugin = array(
+ 'callback' => 'uc_ctools_example_checkout_pane_test',
+ 'title' => t('Test checkout pane'),
+ 'desc' => t('Test checkout pane description.'),
+ 'weight' => 10,
+);
+
+/**
+ * Test checkout pane callback function.
+ */
+function uc_ctools_example_checkout_pane_test($op, $order, $form = NULL, &$form_state = NULL) {
+ switch ($op) {
+ case 'view':
+ $description = t('Test checkout pane description.');
+
+ $contents['test_checkout_pane'] = array(
+ '#type' => 'textarea',
+ '#title' => t('Test checkout pane'),
+ );
+
+ return array('description' => $description, 'contents' => $contents);
+
+ case 'process':
+ //process logic
+ return TRUE;
+
+ case 'review':
+ $review = NULL;
+ $review[] = array('title' => t('Test checkout pane'), 'data' => t('Test checkout pane data'));
+ return $review;
+ }
+}
+