Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

if payment method = money order... show special message


Guest

Recommended Posts

what is the code to be used to display a message to customers on checkout_confirmation.php & checkout_success.php that are using only money order or cash methods?

 

for the life of me, i cannot figure it out but i'm quite sure it's something ridiculously simple :blush:

Link to comment
Share on other sites

It's the MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION string that comes from the money order payment module (function confirmation()). The checkout_confirmation.php file list this extra section when that function is defined. You will see it setting the extra payment info box using something like

 

if ($confirmation = $payment_modules->confirmation()) {
...

Link to comment
Share on other sites

well that definition (MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION) comes from the moneyorder module (check the catalog\includes\languages\english\modules\moneyorder.php) The actual test happens with the:

if ($confirmation = $payment_modules->confirmation()) {

 

in the checkout_confirmation.php because each payment module can supply that function (optional). So when that function is present in a payment module, it typically returns some descriptive string which in turn is displayed with the final confirmation page.

Link to comment
Share on other sites

is there any way to avoid using the description bit? i tend to change mine from time to time based upon the idiotic emails i've received from potential purchases that didn't understand one thing or another

Link to comment
Share on other sites

yes you could remove it but how you going to specify the money order details/requirements? You cannot simply hard-code a string to always show during confiirmation because each payment module has different requirements.

Link to comment
Share on other sites

  • 3 weeks later...

i figured as much, but that is why i would like to try and "match" them somehow

 

something like

if (MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION == "money order blaba") {

echo "you are paying by money order"

}

 

if (MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION == "credit blaba") {

echo "you are paying by credit cards"

}

 

if (MODULE_PAYMENT_MONEYORDER_TEXT_DESCRIPTION == "business check blaba") {

echo "you are paying by check"

}

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...