function basic_cart_block_view in Basic cart 7
Same name and namespace in other branches
- 7.3 basic_cart.module \basic_cart_block_view()
- 7.2 basic_cart.module \basic_cart_block_view()
Implements hook_block_view().
File
- ./
basic_cart.module, line 169 - Basic cart module file.
Code
function basic_cart_block_view($delta = '') {
// Check if the current user has access.
switch ($delta) {
case 'shopping_cart':
if (user_access('use basic cart')) {
include_once DRUPAL_ROOT . '/' . drupal_get_path('module', 'basic_cart') . '/basic_cart.cart.inc';
$block['subject'] = t('Your cart');
$block['content'] = theme('basic_cart_cart_render_block', array(
'cart' => basic_cart_get_cart(),
));
return $block;
}
break;
}
}