.. You may want to use the usual include line. Uncomment and adjust the path. .. include:: ../Includes.txt .. role:: underline ======================================= EXT: Shop system (extended by MikloBit) ======================================= :Author: Kasper Skårhøj :Created: 2002-11-01T00:32:00 :Changed: 2005-05-30T02:23:55 :Email: typo3@miklobit.com :Email2: :Info 3: :Info 4: .. _EXT-Shop-system-extended-by-MikloBit: EXT: Shop system (extended by MikloBit) ======================================= Extension Key: **mkl\_products** Oryginal version Copyright 2000-2002, Kasper Skĺrhřj, Modifications Copyright 2004-2005, Milosz Klosowicz (Miklobit), This document is published under the Open Content License available from http://www.opencontent.org/opl.shtml The content of this document is related to Typo3 \- a GNU/GPL CMS/Framework available from www.typo3.com .. _Table-of-Contents: Table of Contents ----------------- **EXT: Shop system 1** **Introduction 1** **Configuration 2** Files: 2 Description 2 Static template 2 productsLib.inc properties 2 Payment and shipping configuration 6 payment\_DIBS.php 7 .. _Introduction: Introduction ------------ .. _Configuration: Configuration ------------- .. _Files: Files: ^^^^^^ .. ### BEGIN~OF~TABLE ### .. _productsLib-inc: productsLib.inc """"""""""""""" .. container:: table-row File productsLib.inc Description Main class used to display the shopping basket. Call it from a USER cObject with 'userFunc = user\_products->main\_products' .. _products-mail-inc: products\_mail.inc """""""""""""""""" .. container:: table-row File products\_mail.inc Description Class for sending HTML-email order confirmations .. _products-comp-calcScript-inc: products\_comp\_calcScript.inc """""""""""""""""""""""""""""" .. container:: table-row File products\_comp\_calcScript.inc Description Example 'calculationScript' .. _products-template-en-tmpl: products\_template\_en.tmpl """"""""""""""""""""""""""" .. container:: table-row File products\_template\_en.tmpl products\_template\_pl.tmpl products\_template\_htmlmail.tmpl Description Example .css driven templates in english. Example .css driven templates in polish. '..\_htmlmail.tmpl' is a HTML-wrap for the HTML-emails sent. .. _products-template-css: products\_template.css """""""""""""""""""""" .. container:: table-row File products\_template.css Description Example .css stylesheet for products template .. _payment-DIBS-php: payment\_DIBS.php """"""""""""""""" .. container:: table-row File payment\_DIBS.php Description Script for interfacing with DIBS (Danish Internet Payment System) in Denmark. You can reach them at http://www.architrade.com/uk/. .. _payment-DIBS-template-tmpl: payment\_DIBS\_template.tmpl """""""""""""""""""""""""""" .. container:: table-row File payment\_DIBS\_template.tmpl Description Template file for DIBS payment. .. _payment-ALLPAY-php: payment\_ALLPAY.php """"""""""""""""""" .. container:: table-row File payment\_ALLPAY.php Description Script for interfacing with AllPay.pl (Polish Internet Payment System) in Poland. You can reach them at http://www.allpay.pl. .. _payment-ALLPAY-template-en-tmpl: payment\_ALLPAY\_template\_en.tmpl """""""""""""""""""""""""""""""""" .. container:: table-row File payment\_ALLPAY\_template\_en.tmpl Description Template file for AllPay.pl payment (english) .. _payment-ALLPAY-template-pl-tmpl: payment\_ALLPAY\_template\_pl.tmpl """""""""""""""""""""""""""""""""" .. container:: table-row File payment\_ALLPAY\_template\_pl.tmpl Description Template file for AllPay.pl payment (polish) .. ###### END~OF~TABLE ###### .. _Description: Description ^^^^^^^^^^^ Built-in shopping basket and products display within Typo3. Has a clearing interface which lets you write your own implementation with existing payment-gateways. Currently there's an implementation with DIBS in Denmark, found at `www.architrade.dk `_ . Currently there's an implementation with AllPay.pl in Poland, found at `www.miklobit.com <../../TheProject/doc/www.miklobit.com>`_ . There's possible to define alternative language records for products ( title,note,www ) and for categories ( title, note ). The multicurrency function require mkl\_currxrate extension to be configured. All currency pairs has to be defined as mkl\_currxrate records at root level. The mkl\_products extension **must** be used as tt\_products ! .. _generated: ((generated)) """"""""""""" .. _Example: Example: ~~~~~~~~ (See static\_template 'plugin.tt\_products' for a working configuration) .. _Static-template: Static template ^^^^^^^^^^^^^^^ plugin.tt\_products .. _productsLib-inc-properties: productsLib.inc properties ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _templateFile: templateFile """""""""""" .. container:: table-row Property templateFile Data type resource Description The template-file. See example in 'media/scripts/products\_template.tmpl' Default .. _pid-list: pid\_list """"""""" .. container:: table-row Property pid\_list Data type string /stdWrap Description The pid's from where to fetch categories, forums and so on. Default is the current page. Accepts multiple pid's commaseparated! Default .. _code: code """" .. container:: table-row Property code Data type string /stdWrap Description Code to define, what the script does. Case sensitive: TRACKING BASKET, PAYMENT, FINALIZE, INFO SEARCH, SINGLE, LIST Default .. _defaultCode: defaultCode """"""""""" .. container:: table-row Property defaultCode Data type string Description The default code (see above) if the value is empty. By default it's not set and a help screen will appear **Example:** :: plugin.tt_products.defaultCode = LIST Default .. _recursive: recursive """"""""" .. container:: table-row Property recursive Data type int /stdWrap Description Number of recursive levels to select tt\_products from in lists. Default .. _altMainMarkers: altMainMarkers """""""""""""" .. container:: table-row Property altMainMarkers Data type *(array of strings)* Description Lets you specify alternative subpart markers for the various main template designs in the shopping basket system. This is the list of main subparts you can override: **Properties:** :: TRACKING_WRONG_NUMBER TRACKING_ENTER_NUMBER BASKET_REQUIRED_INFO_MISSING BASKET_TEMP ITEM_SINGLE_DISPLAY_RECORDINSERT ITEM_SINGLE_DISPLAY ITEM_SEARCH ITEM_LIST_TEMPLATE ITEM_SEARCH_EMPTY BASKET_TEMPLATE BASKET_INFO_TEMPLATE BASKET_PAYMENT_TEMPLATE BASKET_ORDERCONFIRMATION_TEMPLATE EMAIL_PLAINTEXT_TEMPLATE /+ stdWrap **Example:** This example changes the main subpart marker for the regular basket display from the default ###BASKET\_TEMPLATE### to the custom supplied design ###BASKET\_DESIGN2### (found in the same template HTML-file) :: altMainMarkers.BASKET_TEMPLATE = BASKET_DESIGN2 altMainMarkers.BASKET_TEMPLATE.wrap = ### | ### Default .. _stdSearchFieldExt: stdSearchFieldExt """"""""""""""""" .. container:: table-row Property stdSearchFieldExt Data type *list of fields* Description Additional search fields Default internal list is title,note,itemnumber. Any fields you specify is added to these defaults. Default .. _limit: limit """"" .. container:: table-row Property limit Data type int Description Max items displayed. The maximum number of items displayed on one page. Default .. _image: image """"" .. container:: table-row Property image Data type IMAGE cObject Description The image configuration in single display Default .. _listImage: listImage """"""""" .. container:: table-row Property listImage Data type IMAGE cObject Description The image configuration in list display Default .. _basketImage: basketImage """"""""""" .. container:: table-row Property basketImage Data type IMAGE cObject Description The image configuration in basket display Default .. _noImageAvailable: noImageAvailable """""""""""""""" .. container:: table-row Property noImageAvailable Data type resource Description The image file displayed if no image was attached to a product. This image is processed by the IMAGE cObject which is active in the actual display of that image. That is, one of the above IMAGE cObjects. Default .. _datasheetIcon: datasheetIcon """"""""""""" .. container:: table-row Property datasheetIcon Data type IMAGE cObject Description The image for datasheet icon file Default Pdf icon .. _displayListCatHeader: displayListCatHeader """""""""""""""""""" .. container:: table-row Property displayListCatHeader Data type boolean Description Display Category Header in list If this option is set, the category headers (page titles) will automatically be displayed in the product lists. This is not always convenient because you might have chosen a header-title for the "list" content element. Default .. _displayBasketCatHeader: displayBasketCatHeader """""""""""""""""""""" .. container:: table-row Property displayBasketCatHeader Data type boolean Description Display Category Header in basket. If this option is set, the category headers (page titles) will automatically be displayed in the basket lists. Default .. _itemMarkerArrayFunc: itemMarkerArrayFunc """"""""""""""""""" .. container:: table-row Property itemMarkerArrayFunc Data type function-name Description Every time a product is display be it in the basket, list of single, the method getItemMarkerArray() in user\_products is called. This function fills in and returns an array, socalled markerArray(), with key/values for template substitution. If you enter a valid function name here (see datatype 'function-name' for details!) that array will be passed to that function as the second parameter. The first parameter will be the TypoScript properties to itemMarkerArrayFunc. **Parent PHP-Object reference:** .parentObj property is :underline:`hardcoded` to be a reference to the calling user\_products object (PHP). **Example:** (provided that a function or class is included!) :: itemMarkerArrayFunc = user_addFieldsMarkerArr itemMarkerArrayFunc.simpleOption = 1 Default .. _PIDitemDisplay: PIDitemDisplay """""""""""""" .. container:: table-row Property PIDitemDisplay Data type int+ Description PID for single item display. If you want a certain page to be used for display of item details, please enter the PID (page-uid) here. Default .. _PIDsearch: PIDsearch """"""""" .. container:: table-row Property PIDsearch Data type int+ Description PID for search page. If you want all product searches to go to a specific page, enter the PID it here! NOTE: If you set this PID, all searchqueries will (must) be handled with a list content element with the code "search" on that page. Default .. _PIDbasket: PIDbasket """"""""" .. container:: table-row Property PIDbasket Data type int+ Description PID for basket page. If you want every change in the number of items anywhere to go to a specific page (eg. the shopping basket page), enter the PID here. Default .. _PIDstoreRoot: PIDstoreRoot """""""""""" .. container:: table-row Property PIDstoreRoot Data type int+ Description PID for store root. This is the PID of the rootPage of the store. If not set the store will operate over all pages from the root of the site. But if the site has many pages, performance may improve. Default .. _PID-sys-products-orders: PID\_sys\_products\_orders """""""""""""""""""""""""" .. container:: table-row Property PID\_sys\_products\_orders Data type int+ Description PID for the sys\_products\_orders records. By default they will get the pid of the payment (finalize) page. Default .. _PIDinfo: PIDinfo """"""" .. container:: table-row Property PIDinfo Data type int+ Description PID for the info page where name and address is entered. Default .. _PIDfinalize: PIDfinalize """"""""""" .. container:: table-row Property PIDfinalize Data type int+ Description PID for the confirmation page where the user confirms right before payment. Default .. _PIDthanks: PIDthanks """"""""" .. container:: table-row Property PIDthanks Data type int+ Description PID for the thanks page. Default .. _advanceOrderNumberWithInteger: advanceOrderNumberWithInteger """"""""""""""""""""""""""""" .. container:: table-row Property advanceOrderNumberWithInteger Data type int+ , int+ Description If this value is set, then each time a new order is created the order- number counter will be incremented with a random number between [first-integer] and [second integer]. **Example** :: 1,10 (This will increment the counter randomly between 1 and 10) 5,5 (This will increment the counter with 5 each time) Default .. _parseFunc: parseFunc """"""""" .. container:: table-row Property parseFunc Data type ->parseFunc Description The product details are parsed by these properties. Default .. _categoryHeader: categoryHeader """""""""""""" .. container:: table-row Property categoryHeader Data type cObject Description Generates the category header. **Example:** :: categoryHeader = TEXT categoryHeader.current = 1 Default .. _TAXpercentage: TAXpercentage """"""""""""" .. container:: table-row Property TAXpercentage Data type double Description Sales TAX/VAT percentage. Double value (!) (means, "use . as decimal point") **Example:** :: # Danish sales TAX is 25%: TAXpercentage = 25.00 Default .. _TAXincluded: TAXincluded """"""""""" .. container:: table-row Property TAXincluded Data type boolean Description Set this, if TAX *is* included in the database prices! ( ... and of course: Clear this, if TAX *is not* included in the database prices and should be added in the display of items) All processing will take this flag into account and calculate prices accordingly. Default .. _TAXeu: TAXeu """"" .. container:: table-row Property TAXeu Data type boolean Description If set , VAT is excluded from payment in two cases: 1. Seller and buyer country are both within EU and buyer is company with valid VAT registration number. 2. Seller is within EU , while buyer is located outside EU. Default .. _priceDec: priceDec """""""" .. container:: table-row Property priceDec Data type int Description Price decimals Default .. _priceDecPoint: priceDecPoint """"""""""""" .. container:: table-row Property priceDecPoint Data type string Description Price decimal point Default . .. _priceThousandPoint: priceThousandPoint """""""""""""""""" .. container:: table-row Property priceThousandPoint Data type string Description Price Thousand point Enter the thousand separator, if any. Default .. _currencySymbol: currencySymbol """""""""""""" .. container:: table-row Property currencySymbol Data type string Description Currency symbol. Used in shop administration. **Example:** :: DKR USD $ Default .. _lockLoginUserInfo: lockLoginUserInfo """"""""""""""""" .. container:: table-row Property lockLoginUserInfo Data type boolean Description If set and a user is logged in, the address info of that fe\_user is 'hardcoded' as billing address of the user. Default .. _requiredInfoFields: requiredInfoFields """""""""""""""""" .. container:: table-row Property requiredInfoFields Data type *list of string* Description List of the fields which are required in the address information Default .. _orderNumberPrefix: orderNumberPrefix """"""""""""""""" .. container:: table-row Property orderNumberPrefix Data type string Description Prefix to the order numbers. Dont use spaces or special chars. Max 10 chars. Default .. _orderEmail-from: orderEmail\_from """""""""""""""" .. container:: table-row Property orderEmail\_from Data type string Description From email address for the confirmation email to customer Default .. _orderEmail-fromName: orderEmail\_fromName """""""""""""""""""" .. container:: table-row Property orderEmail\_fromName Data type string Description From name for the confirmation email to customer. Default .. _orderEmail-to: orderEmail\_to """""""""""""" .. container:: table-row Property orderEmail\_to Data type *list of email-addresses* Description Comma list of recipients of the order email. Shop and administrator/supervisor email addresses go here! Default .. _orderEmail-htmlmail: orderEmail\_htmlmail """""""""""""""""""" .. container:: table-row Property orderEmail\_htmlmail Data type boolean Description If set, the order confirmation email is sent as HTML Default .. _email-notify-default: email\_notify\_default """""""""""""""""""""" .. container:: table-row Property email\_notify\_default Data type boolean Description If email-notification for the customer is enabled by default (he can change it himself in the tracking module later) Default .. _statusCodes: statusCodes """"""""""" .. container:: table-row Property statusCodes Data type *Array of integers* Description Status codes used in the tracking module. Numbers above 100 removes the order from the tracklist. Number zero is the status of a non-finalized order (and non-finalized orders in the database may by time be regarded as garbage...) Numbers of 50-59 is available for the customer to choose from. Number 1 is reserved to be selected when an order goes from zero to 1 because it's confirmed. Number 1 cannot be selected by shop admin. **Example:** :: statusCodes { 1 = Order submitted by user 2 = Order is received and accepted by store 10 = Shop is awaiting goods from third-party 11 = Shop is awaiting customer payment 12 = Shop is awaiting material from customer 20 = Goods shipped to customer 30 = Other message from store 50 = Customer request for cancelling 51 = Message from customer to shop 100 = Order shipped and closed 101 = Order closed 200 = Ordre cancelled } Default .. _update-code: update\_code """""""""""" .. container:: table-row Property update\_code Data type string Description The 'password' used by the administrator of the shop to go into the tracking system in the front end. The password form field will appear if a BE\_USER is logged in, but this password is still needed. Default .. _statusDate-stdWrap: statusDate\_stdWrap """"""""""""""""""" .. container:: table-row Property statusDate\_stdWrap Data type ->stdWrap Description stdWrap for status date **Example:** :: %e-%m-%y %H:%M Default .. _orderDate-stdWrap: orderDate\_stdWrap """""""""""""""""" .. container:: table-row Property orderDate\_stdWrap Data type ->stdWrap Description stdWrap for the order date **Example:** :: %e-%m-%y Default .. _displayCurrentRecord: displayCurrentRecord """""""""""""""""""" .. container:: table-row Property displayCurrentRecord Data type boolean Description If set, certain settings are manipulated in order to let the script render a single item - the $cObj->data. If this setting is set, the subpart marked ###ITEM\_SINGLE\_DISPLAY\_RECORDINSERT### will be used instead of the regular subpart ###ITEM\_SINGLE\_DISPLAY### if it's found. Default .. _externalProcessing: externalProcessing """""""""""""""""" .. container:: table-row Property externalProcessing Data type cObject Description This cObject may be used to call a function which manipulates the shopping basket. This manipulation could be based on settings in an external order system. The output is included in the top of the order (HTML) on the basket-page. This cObject is executed each time the main\_products method of the user\_products class in productsLib is called and it's executed before any of the main processing. See the class for details. Default .. _externalFinalizing: externalFinalizing """""""""""""""""" .. container:: table-row Property externalFinalizing Data type cObject Description This cObject may be used to call a function which clears settings in an external order system. This is a sister to the above function and they should probably be used in conjunction somehow. This function is called immediately after the finalize-function has been called. For instance this function would be suitable for clearing any external basket facilitated by the .externalProcessing cObject **Note:** The output is NOT included anywhere. Default .. _wrap1: wrap1 """"" .. container:: table-row Property wrap1 Data type -> stdWrap Description Global Wrap 1. This will be splitted into the markers ###GW1B### and ###GW1E###. Don't change the input value by the settings, only wrap it in something. **Example:** :: wrap1.wrap = | Default .. _wrap2: wrap2 """"" .. container:: table-row Property wrap2 Data type -> stdWrap Description Global Wrap 2 (see above) Default .. _color1: color1 """""" .. container:: table-row Property color1 Data type string /stdWrap Description Value for ###GC1### marker (Global color 1) Default .. _color2: color2 """""" .. container:: table-row Property color2 Data type string /stdWrap Description Value for ###GC2### marker (Global color 2) Default .. _color3: color3 """""" .. container:: table-row Property color3 Data type string /stdWrap Description Value for ###GC3### marker (Global color 3) Default .. _payment-shipping: payment / shipping """""""""""""""""" .. container:: table-row Property payment / shipping Data type (see below) Description Configuration of payment and shipping methods, their values and costs and additional calculation scripts and payment gateways. See description below! Default .. ###### END~OF~TABLE ###### [tsref:(script).productsLib] .. _Payment-and-shipping-configuration: Payment and shipping configuration ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Payment and shipping are very similar in configuration and therefore shared the same property list with special notes if something is for the one type only. The configuration of payment and shipping is in short a question of defining the items to chose from on the basket page. That is, a choice of one out of many transportation methods and one out of many payment methods. Therefore you can for instance select either radio-button representation or selector box. The number of the selected payment method or shipping method is reflected in the html-template certain places and you may also want special PHP scripts executed based on the settings. That's all allowed. .. ### BEGIN~OF~TABLE ### .. _radio: radio """"" .. container:: table-row Property radio Data type boolean Description If set, you get radio button layout. If not, selector-box. Default 0 .. _template: template """""""" .. container:: table-row Property template Data type string Description **(Radio layout only)** If .radio is true, this string is the 'template' for the radio items. **Default is (in one line):** :: ###IMAGE### ###TITLE###
Default .. _wrap: wrap """" .. container:: table-row Property wrap Data type Description **(Select layout only)** If .radio is false, this string wraps the