WorkHabit Blogs
WORKHABIT LABSTheming Ubercart's cart/checkout/review page
As most of you might know, Ubercart is chock full of AJAX, jQuery, and Special Sauce that both helps users along and also keeps them safe. One of those safety features is a nice little security check function which erases the credit card information on the Checkout Review page (cart/checkout/review) should a user's browser be refreshed. If a refresh occurs, the user gets redirected back to the cart/checkout page and must re-input their credit card information and then re-submit the form in order to get back to the Checkout Review page again.
This, as you might have guessed, is *really* not themer-friendly. Every time you want to see a CSS or HTML change, you have to re-type some bogus credit card info into the previous page's form and then submit it again? Not anymore, you don't.
To solve this, open up the uc_cart.module's code and look for the uc_cart_checkout_review() function. It should be at line 1562 or so. Once you've located this function, look for the the if() statement called if ($_SESSION['do_review'] !== TRUE and then comment that whole section out.
Clear your browser cache, and return to the cart/checkout/review page. You can now refresh this page as much as you'd like! Just remember to uncomment this if() statement when you're done, and happy theming to ya!
/**
* Allow a customer to review their order before finally submitting it.
*/
function uc_cart_checkout_review() {
$form = drupal_get_form('uc_cart_checkout_review_form');
/*
if ($_SESSION['do_review'] !== TRUE && !uc_referer_check('cart/checkout')) {
drupal_goto('cart/checkout');
}
unset($_SESSION['do_review']);
*/
?>


Post new comment