This page is still a beta!

1.6. Configuration

FAQ

  1. If you do not use the Constant Editor to configure the extension, please note the form of the constants assignments in the constants section of your TS template:

    plugin.tt_products {     property = value }

Files

File:

Description:

class.tx_ttproducts.php

Main class used to display the product list or the shopping basket.

Call it from a USER cObject with 'userFunc = user_products->main_products'

products_comp_calcScript.inc

Example 'calculationScript'

products_template.tmpl

products_template_htmlmail.tmpl

Example templates in English.

'.._htmlmail.tmpl' is a HTML-wrap for the HTML-emails sent.

products_template_dk.tmpl

Example template in Danish

example_template_bill_de.tmpl

bananaguard.de template with examples for bill and delivery sheet in German

products_template_fi.tmpl

Example template in Finnish

products_template_fr.tmpl

Example template in French

products_template_se.tmpl

Example template in Swedish

product_detail.tmplproduct_proefpakketten.tmplshop-a-box.tmplproducten.tmpl

Example templates for gift certificates, creditpoints and voucher system in Dutch

products_css_en.html

CSS styled template. Use this if you need a barrier-free shop.

'handleScripts' for interfacing with external payment gateways

 

payment_DIBS.php

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

Template file for DIBS payment.

[tsref:(cObject).TEST]

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 .

Reference

Property:

Data type:

Description:

Default:

templateFileConstants:file.templateFile

resource

The template-file.

See example in 'tt_products/template/products_template.tmpl'

You can also specify a CODE.

(siehe display mode)

Example:

plugin.tt_products.templateFile = EXT:tt_products/template/example_template_bill_de.tmpl

plugin.tt_products.templateFile.LIST = EXT:tt_products/template/products_template_dk.tmpl

pid_list

string /stdWrap

The pids from where to fetch categories, products and so on. Default is the current page. Accepts multiple pid's separated by comma.

defaultCode

string

The default code (see below) if the value is empty. By default it's not set and a help screen will appear. You should not set anything here.

Example:

plugin.tt_products.defaultCode = HELP

code

string /stdWrap

see chapter 'display mode'

HELP

defaultArticleID

int+

The default article uid number for the single display is used when the link to the script did not contain a 'tx_ttproducts_pi1[article]' parameter.

defaultProductID

int+

The default product uid number for the single display is used when the link to the scnotript did not contain a 'tx_ttproducts_pi1[product]' parameter.

Set this default value when you get an error message like: “GET/POST var 'tx_ttproducts_pi1[product]' was missing.”

defaultCategoryID

int+

The default category uid number for the list display is used when the link to the script did not contain a 'tx_ttproducts_pi1[cat]' parameter. Use this if you want only products of this category displayed in the list view as a default.

defaultDAMCategoryID

int+

See defaultCategoryID, but for DAM categories and the 'tx_ttproducts_pi1[damcat]' parameter.

rootCategoryID

int+

The upper most category ID from where you want to start to list categories.

rootDAMCategoryID

int+

The upper most DAM category ID from where you want to start to list DAM categories.

rootPageID

int+

The upper most page ID from where you want to start to list them as categories.

recursive

int+

Number of recursive sublevels of pids to select tt_products from in lists.

99

domain

string

The url of the shop. If not set, it will be detected automatically. Will replace ###DOMAIN### markers.

altMainMarkers

(array of strings)

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_LIST_GIFTS_TEMPLATE

ITEM_SEARCH_EMPTY

BASKET_TEMPLATE

BASKET_INFO_TEMPLATE

BASKET_PAYMENT_TEMPLATE

BASKET_ORDERCONFIRMATION_TEMPLATE

EMAIL_PLAINTEXT_TEMPLATE

BILL_TEMPLATE

DELIVERY_TEMPLATE

/+ stdWrap

Example:

altMainMarkers.BASKET_TEMPLATE =  BASKET_DESIGN2

altMainMarkers.BASKET_TEMPLATE.wrap = ### | ###

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)

stdSearchFieldExt

list of fields

Search fields

Default internal list is title,subtitle,note. You can specify your default fields here.

limit

int+

Max items displayed. The maximum number of items displayed on one page.

50

limitImage

int+

Max image items displayed. The maximum number of images for one item displayed on the list view.

1

limitImageSingle

int+

The maximum number of images for one item displayed on the single view.

1

usePageContentImage

boolean

Deprecated. See Article/Product configuration

Use this instead:

plugin.tt_products.conf.tt_products.ALL.fetchImage {

    type = foreigntable

    table = tt_content

}

separateImage

boolean

Normally all images are displayed together. With separateImage=on you can use a ###PRODUCT_IMAGE3### for each image number (starting with 1) separatly.

image

IMAGE cObject

The image configuration in single display

listImage

IMAGE cObject

The image configuration in list display

listImage >listImage {  altImgResource.import = uploads/media/  altImgResource.import.field = media  altImgResource.import.listNum = 0

  altText.data = field:title}

That way, attached images are not copied to and displayed from

/typo3temp/ (which gives trouble with transparant backgrounds) but directly linked from /uploads/pics/.

The line with altText leads to the drawing of an alternative text.

listImageHasChilds

IMAGE cObject

DAM only:

