Below code has been posted here earlier, unfortunately I have been unable to find the post again.
It automatically updates the quantity in the shopping cart when clicking 'Checkout'. This is useful if the customer changes the quantity in the cart but forgets to click 'Update' before clicking 'Checkout'.
In /includes/main_cart_actions.php
change:
case 'update_product' :
$_SESSION['cart']->actionUpdateProduct($goto, $parameters);
break;
to:
case 'update_product' :
if($_POST['checkout'][0]) {
$_SESSION['cart']->actionUpdateProduct('checkout_shipping', $parameters);
} else {
$_SESSION['cart']->actionUpdateProduct($goto, $parameters);
}
break;
and change :
/includes/templates/(your path)/templates/tpl_shopping_cart_default.php
<div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_CHECKOUT_GREEN, BUTTON_CHECKOUT_ALT) . '</a>'; ?></div>
to:
<div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_SHIPPING, '', 'SSL') . '">' . zen_image_submit(BUTTON_IMAGE_CHECKOUT_GREEN, BUTTON_CHECKOUT_ALT, 'name="checkout[0]" value="bv5q"'); ?></div>
This works fine in IE but not in Firefox. In Firefox it does update when you click the 'Checkout' button but when you click the 'Update' button it takes you to the sign-in page instead of just updating the cart.
Anybody have a solution or update to this code?



