I am trying to add a link or button from the checkout page http://dev.hearst.gotpantheon.com/cart/checkout

To the update cart page http://dev.hearst.gotpantheon.com/cart/

Right now there are only two buttons showing up, "review cart" and "cancel"

strangely enough if I press "enter" on my keypad I get redirected to the desired update cart page. http://dev.hearst.gotpantheon.com/cart/

I am thinking of using

function MyThemeName_uc_cart_checkout_form($form) {


To add a simple link to 'update cart' into the html or as a form element, I am new to Drupal. How would I do this using the form API? Or is there simply a setting I can set to make the "update cart button" appear http://dev.hearst.gotpantheon.com/cart/

1 Answer 1


The cancel button will take the user back to the cart page, which is why you are redirected there when you hit enter on the form.

You could indeed add the link by theming the checkout form.

The alternative would be by modifying the form itself, and adding a new markup type element:

$form['cart_link'] = array('#value' => l('Cart', 'cart'));

You can modify the form using hook_form_alter

But using the theme hook is fine too!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.