The image configuration in list display if there is a filter for a category on the page and this category has childs.

listImage >listImage {  altImgResource.import = uploads/media/  altImgResource.import.field = media  altImgResource.import.listNum = 0

  altText.data = field:title}

see listImage

basketImage

IMAGE cObject

The image configuration in basket display

datasheetIcon

IMAGE cObject

The image icon for the datasheet. Replaces ###ICON_DATASHEET###

basketPic

string

URL link to the basket image

clickIntoBasket

boolean

If set you will be directed into the basket page after putting a product into the basket. This only works if PIDbasket has been set.

clickIntoSubmenu

boolean

If set, the submenues in the LISTCAT category list will only be listed for the current category.

basketMaxQuantity

int+ / string

The maximum integer value for the quantity of an item in the basket.'inStock': Only the number of items which are currently in stock can be put into the basket.

100000

quantityIsFloat

boolean

If set the basket count can be a float value.

noImageAvailable

resource

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.

displayListCatHeader

boolean

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.

1

displayBasketCatHeader

boolean

Display Category Header in basket.

If this option is set, the category headers (page titles) will automatically be displayed in the basket lists.

0

displayCatListType

string

Define the HTML main tag for the display of the categories in the category list view.possible values:

  1. ul

  2. null

ul

displayBasketColumns

int+

Deprecated. see table configuration: displayColumns

Number of columns for the LIST, SEARCH listing of items in a table. You have to adapt your template using special template markers. The ITEM_SINGLE_PRE_HTML and ITEM_SINGLE_POST_HTML must surround your <TD>-</TD> tags, so the table will be created correctly.

Example:

<!-- ###ITEM_SINGLE### begin--> ###ITEM_SINGLE_PRE_HTML### <TD height="150" bgcolor="###GC1###" valign="bottom" align="center"> <!--###LINK_ITEM###--> ###GW1B###<b>###PRODUCT_TITLE###</b>###GW1E### <!--###LINK_ITEM###--> <br> ###PRODUCT_IMAGE### <br> ###GW1B### item count: ###GW1E### <INPUT size="3" maxlength="4" type="text" name="###FIELD_NAME###" value="###FIELD_QTY###"> <p> </TD> ###ITEM_SINGLE_POST_HTML### <!-- ###ITEM_SINGLE### end -->

CSS

see below

Cascading Stylesheets settings

conf

see below

configurations of the tables

NoSingleViewOnList

boolean

Usually you get the link to the single item view on the display page of the LIST code. If you however want to create your own pages for single view with SINGLE code you must set this to 1.

itemMarkerArrayFunc

function-name

Every time a product is displayed be it in the basket, list or single view, the method getItemMarkerArray() in tx_ttproducts_marker is called. This function fills in and returns an array, so called 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 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

PIDitemDisplay

int+/Array of integers

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. If you set the type to sql, you can use conditions using several lines. The where string can contain the AND condition. The pid for the first fulfilled condition will be returned.

PIDitemDisplay {

 10.type = sql 10.where = color=red 10.pid = 142 20.type = sql 20.where = color=white 20.pid = 143 }

If you set the type to pid then the pid of the record will be used.

PIDitemDisplay {

 10.type = pid

}

PIDlistDisplay

int+/Array of integers

PID for the item list display

Similar to PIDitemDisplay, however the category table is used here.

PIDsearch

int+

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 display mode "Products: search" on that page.

PIDbasket

int+

PID for the basket page.

If you want ever change the number of items anywhere to go to a specific page (eg. the shopping basket page), enter the PID here.

PIDstoreRoot

int+

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.

You should better set pid_list instead of it.

PID_sys_products_orders

int+

PID for the sys_products_orders records. By default they will get the pid of the payment (finalize) page.

PIDGiftsTable

int+

PID for the tt_products_gifts table. The gift orders are stored here.

PIDinfo

int+

PID for the info page where name and address is entered.

PIDfinalize

int+

PID for the finalization page afther the user has confirmed the order data. The order will get stored here.

PIDthanks

int+

PID for the thanks page. BASKET_ORDERTHANKS_TEMPLATE will be used. You must not set PIDfinalize if you use this.

PIDtracking

int+

PID for the order tracking

PIDbilling

int+

PID for the generation of the bill

PIDdelivery

int+

PID for the generation of the delivery sheet

PIDmemo

int+

The ID of the memo page

PIDagb

int+

The PID of a page with the general trading conditions (“AGB” in germany)

Only if this page id is set the AGB check will  be active.

0

PIDuserFolder

int+

The sysfolder, where the new users should be stored

116

pidsRelatedProducts

int+

Allowed pages for related products.

paymentActivity

string

When the payment with a payment script shall be executed.Possible values:  payment, finalize

finalize

advanceOrderNumberWithInteger

int+

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] to cheat a little.

Example:

1,10   (This will increment the counter randomly between 1 and 10)

5,5    (This will increment the counter with 5 each time)

alwaysAdvanceOrderNumber

boolean

If set then the order number will always get increased and the empty order numbers are not reused. You have to set this if you use a payment script to pay via a payment system which does not accept duplicate order numbers.

alwaysUpdateOrderAmount

boolean

If set then the entered order amount will always be updated and not increased by the entered number.

1

parseFunc

