rentz1980 Posted June 26, 2007 Share Posted June 26, 2007 Hi, I´m really stuck. I want to add some text in the checkout_success.php depending of the payment option chosen in the checkout_payment.php. In this page the customer can choose by clicking in the differents radio buttons his prefered payment options: paypal, credit card, cod,....... My problem is i don´t know which is the variable that get the radio button chosen by the customer. If someone can tell me wich variable keeps the the option selected by the customer i could do it global and then pass to the checkout_success.php and with an "if" add the text i need include. Hope someone could help me out :rolleyes: Link to comment Share on other sites More sharing options...
rrrhythm Posted June 26, 2007 Share Posted June 26, 2007 i'm really taking a stab in the dark here, so you'll have to troubleshoot this. but i looked into payment_confirmation.php to see what it's doing, since that page knows what payment the customer selected, and i found this: <?php echo $confirmation['fields'][$i]['title']; ?> try inserting that wherever you want on the checkout_success.php page (start with someplace obvious, like up above the header) and see if that doesn't insert the right text for whatever the payment method is on some test purchases. if it does, then you're on your way to having your conditional. if not you could look back at payment_confirmation.php and see if you can figure out what you need. just a possible line of inquiry to try. cheers, rj Link to comment Share on other sites More sharing options...
esearing Posted June 26, 2007 Share Posted June 26, 2007 The payment method radio buttons are stored in an array, top button =[0], 2nd button=[1] etc.... find in Checkout_Payment.php // one button is not an array if (document.checkout_payment.payment[0]) { ... You may also be able to use the orders table fields=Payment_method and CC_type if they have been written to. One more thought: Most of the text elements are in the languages/english.php or languages/english/ directories so you may be able to tack on to a defined text element that already exists. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.