function basic_cart_checkout in Basic cart 7
Same name and namespace in other branches
- 7.2 basic_cart.cart.inc \basic_cart_checkout()
Checkout form implementation.
1 string reference to 'basic_cart_checkout'
- basic_cart_menu in ./
basic_cart.module - Implements hook_menu().
File
- ./
basic_cart.cart.inc, line 203 - Basic cart shopping cart implementation functions.
Code
function basic_cart_checkout() {
$cart = theme('basic_cart_cart_flat', array(
'cart' => basic_cart_get_cart(),
));
// If the cart is empty, we don't want to show the checkout form.
$shopping_cart = basic_cart_get_cart();
if (empty($shopping_cart)) {
return $cart;
}
$form = drupal_render(drupal_get_form('basic_cart_checkout_form'));
return $cart . $form;
}