->parseFunc

not used with

'CSS styled content'

If the extension 'CSS styled content' has been installed, you have to make your settings in  lib.parseFunc_RTE and not here.

The product details are parsed by these properties. So if e.g. you want ot allow HTML-tags to create a table in the Note field you have to set the parseFunc.allowTags or use the denyTags.To make RTE working with HTML you have to set the following into the root page template. Example:

keepNonMatchedTags = 1 RTE.default.proc.preserveTables = 1

Example:

parseFunc.allowTags = table,tr,td,b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blockquote,strike,span,h1,h2,h3,h4,h5,h6
parseFunc.denyTags = * 

styles.content.parseFunc

categoryHeader

cObject

Generates the category header.

Example:

categoryHeader = TEXT

categoryHeader.current = 1

TAXpercentage

double

Sales TAX/VAT percentage.

Double value (!) (means, "use . as decimal point")

Example:

# Danish sales TAX is 25%:

TAXpercentage = 25.00

TAXincluded

boolean

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.

1

TAXmode

int+

tax mode

1: The net sums are added first. The tax is added on the final total net sum.

2: The gross price is calculated for every product. The total sum is calculated on the single gross prices.

1

priceDec

int+

Price decimals

priceDecPoint

string

Price decimal point

priceThousandPoint

string

Price Thousand point

Enter the thousand separator, if any.

priceNoReseller

int+

Price number for reseller, which can only be 2 at the moment. The price2 will however only be taken when its value is greater than 0. Here is the way to get the price2 for a special user group:

Example:

[usergroup = 1]

priceNoReseller = 2

[global]

...

currencySymbol

string

Currency symbol. Used in shop administration.

Example:

EUR

DKR

USD

$

lockLoginUserInfo

boolean

If set and a user is logged in, the address info of that fe_user gets filled in as billing address of the user. It is not possible to change this data.

editLockedLoginInfo

boolean

If set and lockLoginUserInfo is set, then the filled in data is still editable for the order. You have to set the input HTML tags for this.

loginUserInfoAddress

boolean

If lockLoginUserInfo is set, this switch makes that the address field is filled in from address, country, zip and city of the fe_user

requiredInfoFields

list of string

List of the fields which are required in the address information This example gives you all possibilities.

Example:

requiredInfoFields = name,address,telephone,fax,email,company,city,zip,state,country

orderBy

string

Deprecated. See Article/Product configuration

Use this instead:

plugin.tt_products.conf.tt_products.ALL.orderBy = title

orderByCategoryTitle

boolean

Deprecated. Use this instead:

plugin.tt_products.conf.tt_products_cat.ALL.orderBy = title

orderByItemNumberSg

boolean

If the single item display should be sorted by ItemNumber instead of uid;

used for ###LINK_NEXT_SINGLE### and ###LINK_PREV_SINGLE###

orderNumberPrefix

string

Prefix to the order numbers. Max 10 chars. If this string starts with '%' then the rest will be interpreted as a PHP date format.

orderEmail_from

string

From email address for the confirmation email to customer

orderEmail_fromName

string

From name for the confirmation email to customer.

orderEmail_to

list of email-addresses

Comma separated list of recipients of the order email. Shop and administrator/supervisor email addresses go here!

orderEmail_toDelivery

boolean

If set, the email notification will be sent to the delivery email address and not to the billing email address.

orderEmail_subject

string

Contents of the subject line if the first line in  ###EMAIL_PLAINTEXT_TEMPLATE### is empty.

orderEmail_htmlmail

boolean / string

If set, the order confirmation email is sent as HTMLIf orderEmail_htmlmail.removeImagesWithPrefix is set, then the images and their HTML tags will not be sent in an email.

email_notify_default

boolean

If email-notification to the delivery email address of the customer is enabled by default for tracking (he can change it himself in the tracking module later)

statusCodes

Array of integers

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.These will be written into ###STATUS_OPTIONS###  markers.

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

    13 = Order has been payed

    20 = Goods shipped to customer

    21 = Gift certificates shipped to customer

    30 = Other message from store

    50 = Customer request for cancelling

    51 = Message from customer to shop

    60 = Send gift certificate message to receiver

    100 = Order shipped and closed

    101 = Order closed

    200 = Order cancelled

}

update_code

string

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.

password

statusDate_stdWrap

->stdWrap

stdWrap for status date

Example:

statusDate_stdWrap.strftime = %d-%m-%Y %H:%M

orderDate_stdWrap

->stdWrap

stdWrap for the order date

Example:

orderDate_stdWrap.strftime = %d-%m-%Y

displayCurrentRecord

boolean

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 is found.

externalProcessing

cObject

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.

externalProcessing_final

cObject

cObject for the final order confirmation template

externalFinalizing

cObject

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.

wrap1

-> stdWrap

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 = <B> |</B>

wrap2

-> stdWrap

Global Wrap 2 (see above) markers ###GW2B### and ###GW2E###

selectColor

boolean

If true the color of a product is selectable in a select box.

1

selectColor2

boolean

If true the 2nd color of a product is selectable in a select box.

1

selectSize

boolean

If true the size of a product is selectable in a select box.

1

selectSize2

boolean

If true the 2nd size of a product is selectable in a select box.

1

selectDescription

