Ajax submit Update Cart button in Cart Block
I'm trying to add ajax to the dc_cart_block, but am having some issues with the line items not refreshing and the form submitting twice.
The site is here: http://piesd.txcsites.com/order-pies/cowboy
The module code is here: http://pastebin.com/Zwn6Cean
If you add something to the cart and then try to update the quantity of a line item you'll see the issues.
The total updates but the line item total does not update and in the $form_state array the new default quantity doesn't refresh. If the page is refreshed then the cart load properly, but the view is loading the line items from a cache or something instead of rebuilding line items after the form submit has gone through.
Second minor issue: the form is submitting twice (Cart update message appears twice for every ajax call)