Take the 2-minute tour ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
    
Thank you, css positioning never came to my mind. That is enough for my needs. –  loparr Jan 14 '13 at 22:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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