boolean

If true the decription of a product is selectable in a select box.

1

selectGradings

boolean

If true the gradings of a product are selectable in a select box.

1

selectMaterial

boolean

If true the material of a product are selectable in a select box.

1

selectQuality

boolean

If true the quality of a product are selectable in a select box.

1

color1

string /stdWrap

Value for ###GC1### marker (Global color 1)

color2

string /stdWrap

Value for ###GC2### marker (Global color 2)

color3

string /stdWrap

Value for ###GC3### marker (Global color 3)

nl2brNote

boolean

If true the linefeeds in the note field are replaced by <br />.

1

useArticles

integer

  1. 0: If you do not want to use the articles table then this must remain 0.

  2. 1: If you want to use products in different variants and have special prices for them in the articles table, then you have to set this to 1. The instock of the articles table will be used instead of the products table.

  3. 2: Like 1 but you do not need to have corresponding fields for the variants between a product and its articles.

priceTagObj

IMAGE cObject

Image for the display of the price

usePriceTag

boolean

If true, the priceTagObj will be used. If false, the text will be displayed.

0

useStaticInfoCountry

boolean

If true the short fe_user static_info_country field will be used for country instead of the country field.

0

whereGift

string

This SQL where clause defines which products will be treated as gifts.

max_note_length

int+

In the list view: The item note will be cut after max_note_length characters, and three dots are added...

This can be dangerous if you use html in your product notes, because a tag could stay open and the following items look ugly

100

specialPreparation

string

This text will substitute your ###PRODUCT_SPECIAL_PREP### markers.

createUsers

Boolean

If you set this and PIDuserFolder, for each customer that is not logged in and his email address is not listed as user already, a new frontend user will be created.

