Announcement

Collapse
No announcement yet.

Capturing the customers IP Address with the Order.

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Capturing the customers IP Address with the Order.

    It is possible to capture the IP address of the customer and download it with the customer's order.

    To do this locate the file: -

    ActinicPXML.pm

    within the site folder and open it in a plain text editor.

    Locate the function: -

    sub GeneralTagHandler

    a few lines below that locate the line: -

    Code:
    		$rhashVariableTable->{$::VARPREFIX.'GENERALUSERDEFINED'} = ACTINIC::EncodeText2($::g_GeneralInfo{'USERDEFINED'});
    and replace this with the following: -

    Code:
    		#$rhashVariableTable->{$::VARPREFIX.'GENERALUSERDEFINED'} = ACTINIC::EncodeText2($::g_GeneralInfo{'USERDEFINED'});
    		my $remote_host = $ENV{'REMOTE_HOST'};
    		my $remote_addr = $ENV{'REMOTE_ADDR'};
    		if (($remote_host eq $remote_addr) || ($remote_host eq '')) 
    			{
    			$remote_host = gethostbyaddr(pack('C4', split(/\./, $remote_addr)), 2) || $remote_addr;
    			}
    		$rhashVariableTable->{$::VARPREFIX.'GENERALUSERDEFINED'} = $remote_addr . '/' . $remote_host;
    and save the file.

    Once you have done this go to 'Design | Text' and click the 'Go to' button.
    In the box that opens enter: -

    Phase: 4
    ID: 2

    and click 'OK'.
    You will be taken to a prompt called 'General User Definable 3'. Please tick the box in the column 'Show' for this entry and then go to the field 'Current Value' and give a relevant name (i.e. 'IP Address of customer') and click 'OK'.

    Once you have done this upload the site.

    On testing the site you will see an extra field with the general information field that is pre-filled with the IP address information. This is downloaded with the order and shown in the 'Comments' box in the 'Misc' tab.

    NOTE: SellerDeck cannot offer detailed information on this however a fresh default copy of the script file can be found in the 'Original' folder within the software's installation folder in 'Program Files' or 'Program Files (x86)' of your machine.
Working...
X