PDA

View Full Version : Order Completion - Executing a Perl Script


mfedarb
12-Jul-2006, 10:50 AM
I have a requirement to log product references once an order has been completed.

My thoughts are to add the following lines of perl script to a the function that sends out the confirmation email.

-------possible perl script begin ---------------------------------------
$ext =".txt";
$Order_CODE = "OrderComplete";
$logSlot = "$Order_CODE$ext";
open LogSlotFile, ">/usr/users/user12345/public_html/LOG_orders/$logSlot";
print LogSlotFile "Actinic Order Complete \n";
close LogSlotFile;
-------possible perl script end ---------------------------------------

Just before i start experimenting with functions in "OrderScript.pl" can any tell me which would be the ideal function to amend (with caution).

Regards

Mike

acompton
12-Jul-2006, 01:02 PM
Mike,

Its a brave man that plays with OrderScript.pl.
However, I believe the 'main' part of the script consists of three lines:

Init();
ProcessInput();
exit;

So the simplest thing would be to call your own function after these two calls.

Alan Compton
www.greenknightgames.co.uk
Great board games and cards games you won't find in the High Street