An email with the username (his e-mail address) and the password will be sent to him (see ###EMAIL_NEWUSER_TEMPLATE###)

0

outputFolder

string

Folder where the bill and delivery sheets are created.

fileadmin/data

memberOfGroup

int+

The ID of the frontend user group, the new users should be member of

1

discountGroupName

string

Name of the group for discount pricecalculation

getDiscountPrice

boolean

If set the discount price will be used even for normal customers without having a frontend user in the discount group.

AGBtarget

Small

The target for the PIDagb link

_blank

AGBattachment

Resource

If this file exists, it will be attached to the order confirmation email to the customer. The shop administrator won't receive the agb attachment, but the CSV if you enable it

fileadmin/agb.pdf

GiftAttachment

Resource

If this file exists, it will be attached to the order gift email to the customer.

generateCSV

boolean

Generates a CSV from each order. This file will be saved on the server and sent to the shop administrator per email (with the order confirmation)

0

CSVdestination

../csvorders/

The directory on the server, where the CSV files should be saved. This directory should not be accessible over http, because everyone can read your customers and their orders.

So don't put this directory unter fileadmin, or rename it to something cryptical at least.

../csvorders/

CSVfields

string

Select which product data should be added to the CSV. By default these are all important fields except the note

(Long, long list)

CSVinOneLine

boolean

If you set this to 1, all additional information (shipping, payment, address data, delivecatry note) will be appended to the first ordered item. This is good if you want to import this files somewhere.

If you leave this at 0, the file will be formated for best view in programs like Excel.

0

CSVnotInEmail

boolean

If set no csv file will be appended to the email.

alwaysInStock

boolean

If set the stock will not get reduced if something has been bought.

1

showNotinStock

boolean

If set the items will be shown even if no product is in the stock.

notInStockMessage

string

See above. This will be shown if no items are in stock and showNotinStock is set.

Not in stock

warningInStockLimit

int+

Amount of items in stock at which when reached a warning message is sent.

inStockPieces

string

This is the unit for items inStock.

pieces

newItemDays

int+

In LISTNEWITEMS, the newly added items of the last n days will be showed

7

bulkilyWarning

string

Text for ###BULKILY_WARNING###  for bulky products

bulkilyAddition

int+

Factor to multiply with a product which is bulkily

bulkilyFeeTax

int+

Tax fee in percent for shipping of bulkily

javaScript

array of integers

Some JavaScript which will be included for ###JAVASCRIPT_10### markers.

Beispiel:

javaScript {

    10 = function addValues (a, b) { return a+b; }

    20 = function multiplyValues (a, b) { return a*b; }

}

payment / shipping

(see below)

Configuration of payment and shipping methods, their values and costs and additional calculation scripts and payment gateways.

See description below!

[tsref:(script).class.tx_ttproducts_pi1.php]

Display Modes (CODE)

Here comes a list of the possible display types of the plugin.

Code to define, what the script does. In the backend these entries are made using flexforms instead of the Codes (capital letters). Use the codefields ony in TypoScript setup.

Display Mode:

CODE:

Description:

Products: list

LIST

listing of the products

Products: list gifts

LISTGIFTS

listing of gifts

Products: list highlights

LISTHIGHLIGHTS

listing of the products marked as highlights

Products: list offers

LISTOFFERS

listing of the products marked as offers

Products: list new items

LISTNEWITEMS

listing of the new items entered to the sysfolder

Products: list DAM

LISTDAM

list DAM images or media files

Products: single view

SINGLE

single view of an article (LIST code can be

used also) or GET/POST var 'tt_products' can

be set.

Products: search

SEARCH

displays a search dialog for searching product

Currency: selector

CURRENCY

currency selector

Basket: content

BASKET

Displays the shopping basket.

The code 'BASKET' works in general but using the specific codes INFO, PAYMENT and FINALIZE, you can split out the function over

multiple pages

Basket: overview

OVERVIEW

a minimum basket containing only the number

of items

Basket: input customer data

INFO

enter address information

Basket: control and payment

PAYMENT

last check and payment gateway

Basket: finalize order

FINALIZE

finalize the order and send emails – thanks page for the order

Orders: tracking

TRACKING

to track the order state, bill and delivery

Orders: bill

BILL

creates a file containing the bill

Orders: delivery

DELIVERY

creates a file containing the delivery sheet

Orders: list

ORDER

display orders on per fe-user basis

General: memo

MEMO

memo of products for frontend users

General: help

HELP

information how to use tt_products

Categories: list

LISTCAT

listing of categories

Categories: select

SELECTCAT

categories inside of select boxes

Categories: DAM list

LISTDAMCAT

listing of DAM categories

Articles: list

LISTARTICLES

listing of articles

CSS configuration

The CSS id names can be set here. You have to provide a CSS file that will use these ids however.

You have to provide also the name of the table in the setup.

The last but one/two value will be the name of the view. It can be 'ALL', if it is valid for all views..

Views correspond to the code field:

SINGLE, LIST, BASKET

plugin.tt_products.CSS.tt_products.LIST.row.even = 35

Property:

Data type:

Description:

Default:

row

even: Cascading Stylesheets (CSS) even rows in the products display.

uneven

list

default: CSS for default entries in a list view.

current: CSS for the currently selected item a list view.

menu

string

CSS for the menu

itemSingleWrap

wrap

HTML part to replace the markers ###ITEM_SINGLE_PRE_HTML### and ###ITEM_SINGLE_POST_HTML### at single item level.

<div>|</div> or <td>|</td>

itemRowWrap

wrap

HTML part to replace the markers ###ITEM_SINGLE_PRE_HTML### and ###ITEM_SINGLE_POST_HTML### at item row level.

empty or <tr>|</tr>

Configuration of Articles, Products, Categories, Pages and Images

The last but one/two value will be the name of the view. It can be 'ALL', if it is valid for all views..

Views correspond to the code field:

SINGLE, LIST, BASKET

additional possible values are

EMAIL, PAYMENT

Example:

plugin.tt_products.conf.tt_products_articles.LIST.generatePath.base = fileadmin/images
plugin.tt_products.conf.tt_products.LIST.orderBy = sorting

Property:

Data type:

Description:

Default:

generatePath

array of string

path to the image folders where the images for generateImage are located.

Pairs of field names and the count of the first characters to be used to form the name of the image file.

type ... tablefields

fieldname ... name of the table field

Example:

ALL.generatePath {

    type = tablefields

    base = fileadmin/images

    field.itemnumber = 2

}

fileadmin/img

generateImage

array of string

Pairs of field names and the count of the first characters to be used to form the name of the image file.

type ... tablefields, foreigntable (for field of another table)

field.fieldname ... name of the table field

table ... use another table and its configuration to get the image

uid_local ... use the value of this local field of the current table

uid_foreign ... use this field of the foreign table to find a match

Example:

ALL.generateImage {

    type = tablefields

    field.itemnumber = 6

}

ALL.generateImage {

    type = foreigntable

    table = tt_products_articles

    uid_local = uid

    uid_foreign = pid

    field.itemnumber = 6

}

imageMarker

array of string

Defines how the marker for the image is composed. In this example image names like 30_P1_001.jpg can be used, where the second part P1 and the third part 001 form the marker. So the marker will be ###CATEGORY_IMAGE_P1_001###.

Example:

ALL.imageMarker {

    type = imagename

    parts = 2,3

}

orderBy

string

List of the fields by which the items will be ordered.

sorting

fetchImage

string

If set, the images for the table are taken from the images of another table

Example:

plugin.tt_products.conf.tt_products.ALL.fetchImage {

    type = foreigntable

    table = tt_content

}

language

array of string

The name of a language file with translations from the default language into another language.

type:

  1. csv ... The values are separated by ';' and newline characters

  2. noTranslation ... do not use the language overlay table

  3. field ... the translation is in fields

  4. table ... the translation overlay table

file: Path and name of the file

field: name of the field on left and new value on right side

notinst

Example:col

[globalVar = GP:L = 1]

language {

    type = csv

    file = fileadmin/data/EnglishCategories.csv

}

[GLOBAL]

Example:

language {

    type = field

    field.title = subtitle

}

image

IMAGE cObject

Image is copied into the others via TypoScript and can be used for several code fields.

Example:

###PRODUCT_IMAGE1:M### 
plugin.tt_products.conf.tt_products.ALL.image.m {
  wrap = |<br />
  file.maxW = 320
  file.maxH = 280
}

filter

array of string

Use only table records which apply to a filter on a field base.

type:

  1. regexp ... use a regular expression

field: name of the field on left and value on right side

Example:

filter {

    type = regexp

    field.title = [:alpha:]+[:blank:]+1[:blank:]+

}

Will filter all records of the table to use only those where the title has characters and a 1 on the last position.

urlparams

string

Comma separated list of tt_products URL parameters which must have a value. Otherwise no items will be displayed.

Normally no products shall be shown below a category list when no category has been selected yet. If you leave this empty, then all products will be listed in the list view when no category parameter is given and you have a category list view on the page.

displayColumns

string

Number of columns on the display

You have to adapt your template using special template markers. The ITEM_SINGLE_PRE_HTML and ITEM_SINGLE_POST_HTML must surround your <TD>-</TD> tags, so the table will be created correctly. The first number is the order in the category hierarchy.

Example:

displayColumns {

    1 = 3

}

Example:

<!-- ###ITEM_SINGLE### begin--> ###ITEM_SINGLE_PRE_HTML### <TD height="150" bgcolor="###GC1###" valign="bottom" align="center"> <!--###LINK_ITEM###--> ###GW1B###<b>###PRODUCT_TITLE###</b>###GW1E### <!--###LINK_ITEM###--> <br> ###PRODUCT_IMAGE### <br> ###GW1B### item count: ###GW1E### <INPUT size="3" maxlength="4" type="text" name="###FIELD_NAME###" value="###FIELD_QTY###"> <p> </TD> ###ITEM_SINGLE_POST_HTML### <!-- ###ITEM_SINGLE### end -->

Form configuration

Setup only. There are several forms which can be configured. Put the code after the form settings.

Example:

plugin.tt_products.form.SEARCH.name = ShopSearchForm

Property:

Data type:

Description:

Default:

name

name of the form. If empty the whole subpart will not be drawn.

depends on codefield

Basket configuration

You can configure the behaviour of the basket here.

Example:

plugin.tt_products.basket.minPrice {

    type = price

    collect = goodstotal

    value = 250

}

Property:

Data type:

Description:

Default:

minPrice

array of string

minimum price which the products must reach to get a permission to buy them. E.g. only products at a total price of at least 250 shall be accepted.

Example:

minPrice {

    type = price

    collect = goodstotal

    value = 250

}

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 choose 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.

Property:

Data type:

Description:

Default:

radio

boolean

If set, you get radio button layout. If not, selector-box.

0

template

string

(Radio layout only)

If .radio is true, this string is the 'template' for the radio items.

Default is (in one line):

<nobr>###IMAGE### <input type="radio" name="recs[tt_products]['.$key.']" onClick="submit()" value="###VALUE###"###CHECKED###> ###TITLE###</nobr><BR>

wrap

string

(Select layout only)

If .radio is false, this string wraps the <option> tags in a <select>-tag!

Default is (in one line):

'<select name="recs[tt_products]['.$key.']" onChange="submit()">|</select>'

TAXpercentage

double

TAX/VAT percentage.

Double value (!) (means, "use . as decimal point")

This substitutes priceNoTax. This can be different to the global tax with the same name.

Example:

# Danish payment TAX is 25%:

payment.TAXpercentage = 25.00

from global

TAXincluded

boolean

Set this, if TAX is included in the payment/shipping prices.

from global

Array of integers

Configuration, see below

Examples:

TAXpercentage = 12

10.title = Credit card

10.image.file = typo3/sysext/cms/tslib/media/logos/dankort.gif

10.price =

10.percentOfGoodstotal = 0

10.calculationScript = EXT:tt_products/pi1/products_comp_calcScript.inc

30.title = By mail

30.image.file = typo3/sysext/cms/tslib/media/logos/postdanmark.gif

30.price = 40

Configuration of payment / shipping items

   

title

string

Title of item, eg. “Master card” or “Ground mail”

The title will be cloned, if markers like  ###STATIC_COUNTRIES_CN_ISO_3###  are used together with where.static_countries.

image

IMAGE cObject

Logo image for the item

price

double orarray of integers

see below for additional parameters

Price of item, including or excluding VAT, depends on TAXincluded.

You use integers to specify the minimal number of items for which the price is valid. 6 items and more will cost 5.8 in this example.

Example:

30.price.type = count30.price.1 = 4

30.price.6 = 5.8

priceTax

double

Depricated (1st July 2008)

Price of item, including VAT

use price, TAXpercentage  and TAXincluded instead

priceNoTax

double

Depricated (1st July 2008)

Price of item, excluding VAT

Notice: you have to calculate the VAT amount here by yourself!

use price, TAXpercentage  and TAXincluded instead

replaceTAXpercentage

double

see TAXpercentageIf set, the general TAXpercentage will be overwritten by this value.

priceFactWeight

double

shipping ONLY:Price is calculated from weight of all products. Will be added to price.

The weight is mulitplied with this factor to increase the shipping price.

percentOfGoodstotal

double

Price of item, calculated from a percentage of the total amount before payment/shipping

percentOfTotalShipping

double

payment ONLY:

If set the payment costs are calculated in the percentage of the total product tax price inclusive the shipping tax price.

creditcards

string

payment ONLY:

Comma separated list of allowed uids for the creditcards.

See file localland_db.xml about the values. (sys_products_cards.cc_type.I)

0 ... American Express

1 ... Diners Club

2 ... Mastercard

3 ... Visa

accounts

boolean

payment ONLY:

If set the payment with booking from the entered bank account will be allowed.

calculationScript

resouce

PHP script which is included in a “blank” function and it should be written to manipulate amounts in the internal arrays.

This script could be used to calculate a special fee regarding a payment/shipping item.

For an example of application, see media/script/products_comp_calcScript.inc which shows you how to raise the final amount with 5.75% of it's own value as to compensate for fees to international credit card organisations.

Properties of the calculation script is passed to the function as $conf array.

handleScript

resource

PHP script which is included in a “blank” method called from products_basket() in user_products class when the order is finalized.

This function must take care of displaying templates during the payment process with a payment gateway as well as finalizing the order afterwards.

See pi/payment_DIBS.php for an example. A HTML-template file follows.

Properties of the handle script is passed to the function as $conf array. The content of the variable $content is returned as content.

handleLib

string

payment ONLY:

Name of the TYPO3 library to handle the Payment. Currently you can set only 'paymentlib' here to use Rober Lemke's Payment Library Extension.

Example:

30.handleLib = paymentlib

handleURL

string

If set, this handleURL is called instead of the THANKS-url (by PIDthanks) in order to let eg. a handleScript process the information if payment by credit card or so.

handleTarget

string

Alternative target for the form.

excludePayment

list of integers

shipping ONLY:

This is a list of payment method keys (their numbers) which are not available given a certain delivery form. For instance if people pick up goods in the store, you don't want them to transfer money or pay online but just order the goods. So you can exclude those payment methods.

Example:

...

  40.title = Pick up in store

  40.excludePayment = 10,40

}

