BlessIsaacola:
Thank you! You have my head spinning that's for sure. I have inserted DrByte's code all over the places in previous tests and everything was fine until I got to around line 353 of orders.php.
This is/was
<?php
require(DIR_WS_INCLUDES . 'header.php');
die('it got this far');
?>
</div>
READ CAREFULLY:
If the code 'died' at this point, with the 'it got this far' displayed on screen, then everything IS OK UP TO THIS POINT.
It sounds to me that it is getting to this point, and you are considering this to be where the fault is rather than where it isn't.
BlessIsaacola:
I am not even sure that's it's totally a payment mod issue.
NEITHER ARE WE.
We are GUESSING just as much as you are. The difference is that we are making educated guesses based on logic (and experience).
Your guesses (eg, where to place the 'die' commands) seem to be without logic. :(
require(DIR_WS_INCLUDES . 'header.php');
is a piece of code used with almost every aspect of ZenCart. I would NEVER have placed my 'die' command after the require(DIR_WS_INCLUDES . 'header.php');
simply because this is such a generic and commonly used piece of code, if there WAS something amiss with the header.php file (which is what your 'die' test is meant to prove/disprove, then we could logically expect much more serious problems with the store, rather than something that is taking a rather 'unique' set of circumstances to trigger.
BlessIsaacola:
The fact that I cannot duplicate the problem in my test environment makes this even more frustrating.
Hhhhm, if you can't duplicate the problem in your test environment then I hope you aren't trying to debug in this test environment, because doing so will be futile. You'll never find the problem if it doesn't exist with the code you are testing with.
This is also why we can't to the testing/checking required for you. Our systems don't exhibit the same problem, and unless we can replicate it, all we can do is try to guide you in the ways that we would do things if we did have the problem setup to work with.
BlessIsaacola:
I will give it another try when I can perhaps wrap my head around some of what you suggested.
It's not rocket science. It is just a matter of following the program flow until you hit the problem. Keeping in mind that computers don't call things at random.
EVERYTHING is performed in a very specific sequence of events that are controlled by 'if/then' statements.
The 'trick' to finding a speedy solution is in trying to find a good place to start following the trail for any given problem.
You could start your 'die' commands in the 'index.php' file if you wanted (this is what gets the whole ball rolling) and eventually you'll be led to the cause of the problem. Things can be sped up considerably if you start the debugging closer to the source of the problem though, and this is where experience and logic plays a big role. We can guide you along the way to increase your experience levels, and we can even use our own logic to determine where a good place to start will be, but going that next step in following the program flow is a logical process that you need to do for yourself.
My previous post wasn't designed to a step by step guide as to what you need to do, or where to look, so please don't treat it is some sort of 'bible'. It was designed to provide you with examples of the things you need to do and consider. This is why I opted to use 'your' code portion for my initial examples.
The later examples and suggestions I gave are little more than the approach I would take if I had this exact same problem. Another developer/coder may decide that even this is the 'wrong' place to start the debugging, and they could well be correct. Where I chose to start could easily lead to a dead end, in which case, I'd need to try to find another 'logical' starting place.
The bottom line is that we can't hold your hand with this one. We can provide you with the methods and techniques, but you are the only one in a position to follow them through until the cause is found. Once the cause has been found we should be able to give you additional information as to how you need to fix it, but that's a whole new ballgame.
Remember. If you reach/trigger the 'die' commands then everything is OK up to that point. You need to remove the 'die' command to let the processing continue past that point with a new 'die' command further down the code.... FOLLOW THE PROGRAM FLOW!
Cheers
Rod
NOTE: We are sorry that Rod is no longer with us.
We are grateful for all his contributions to the Zen Cart community.
Ozpost - The Ultimate Shipping module for Australian Merchants. Click these links for its Homepage, or Download from Zen-Cart.com.