7.1

Table Of Contents
The $_POST variable is an array of variable names and values sent by the HTTP POST method. PrintShop Mail Web sends the
XML stream in the PSW_XML POST variable. The script reads the value of this variable and stores the data in a local variable.
The simplexml_load_string function is used to read the XML data and tto define the ID of the order. The SimpleXML extension
of PHP provides a set of functions to convert XML to an object that can be processed with normal property selectors and array
iterators. More information can be found at the following url: http://www.php.net/simplexml
A xpath expression is used to retrieve a specific node of the XML order data (the fnOrderID element). You can use the same
method to retrieve any of the elements from the XML data and use it values according to your needs.
At the end the XML data is written to a XML file using the order id as the file name.
Manage the Terms and Conditions
The Terms and Conditions template is a HTML document and is stored on the file system of the PrintShop Mail Web web
server. The terms and conditions document can be altered using a plain text editor (e.g. Note Pad++). The terms and con-
ditions document can be add per language and/or per skin allowing the look and feel of the message to be changed according
to that skin.
In order to create language specific terms and condition documents (in the termsandconditions folder) the name of these lan-
guage specific terms and conditions documents should match the iso code as specified in the Language section of the Settings
section.
The document is read from the following location, sorted by priority and language of the current logged in user:
l C:\Program Files\PrintShop Web\We-
bsite\templates\<skinname>\misc\termsandconditions\<languageiso>\termsandconditions.php
l C:\Program Files\PrintShop Web\Website\templates\<skinname>\misc\termsandconditions\termsandconditions.php
l C:\Program Files\PrintShop Web\Website\misc\termsandconditions\<languageiso>\termsandconditions.php
l C:\Program Files\PrintShop Web\Website\misc\termsandconditions\termsandconditions.php
The administrator can simply place a copy of the terms and conditions document in the folder of the skin and start customizing
the file. The isocode used in the folder path is in lowercase.
To edit the default Terms and Conditions document:
1. Select the Terms and Conditions document on the following location:
C:\Program Files\PrintShop Web\Website\misc\termsandconditions\termsandconditions.php and open the document
in a plain text editor.
2. Add your terms and conditions to the document.
It is possible to use PHP statements in the terms and conditions document. The builtin function getString is available
and returns the given string from the language strings in the Language section from the Settings section.
3. Click Save to store the changes.
Sample POST receive script
©2010 Objectif Lune Inc - 186 -