replacePayment

list of integers

shipping ONLY:

This is a list of payment settings which will be overridden if this shipping method has been selected.

Example:

...

  40.title = China

  40.replacePayment.10.title = Payment with China

  40.replacePayment.10.price = 100

}

show

boolean

If set, the item is shown  in the list.

1

showLimit

double

If set, then this item will only get shown when there is at least this number  of products in the basket. 0 ... always show this item

0

type

string

Payment ONLY:

fe_users ... the payment can be configured via the fe_users table

visibleForGroupID

int+

Payment ONLY:

This payment method is only available, if a user is logged in and member of this frontend user group

addRequiredInfoFields

string

Payment ONLY:

Additional required fields in the INFO page, if this payment method is selected. Useful for credit card payment.

Configuration price Parameters for payment / shipping

   

type

string

Meaning of the number:count ... the products count

weight ... the calculated weight in Grammprice ... the total products price

WherePIDMinPrice

int+

shipping ONLY:Set a minimum price for shipping if there is an item in the basket which is from the sysfolder of this PID.

Where 155 is the PID and 7.5 is the minimum price taken for shipping costs when at least one product in the basket comes from the page with that PID.

Example:

plugin.tt_products.shipping { 10.title = Parcel 10.price.type = weight 10.price.WherePIDMinPrice.155 = 7.5 10.price.1 = 1.5 10.price.500 = 2.5 10.price.1000 =3.5 }

