How do I change the time that shows on the customer receipt email, and also change the time the orders are shown as being created?
SellerDeck uses GMT for the date on the orders. In order to change this, you need to edit the Perl scripts in several places.
First you need to edit the 'Order Date' function.
Within your site directory, find 'ACTINIC.pm' and open it in a text editor
Find
sub GetActinicDate
and then find the following line in this function:
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = gmtime(time);
Then adjust the time as required by adding (or subtracting) seconds from the 'time' value. E.g. if you want the time to be displayed as a GMT-5 time then the above line should be modified as
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = gmtime(time - 5 * 60 * 60);
If you save your changes and upload your site then all orders will be downloaded by using the adjusted times.
The next step is to change the time on the customer confirmation email.
Locate 'OrderScript.pl' within your site directory and open it in Notepad.
Find
sub GenerateCustomerMail
where the same line as above can be found.
Just apply the same changes here and save the file. Please note that there is a line just a few lines below which contains the string 'GMT'. This should also be modified to reflect your real time zone.
In other words the line
$sDate = $sDatePrompt . sprintf(" %2.2d:%2.2d GMT", $hour, $min);
should be modified to use your time zone. E.g.
$sDate = $sDatePrompt . sprintf(" %2.2d:%2.2d PST", $hour, $min);
The receipt page already uses the server's local time. If it is not appropriate then this can also be modified by editing 'sub DisplayReceiptPhase' in OrderScript.pl. Just find the line:
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
and modify as appropriate. I would suggest to change this to the same as the one in GetActinicDate.
SellerDeck is not able to provide any detailed support for script changes made. If you find that there is a problem, an original copy of the script can be found within the 'Original' folder in your installation. Copy this into your site folder.
SellerDeck uses GMT for the date on the orders. In order to change this, you need to edit the Perl scripts in several places.
First you need to edit the 'Order Date' function.
Within your site directory, find 'ACTINIC.pm' and open it in a text editor
Find
sub GetActinicDate
and then find the following line in this function:
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = gmtime(time);
Then adjust the time as required by adding (or subtracting) seconds from the 'time' value. E.g. if you want the time to be displayed as a GMT-5 time then the above line should be modified as
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = gmtime(time - 5 * 60 * 60);
If you save your changes and upload your site then all orders will be downloaded by using the adjusted times.
The next step is to change the time on the customer confirmation email.
Locate 'OrderScript.pl' within your site directory and open it in Notepad.
Find
sub GenerateCustomerMail
where the same line as above can be found.
Just apply the same changes here and save the file. Please note that there is a line just a few lines below which contains the string 'GMT'. This should also be modified to reflect your real time zone.
In other words the line
$sDate = $sDatePrompt . sprintf(" %2.2d:%2.2d GMT", $hour, $min);
should be modified to use your time zone. E.g.
$sDate = $sDatePrompt . sprintf(" %2.2d:%2.2d PST", $hour, $min);
The receipt page already uses the server's local time. If it is not appropriate then this can also be modified by editing 'sub DisplayReceiptPhase' in OrderScript.pl. Just find the line:
($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
and modify as appropriate. I would suggest to change this to the same as the one in GetActinicDate.
SellerDeck is not able to provide any detailed support for script changes made. If you find that there is a problem, an original copy of the script can be found within the 'Original' folder in your installation. Copy this into your site folder.