0

I use drupal 6 and ubercart 2.

I would like to change position of the checkout button on checkout/review page to the top or possibly to duplicate it (it is currently on the bottom of the page which is not very user friendly) I found a function in uc_cart.pages.inc called

function theme_uc_cart_checkout_review($panes, $form)

Inside on the bottom I found the code for review button

$output .= '<tr class="review-button-row"><td colspan="2">'. $form
        .'</td></tr></table>';

However, moving the code above the table code, breaks whole page. (I tried this inside the .inc file, because adding the function inside template file, I got an error) What would be the correct way of achieving my task? Thank you

1

your better off targeting the checkout button via CSS than mess with ubercarts tables on checkout as the $form contains all of the other code which you would need to parse to extract the button and apply it somewhere else.

Just do a position: absolute on the button.

If your CSS isn't up to par, then I would parse the $form variable and preg_replace() it out. You'll need to have good regex skills to grab it.

  • Thank you, css positioning never came to my mind. That is enough for my needs. – loparr Jan 14 '13 at 22:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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