where.static_countries

string

shipping ONLY:Set a SQL WHERE condition to follow for the selected country in the static_countries table of the static_info_tables extension.

Example:

plugin.tt_products.shipping { 10.title = Parcel Germany 10.where.static_countries = cn_short_local == 'Deutschland'

 10.price = 5.9 20.title = Parcel EU 20.where.static_countries = cn_eu_member = 1 AND cn_short_local != 'Deutschland'

 20.price = 8.9 30.title = Outside EU 30.where.static_countries = cn_eu_member <> 1

 30.price = 15}

productsNoTax

int+

shipping ONLY:Set if the taxes are included in the price for all products.

noCostsAmount

double

When the total amount for the products reaches this value then no costs will be calculated.

Example:

plugin.tt_products.shipping { 10.title = Parcel 10.price.type = weight 10.price.noCostsAmount = 200 10.price.1 = 1.5 }

Pricecalc, discountprice and creditpoints configuration

The pricecalc gives you the possibility to build the price sum of products using a calculation table. The discount price will be used for all users who belong to the group set in discountGroupName.

Property:

Data type:

Description:

Default:

prod

two-edged list of integers

The left edge of integers correspond to lines belonging together, the meaning of the right edge depends on the settings for each line.

Pricecalc:

Special Prices for the products. Where 1 product costs 4.99, 2 products will cost 8.99.  With discount price this will form the price for one product, with pricecalc it is the price for all products together where 1 has cost 4.99 in the products folder. The discountprice overrides the pricecalc if possible, because this should be cheaper then. A price calculation from here will get replaced if price2 is used.

Example:

pricecalc {

  10.type = count

  10.field = price

  10.where =  10.prod.1 = 4.99

  10.prod.2 = 8.99

  10.prod.5 = 19.99

  20.type = count

  20.field = price

  20.where =  20.prod.1 = 6.99

  20.prod.2 = 13.98

  20.prod.5 = 29.99

}

Discountprice:

Here the single prices for products are calculated depending on the count of articles, if type=count.

The additive settings tells if all the products are counted together even from different lines.

Example:

discountprice {

  10.type = count

  10.field = price  10.additive = 1

  10.where =

  10.prod.1 = 4.99

  10.prod.100 = 2.49

  10.prod.1050 = 2.39

  20.type = count

  20.field = price  20.where =

  20.prod.1 = 6.99

  20.prod.100 = 2.59

  20.prod.1050 = 2.49

}

