Update entity on cart page programmatically Drupal Commerce I need to rewrite default view - commerce_cart_form, because of my design of /cart page. So, I've created file views-view--commerce-cart-form.tpl.php and try to repeat something like on original /cart page were. I can print all needed information about line items in cart, but I don't know how to create "Update" button, to change quantity which I typed in textfield with quantity of line item. That's why I want to get help with this.

I use Drupal Commerce 7.x-1.9

Many thanks in advance!
Assuming that you want to display the full view result and add some extra content to your cart, put the following lines in a file named views-view--commerce-cart-form.tpl.php :

if($view-&gt;current_display == 'default'){//OR your display
  //dsm($view);
  print $rows;
  print '&lt;div&gt;MY CUSTOM CONTENT&lt;/div&gt;';
}


Check views-view.tpl.php doc to see available variables.

Otherwise, have a look at Commerce Cart View Override :


  This module provides the ability to override the default cart page
  view for Drupal Commerce.