Edit: Ah, found something to read about this...
Edit: Ah, found something to read about this...
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
As ever, searching for the subject failed, but as soon as I posted a request for help, at the bottom of the page were similar requests, including this one:
https://www.zen-cart.com/showthread....Payment-Method
The only problem is that I can't get it to work. The message isn't appearing.
So, you would need to try a purchase from "start" to finish on each attempt to get the text to appear as the expectation is that once the code has executed on the checkout_success page, the information related to that purchase is supposed to be cleared and no longer available to display (which can be problematic if trying to capture the result pushed to the source code and not the screen because some source code viewers reload the page which no longer has the data available.)
So, ideally to get help resolving your current issue of it not working, would need to provide more information: what was changed, what was added, what was removed, what is the actual result (error? Empty text) how such results were confirmed, etc...
ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...
Sadly, it's worse than that. I'm not getting the "default" payment_instructions_message either. I can put in
<div id="checkoutSuccessMessage"><?php echo $payment_instructions_message; ?><!-- test --></div>
into the file and then I get
<div id="checkoutSuccessMessage"><!-- test --></div>
in the resulting page source
I basically did exactly what was suggested, but there is one ambiguous entry in the instructions at
https://www.zen-cart.com/showthread....647#post425647
It isn't clear which file boxes 2 and 3 of step 2 refer to.
I may have tried the wrong places: I put the entries into
includes/modules/checkout_process.php
and into
includes/modules/pages/checkout_success/header_php.php
but neither worked.
In v1.5.5:
if your payment module sets a value into $_SESSION['payment_method_messages']
then on checkout_success you can echo it out via $additional_payment_messages
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
I also want this to work on 1.3.9 though there is finally a plan to move to 1.5.5d
v1.3.9 has code in the tpl_checkout_success_default.php template to output whatever is in $_SESSION['payment_method_messages'], so you can just have your Payment module put a message into that variable, according to whatever your custom needs are.
In v1.5.5 it was tidied up a bit so that the message is cleaned (removed from memory) after the success page is displayed, and the output moved to a different variable. But the concept is the same: just have the payment module put its message there, and it will display on checkout-success.
.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole
Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.
Bookmarks