” class=”btn btn-default btn-sm mrt pull-left”>View
data[‘context’][‘product_ids’] = array($product_id);
$form_id = commerce_cart_add_to_cart_form_id(array($product_id), $quantity);
$add_to_cart_form = drupal_get_form($form_id, $line_item);
// $add_to_cart_form is now a Drupal render array and can be customized
// so you can remove the wishlist button and add the classes you want on the submit button and what not
unset($add_to_cart_form[‘add_to_wishlist’]);
$add_to_cart_form[‘submit’][‘#attributes’][‘class’] = [ ‘btn’, ‘btn-info’, ‘btn-sm’, ‘pull-left’ ];
print drupal_render($add_to_cart_form);
?>
