basketmen Posted June 29, 2009 Share Posted June 29, 2009 1. this is very basic for anyone using COD in they OSC, but i cant believe i cant found the answer yet, or i still dont know how to make it 2. after finishing make order in checkout_success.php, for default we get this message, no matter what PAYMENT methode we use, COD or Other payment : Your order has been successfully processed! Your products will arrive at their destination within 2-5 working days. it is good for Other payment like shipping with Fedex, UPS, etc But its wrong for COD, for COD it is better the message like this Your order has been successfully processed! Our courier will call you to send the order with COD. 3. what is the right conditional to do this guys? maybe it will be like this in catalog/includes/english/checkout_success.php if ( $payment == COD ) { define('TEXT_SUCCESS', 'Text for COD here' } else { define('TEXT_SUCCESS', 'Text for Other payment here' } Deadline always Link to comment Share on other sites More sharing options...
masat Posted June 29, 2009 Share Posted June 29, 2009 The if/else would work the issue being where to put it. Just quickly reviewing checkout_confirmation.php I see the $payment is entered into the $_SESSION so you need to check if the $_SESSION['payment'] is still defined in the $_SESSION when you get to checkout_success.php. If it is your problems are solved. This is very cool and I've never really noticed it before and you are correct. This is a spot where you could send the customer to a number of "Upsale" type pages based on their $payment method. If you went with a switch statement rather than an if/else the code would, in my opinion, be much more flexible and allow for many more possibilities. How do you know when you know what you want to do for the rest of your life? Link to comment Share on other sites More sharing options...
basketmen Posted July 8, 2009 Author Share Posted July 8, 2009 hmm so what is the right conditional or code for this guys, this is MUST do if you use COD i had try this in catalog/includes/english/checkout_success.php if ( $payment == COD ) { define('TEXT_SUCCESS', 'Text for COD here' } else { define('TEXT_SUCCESS', 'Text for Other payment here' } or this if ( $_SESSION['payment'] == COD ) { define('TEXT_SUCCESS', 'Text for COD here' } else { define('TEXT_SUCCESS', 'Text for Other payment here' } but its not working Deadline always Link to comment Share on other sites More sharing options...
multimixer Posted July 8, 2009 Share Posted July 8, 2009 I did exactly the same, but depending on th shipping method. You can see what I did here It's working fine, but I still wait for somebody's confirmation if there are any other problems connected My community profile | Template system for osCommerce - New: Responsive | Feedback channel Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.