Creditpoins:

This tells you how many creditpoints someone will get if he buys articles in the shop. The right values are the percentage of the price of the ordered articles, if type=price.

Example:

creditpoints {

  pricefactor = 0.5

  10.type = price

  10.prod.1   = 0.02

  10.prod.101 = 0.04

  10.prod.501 = 0.06

}

Pricecalc:

Special Prices for the products. Where 1 product costs 4.99, 2 products will cost 8.99.  With discount price this will form the price for one product, with pricecalc it is the price for all products together where 1 has cost 4.99 in the products folder. The discountprice overrides the pricecalc if possible, because this should be cheaper then. A price calculation from here will get replaced if price2 is used.

Example:

pricecalc {

  10.type = count

  10.field = price

  10.where =  10.prod.1 = 4.99

  10.prod.2 = 8.99

  10.prod.5 = 19.99

  20.type = count

  20.field = price

  20.where =  20.prod.1 = 6.99

  20.prod.2 = 13.98

  20.prod.5 = 29.99

}

Discountprice:

Here the single prices for products are calculated depending on the count of articles, if type=count.

The additive settings tells if all the products are counted together even from different lines.

Example:

discountprice {

  10.type = count

  10.field = price  10.additive = 1

  10.where =

  10.prod.1 = 4.99

  10.prod.100 = 2.49

  10.prod.1050 = 2.39

  20.type = count

  20.field = price  20.where =

  20.prod.1 = 6.99

  20.prod.100 = 2.59

  20.prod.1050 = 2.49

}

Creditpoins:

This tells you how many creditpoints someone will get if he buys articles in the shop. The right values are the percentage of the price of the ordered articles, if type=price.

Example:

creditpoints {

  pricefactor = 0.5

  10.type = price

  10.prod.1   = 0.02

  10.prod.101 = 0.04

  10.prod.501 = 0.06

}

Discountprice:

Here the single prices for products are calculated depending on the count of articles, if type=count.

The additive settings tells if all the products are counted together even from different lines.

Example:

discountprice {

  10.type = count

  10.field = price  10.additive = 1

  10.where =

  10.prod.1 = 4.99

  10.prod.100 = 2.49

  10.prod.1050 = 2.39

  20.type = count

  20.field = price  20.where =

  20.prod.1 = 6.99

  20.prod.100 = 2.59

  20.prod.1050 = 2.49

}

Creditpoins:

This tells you how many creditpoints someone will get if he buys articles in the shop. The right values are the percentage of the price of the ordered articles, if type=price.

Example:

creditpoints {

  pricefactor = 0.5

  10.type = price

  10.prod.1   = 0.02

  10.prod.101 = 0.04

  10.prod.501 = 0.06

}

Creditpoins:

This tells you how many creditpoints someone will get if he buys articles in the shop. The right values are the percentage of the price of the ordered articles, if type=price.

Example:

creditpoints {

  pricefactor = 0.5

  10.type = price

  10.prod.1   = 0.02

  10.prod.101 = 0.04

  10.prod.501 = 0.06

}

0

additive

double

Only valid for discount price. If set all the products with any of these discount prices are counted  together to calculate which discount price will apply. If unset only the products of the same price are counted.

type

string

Meaning of the right edge integer which usually gets calculated:count ... the products count  (pricecalc and discountprice only)price  ... the price field is used (creditpoints only)

pricefactor

double

Used to calculate how much money someone will get for his creditpoints. 2 creditpoins will give 1 Euro or the currency of your choice.

Example:

creditpoints {

  pricefactor = 0.5

}

[tsref:(script).productsLib.payment/(script).productsLib.shipping]

payment_DIBS.php

Properties of the handleScript for DIBS interfacing (http://www.architrade.com/uk/):

Property:

Data type:

Description:

Default:

templateFile

resource

Template file for use with DIBSYou have to put the following line in the form of the tt_products template before the DIBS script will be called:

<input type="hidden" name="products_cmd" value="cardno">

soloe

boolean

If set, the script uses sub-template with marker ###DIBS_SOLOE_TEMPLATE### instead of the default which is ###DIBS_CARDNO_TEMPLATE###

direct

boolean

If set, the script uses sub-template with marker ###DIBS_DIRECT_TEMPLATE### instead of the default which is ###DIBS_CARDNO_TEMPLATE###

merchant

boolean

Merchant id

currency

int+

Currency number, ISO4217 format

relayURL

string

The url of the shop where their secure server is going to fetch the basket.

test

boolean

If set, the test-field is set in the forms.

cardType

string

Card type,

Example values:

DK = Dankort

V-DK = Visa-Dankort

MC(DK) = Mastercard/Eurocard issued in Danmark

VISA = Visakort issued abroad

MC = Mastercard/Eurocard issued abroad

DIN(DK) = Diners Club, Denmark

DIN = Diners Club, international

account

string

DIBS account feature

addOrderInfo

boolean

If set, order info is added to the form. DIBS can pickup this info and simply display it with the payment information.

k1

k2

string

DIBS key values

[tsref:(script).productsLib.paymentDIBS]