Forums / General Questions / Debuggin - Cant see the output of echo

Debuggin - Cant see the output of echo

Locked

Started by superprg on 24 Aug 2007, 7:03 AM · Views: 763

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
24 Aug 2007, 7:03 AM
#1
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Debuggin - Cant see the output of echo

Hi there
I was making some changes to the order confirmation e-mail.
So, I started editing
includes/classes/order.php

I have these statements inside the function send_order_email

echo "START";
echo htmlspecialchars($this->products_ordered_html);
echo "END";

But after I complete the test purchase, I cant see this output on any of the pages
Am I doing something wrong?
I am sure this is getting called because when I make errros, the last page of order confirmation doesn't proceed
Please help!

Tutorials on Zen Cart
http://tutorials.zen-cart.com/index.php

advanced.programmer at gmail dot com
In love with Zen Cart!!

24 Aug 2007, 9:00 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: Debuggin - Cant see the output of echo

The page does a redirect when it's finished processing, and the redirect wipes the debug output.

Add another line to your code which will halt execution and display your data before redirecting:

echo 'blahblahblah';
echo 'more stuff here';
echo $varContentsOfSomeVariables;
die('Execution stopped to display 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.

24 Aug 2007, 1:53 PM
#3
superprg avatar

superprg

Totally Zenned

Join Date:
Feb 2006
Location:
Chicago
Posts:
1,349
Plugin Contributions:
0

Re: Debuggin - Cant see the output of echo

Thanks DrByte!

Tutorials on Zen Cart
http://tutorials.zen-cart.com/index.php

advanced.programmer at gmail dot com
In love with Zen Cart!!