PrintShop Web Web Integration Guide
PrintShop Web Web Integration Guide Document version: PSW 2.1 R3250 Date: October, 2007 Objectif Lune - Contact Information Objectif Lune Inc. 2030 Pie IX, Suite 500 Montréal, QC Canada H1V 2C8 Tel.: 514-875-5863 Fax: 514-342-5294 www.objectiflune.com To find an Objectif Lune office near you and for more information on our products and services, visit: www.objectiflune.
Table of Contents Introduction................................................................................................................................................. 4 Integration methods................................................................................................................................ 5 External login............................................................................................................................................... 6 External person access..
Introduction With the introduction of version 2.0 the PrintShop Web (PSW) web site is fully skinnable, everything except the actual textual content of the page can - and will - vary from skin to skin. By combining the powerful skinning engine with custom web development, new features can be added and new workflows implemented. System integrators and web developers can create custom login forms, create custom store front pages and redirect visitors to specific pages in PrintShop Web.
Integration methods This chapter describes the underwater login mechanisms supported by PSW. In all scenarios user name and password information is send to PSW. This information is used to authenticate the account and optionally redirected the web site. The underwater login procedure begins when a login request to PSW is made from any Internet or Intranet website. In order to instantiate the underwater login, the request can be made to either of the files mentioned below.
External login The external_login.php file handles the authentication and forwards any parameters included in the request (POST or GET). If the authentication fails the PSW login page will be shown. Optional parameters are used to redirect the web browser to a specific PSW web page and to set the skin. The external_login.
The basic webintegration index.
External person access Where the external_login.php handles both authentication and redirect parameters, the person_access.php file is solely used for authentication. The return value of the external_person_access.php file differs form the external_login.php file as it returns an encrypted password on success or a zero (0) when authentication has failed. The encrypted password is linked to the username, the domain name of the PSW web site and is only valid for the current date (today).
// The process_login.php file (the following process is an example and should be handled by your web site or portal) $hCurl = curl_init(); //Initializes a new session and return a cURL handle curl_setopt($hCurl, CURLOPT_URL, $_SERVER['HTTP_HOST']."/external_person_access.
Authentication failed Authentication passed PrintShop Web Web Integration Guide | 10
Implementing a custom store front By combining the methods described in the previous chapters a custom store front page can be developed. This page resides outside PrintShop Web and is probably stored on a different domain and can be developed in a scripting language other than PHP.
Custom store front pages In our example the storefront.php contains a hard coded list of documents. The images on the page have a hyperlink pointing to the external_login.php file. A custom store front page The URL is targeted towards the PSW system running on the localhost and states the entered user name and the encrypted password returned by the authentication process. The fcFormID parameter states preview_init_form .
Page IDs, form IDs and internal IDs are displayed in the Status bar of the browser Adding a redirect to PSW After completing the document the customer is guided through the ordering process. At the end of this process the PSW web site is redirected to the ordermanager_overview.php page. By tweaking the template.php file of the active skin you could redirect the user to your own web site/portal. This can be achieved by adding the following code to the beginning of the template.php file: