function basic_cart_add_to_cart_link in Basic cart 7.2
Function returns an array to render add to cart link
1 call to basic_cart_add_to_cart_link()
File
- ./
basic_cart.theme.inc, line 31
Code
function basic_cart_add_to_cart_link($nid) {
$link = array(
'#type' => 'link',
'#id' => drupal_html_id('basic-cart-add-to-cart-link-' . $nid),
'#prefix' => '<div class="basic-cart-add-to-cart">',
'#suffix' => '</div>',
'#title' => t('Add to cart'),
'#href' => 'cart/add/' . $nid,
'#attributes' => array(
'class' => array(
'button',
'basic-cart-add-to-cart-link',
),
),
);
return $link;
}