Below is a quote from a message I recieved from Qwiz. I have put this up so that all may benefit.
Good evening, I hate to bother you my fellow osc user, but I wanted to ask u a question if i might. Did I understand u to post that u have ms2 and installed the RMA Returns System v2.1 and only made the one change listed on the forums to get it to work?
Thanks for any other info you offer.
100% correct! Warning, I am long-winded, read below at your own risk!
The thing is, I installed MySQL, PHP 4.2 and Apache 1.x (2.2 is buggy) on my Win2k box at home. The install I am referring to is on my local machine, not a webhost. I don't know if this would make a difference, but I don't think so. I wanted to test before uploading (conserves bandwith).
Since the documentation on osCommerce is so poor, it is hard to find where stuff goes. To install modules I print out the instructions, then put checks on the sheet of paper as I go along. This ensures that I am doing everything listed. I'm just meticulous. In the case of the RMA system, the instructions are almost
exact. Here is a little explanation (I'm at work now, so I can't remember all the specifics):
The RMA system "white pages" (instruction sheet) calls for new files to be added and
original files to be EDITED. Whenever I see the word "edit" I see "better do a backup"
NOTE: The download page states that RMA has "integration for the Credit Class GV sytem for making refunds". I took this to mean, "install that first". I followed my "print and check" method for that also.
After a successful install of the Credit Class (that is a whole different story), I started line by line on the instructions. The important point I need to stress is that I go file by file. I don't select a bunch and copy and paste in groups. Also, when I edit, I don't delete, I comment out the code. I label the new stuff with "// RMA addition"(or whatever module I install). This way it is easy to go back and make changes during testing.Important:
when editing one of the files in the RMA install list (after the Credit Class install) there was a discrepency (can't remember which file). In this particular case, there was a file in the RMA download file that could be taken as "copy me over the old file". But, when you look at that file and the original, there is about 20(?) lines of code difference. Actually, after you install the Credit Class, none of the line numbers in the RMA install guide even come close (ex: "look for around line 764" should be "look for around line 810"). Back to the wierd file: I took the new code that wasn't in the old file, and pasted (and commented) that in.
Just a thought, since some people are having problems and others are not, maybe a big difference is that some have the Credit Class installed, and others don't? Version 2.1 of the RMA system may actually be DEPENDANT on that class. If so, that should be added to the "white pages".
The devil is in the details. After I installed the RMA system, I went into the Admin panel to look at the changes. At the bottom left there was the new "Returns" section. I forget the number of links (I'm at work right now
), but the last link was the only page that gave me an error (Return Products, or something like that). At first I got an error similar to the one in my post, except it had no page and said "line 0". I went into the code looking for the tep_merge_array() call in returns.php. The key for me was that I knew there is a PHP function called merge_array(), but this had the "tep_" stuck to the front. After an hour going throught the code (better documentation would help a lot, even in the code itself!), I found a file that had a function for "merge_array()" (couldn't find the "tep_" one).
To get the 771 line error, I removed the "tep_", saved, then refreshed. Got the same "line 0" error, so I put the "tep_" back in. Only this time when I refreshed I got the "line 771" error. Seeing as I already did the remove of the "tep_", I wasn't sure if doing it again would couse another error. My motto "one error at a time". This is how I found out what question to ask. At that point, it became either a simple change, or a missing function (that was the only consistency between the 2 errors).
Disclaimer: I am no longer receiving errors when surfing the catalog, or admin area. However, I have not done a test of an actual return. Something could break there. But again, "One error at a time"
BTW: How does a customer initiate a return? My assumption was that you need to do a test purchase, then from the account manager a person would fill in a form. I was going to do this tonight. Any info on that?
Hope this helps. Any more questions don't hesitate to message me.
PHP may one day be destined to save the world! Then again, maybe not.