Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

How to make TEXT_SUCCESS in checkout_success.php for COD diferrent? what the right conditional?


basketmen

Recommended Posts

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

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

  • 2 weeks later...

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...