detecting stage?

mortendk's picture
Offline
Internationalizationizer
Joined: 04/07/2008
Juice: 32
detecting stage?

To give the user an idea of where hes at in the checkout process i modified the THEME_uc_cart_checkout_form() and used
$form['#submit']['uc_multipage_checkout_checkout_page_submit']['0']
Is that the "correct" way to detect a stage - or is there somewhere a $var that I havent seen?

<?php
THEME_uc_cart_checkout_form
(){
 
//1
 
if($form['#submit']['uc_multipage_checkout_checkout_page_submit']['0']=="billing_details"){}
 
//2
 
if($form['#submit']['uc_multipage_checkout_checkout_page_submit']['0']=="shipping"){}
 
//3
 
if($form['#submit']['uc_multipage_checkout_checkout_page_submit']['0']=="payment_details"){
 
//4 checks the previous
 
if($form['#submit']['uc_multipage_checkout_checkout_page_submit']['1']=="shipping"){}
?>

- it would be cool with some kind of generic $form[#stage] though Eye-wink

/morten.dk

Multipage Checkout By: half_brick (20 replies) Sun, 06/29/2008 - 19:05