Shop System tt_products 

Shop system extension for the TYPO3 CMS

Installation 

Explains how to install this extension in Composer-based and Classic TYPO3 installations.

Configuration 

Learn how to configure this extension.

Frequently Asked Questions (FAQ) 

These questions have been frequently asked.

How to get help 

Learn where to get help and how to report issues you found.

Installation 

Install Shop System tt_products with Composer 

Install the extension via Composer:

composer req jambagecom/tt-products
Copied!

See also Installing extensions, TYPO3 Getting started.

Install Shop System tt_products in Classic Mode 

Or download the extension from https://www.ttproducts.de and install it in the Extension Manager.

Version 

This document is for version 2.12.0 of tt_products. You can get the code of the next version of tt_products at ttproducts.de .

Cease and Desist Letters 

Do not use trademarks, photographs and maps in your shop which you do not own and made by yourself. Do not forget any texts in your shops which are required. Be very careful when you link to other pages. Hundreds of lawyers are continuously searching the Internet for your mistakes in order to get much more money from you than you could ever imagine. That would be damn stupid for you.

Cease and Desist Letters: A Comprehensive Legal Guide

What does it do? 

The TYPO3 shop extension gives you the facility for...

  • product listings with multiple images, details and languages
  • shopping basket
  • payment page - The orders will be indicated and can be checked over before the products are finalized.
  • sponsors only: Payment gateways with Transactor Library extension - Paypal
  • tracking customers order status
  • automatic creation of bill and delivery sheet
  • different tax percentages per item, shipping and payment
  • basic stock management
  • send a XML or CSV for each order to the shop admin (2 choosable file formats)
  • e-mail attachments for the confirmation mails (for example AGB in German = general trading conditions)
  • choosable item variants (colours, sizes, gradings, descriptions, materials and qualities)
  • force customer to accept the General trading conditions (AGB) per checkbox
  • offers, highlights and newly added items
  • special preparation, weight and bulkily (can be used to calculate the shipping fee)
  • ability to limit payment methods to specific user groups
  • automatic creation of front end users at first order
  • remember items in a memo, when a user is logged in
  • discount percentage per user
  • some methods for price calculation with rebate for resellers
  • display orders: order can be displayed on per fe-user basis (CODE=ORDERS)
  • creditpoint system: customers can save credit points per each order. Saved points will give them a discount for newer orders or certain products can be "bought" with these points.
  • voucher system: if a customer enters a voucher code, he gets a discount on the order.

Sponsors 

  • Multi-categories per product with multilingual listings, import scripts for XML files from inventory control systems, custom shop tables, advanced search mask with producer select box, traffic light symbols to display the availability of articles. Sponsored by Geo.net IT, which has been changed into Geonet GmbH .

Note 

You must fill in the product's 'In Stock (pcs)' field of your product properties, or no item will be shown in your front end list if set to 0.

However, you should store the prices with included tax in the database; it makes it easier for you to reenter the price as well as for the customer to see the prices as you entered them. These prices should finally have the convention of pricing like 89.99 and not 89.72.

Before you start entering the prices of your products you have to decide whether you want to enter the prices with or without tax (see TAXincluded). All the calculations and configurations will use the prices as they have been stored into the price field of the tt_products table. You should use a CSS styled template or one with multiple columns (use plugin.tt_products.conf.tt_products.LIST.displayColumns.1 = 3 or higher) even if you only have one column in the list table.

Use an example template from the directory Resources/Private/Templates/, like the template, example_locallang_xml.html, when you start your shop. The marker ###DOMAIN### is the placeholder for your url. There are several placeholders for the different page ids of the shop. This is sensible because different hosting environments will be used. In the setup of the shop templates, the domain marker must become mydomain.com by using the following plugin.tt_products.domain = mydomain.com.

jambagecom/tt-products is based on the jambagecom/table and jambagecom/div2007 . So you have to always update to the latest versions of these extensions when you update jambagecom/tt-products .

If you want to use the variant fields (colour, quantity ...), you must also set the constants selectColor and selectSize at 0 or 1 , 2 , 3 . Otherwise, the count in the product list of articles will be calculated incorrectly.

Many adaptations can be undertaken by way of the constant editor. The Typoscript back end module gives an option to edt the template's setup field and use a constant editor. For professional usage you should instead use a sitepackage for the whole website.

Calculation script 

If you write and use your own calculation scripts, then you should always use only the price variables. Use the price variables and the TAXpercentage and TAXincluded constants. You can use the local PHP variables $calculatedArray and

basket calculation example
use TYPO3\CMS\Core\Utility\GeneralUtility;
use JambageCom\TtProducts\Api\BasketApi;

$basketObj = GeneralUtility::makeInstance(Basket::class);
$itemArray = $basketObj->getItemArray();
Copied!

to make your own price calculations.

set calculationScript as EXT:my_extension/Classes/Utility/MyCalculations.php
10.calculationScript = EXT:my_extension/Classes/Utility/MyCalculations.php
Copied!

Discount 

There are several methods to get a discount.

  1. Use the discount field for a front end user and enter the percent of discount.
  2. Use the price2 field for special front end user groups or other things. This setting is done in TypoScript via the IF-statement.
  3. Use the discountprice calculation where the discount depends on the value of the total number of the products which have a special price. This will be available for the front end user group discountGroupName.

Offers and highlights 

You have to use the plugin code LISTOFFERS for the items marked as 'offer' and LISTHIGHLIGHTS for the highlight items.

AGB General Trading Conditions 

You have to accept the general trading conditions before you can make an order and continue with the process. A page can be defined for this with PIDagb. The AGBs have to be displayed there. You can set the target for a link by AGBtarget.

A document (e.g. a PDF file) on the server containing the AGB can be set by AGBattachment. This will be sent to the customer as an e-mail with an attachment to the order confirmation. The shop administration will not get this file. He can get a XML or CSV file of the order data instead, if wanted.

Right of Revocation 

In Germany you must add a link to a page with the display of the right of revocation. A page can be defined for this with PIDrevocation. The right of revocation has to be displayed there.

MEMO page 

You can add items to a memo page when a user is logged in or not. This memo page will be saved in the fe_users table or in the front end session. Simply create a new page with the shop plugin as content and choose the display mode "Memo Items".

Voucher System 

An interested customer is obtained through invitation by e-mail to visit a shop and purchase products. This e-mail is attached to a unique code which corresponds to a certain amount of credit points (voucher). When they make a purchase, they can redeem these credit points by inputing the unique code.

If a customer states in his registration that he has been recruited by another customer, then the referring customer gets credit points. The new customer gets a discount with his first order.

Somebody can enter a voucher code if he concludes an order. Then he will obtain a discount. In table fe_users there is a field given for this "tt_products_vouchercode" which contains the used credit entry code.

Creditpoint System 

If a customer purchases a certain number of items, then he gains credit points which are stored in his user's account. If he purchases more items at a later time, he can redeem credit points against the purchase price. The customer can gather credit points with each purchase.

EXT:my_extension/ext_localconf.php
creditpoints { 
    pricefactor = 0.5
    10.type = price 
    10.prod.1   = 0.02 
    10.prod.101 = 0.04 
   10.prod.501 = 0.06 
}
Copied!

Modify the page menu 

You can add the number of products found in the subpages to your page menu.

Example:

show products found in subpages in menu
includeLibs.tt_products_ts = EXT:tt_products/api/class.tx_ttproducts_ts.php

lib.menu_top.2 = TMENU
lib.menu_top.2.IProcFunc = tx_ttproducts_ts->pageProductCount_IProcFunc
Copied!

Administration 

In the normal case the categories from the category table are used. You have to set

$TYPO3_CONF_VARS['EXTCONF']['tt_products']['pageAsCategory'] = 0;

to be able to use them. Otherwise the pages will be taken for categories and the category will be used as the subcategory ( = 1) of a page or not used at all but replaced by the page ( = 2). The only advantage of the latter is that you simply place the records on a page without the need to assign a category. This has historical reasons when no category tree had been available and because the back end page tree has the better user guidance.

Handling of Categories 

There are multiple ways to create a shop. The usual way is to create folders for the products and lists and single sites where the products are displayed. If you want to build a bigger shop with TYPO3, then you should write your own import scripts for your products. It would take too long to enter each product manually.

If you want to make bigger shops with hierarchical categories you shall install jambagecom/mbi-products-categories . It includes also an improved version of the PHP script available in the outdated extension nsb_cat2menu. By means of jambagecom/mbi-products-categories you can assign many categories to one products via a mm-table. Only with this it will be possible to show a product in the list view under multiple categories.

Example:

tt_products/ext_localconf.php unset pageAsCategory
$TYPO3_CONF_VARS['EXTCONF']['tt_products']['pageAsCategory'] = 0;
Copied!

area markers: 

Marker: Description: Area:
BASKET_TEMPLATE The view of the cart with the items to be ordered top
BASKET_INFO_TEMPLATE

This is normally used to let people enter address information or verify their data if they are logged in

Exact same features as BASKET_TEMPLATE.

top
BASKET_ORDERCONFIRMATION_TEMPLATE

the final page after the order has been processed. It will not be used for the display, if PIDthanks is set. But it will always be used for the text in HTML emails. It is stored in the order data.

see: BASKET_ORDERTHANKS_TEMPLATE

top
BASKET_ORDERCONFIRMATION_NOSAVE_TEMPLATE This HTML data will be added to the display after the order has been stored to the database. down
BASKET_ORDERTHANKS_TEMPLATE

Used for displaying a thanks page, when PIDthanks is set. This will not be used in the HTML emails.b

see BASKET_ORDERCONFIRMATION_TEMPLATE

top
BASKET_OVERVIEW_EMPTY message 'your basket is empty' for OVERVIEW top
BASKET_OVERVIEW_TEMPLATE Used for the mini basket display. top
BASKET_PAYMENT_TEMPLATE Verification of address data and payment gateway connection top
BASKET_REQUIRED_INFO_MISSING warning display for missing address data top
BASKET_TEMPLATE_EMPTY message 'your basket is empty' top
BASKET_TEMPLATE_NOT_LOGGED_IN error message that the user is not logged in top
BILL_TEMPLATE how your bill file will look like top
DELIVERY_TEMPLATE for the file of your delivery sheet top
EMAIL_PLAINTEXT_TEMPLATE

the email notification text

The first line is the subject.

top
EMAIL_NEWUSER_TEMPLATE email after creation of new front end use top
ITEM_LIST_TEMPLATE the listing of products on the starting LIST page top
ITEM_SEARCH   top
ITEM_SEARCH_EMPTY   top
ITEM_SINGLE_DISPLAY single top
ITEM_SINGLE_DISPLAY_NOT_IN_STOCK single display when item is not in stock top
ITEM_SINGLE_DISPLAY_RECORDINSERT see displayCurrentRecord: render the $cObj->data top
MEMO_TEMPLATE memorization of items top
MEMO_NOT_LOGGED_IN error message that use has not been logged in for MEMO top
ORDERS_LIST_TEMPLATE display of the order list top
TRACKING_ENTER_NUMBER   top
TRACKING_WRONG_NUMBER   top

datasheet for the product 

Example for a wrap:

wrap inside of a HTML template
<!-- ###PRODUCT_LINK_DATASHEET### begin --> datasheet for the product <!-- ###PRODUCT_LINK_DATASHEET### end -->
Copied!

single markers 

Marker: Type: Description: Area:
BROWSE_LINKS   for browsing the display list over several pages  
DELIVERYCOSTS value sum of delivery costs and payment costs  
DELIVERY_... NOTE NOTE_DISPLAY DESIRED_DATE value

see also PERSON_...

input field note for order output field note with <br> instead of linebreaks desired delivery date of the order

BASKET_INFO_TEMPLATE
EXTERNAL_COBJECT value extra preprocessing Cobject  
FIELD_NAME value in form the name of a field in a form  
FIELD_NAME_BASKET value in form the basket data in encrypted format  
GC1, GC2, GC3 value global colours all
GW1B, GW2B, GW1E, GW2E wrap global wraps all
PRICE_TAX value price/price2 of the item with, without and only VAT ITEM_SINGLE
PRICE_NO_TAX      
PRICE_ONLY_TAX      
PRICE2_TAX      
PRICE2_NO_TAX      
PRICE2_ONLY_TAX      
PRICE_TOTAL_TAX value total sum of the items with shipping and payment costs all
PRICE_TOTAL_NO_TAX      
PRICE_TOTAL_ONLY_TAX      
PRICE_GOODSTOTAL_TAX value total sum ot the items for price or price2 all
PRICE_GOODSTOTAL_NO_TAX      
PRICE2_GOODSTOTAL_TAX      
PRICE2_GOODSTOTAL_NO_TAX      
LINK_BASKET wrap link to the basket page basket
PRODUCT_LINK_DATASHEET wrap

link to the datasheet file set in the constant file.datasheetIcon.

Example :

<!-- ###PRODUCT_LINK_DATASHEET1### begin -->

###GW1B######P_DATASHEET### 1: ###GW1E### <font size="1"><b><i>###PRODUCT_DATASHEET1###</i></b></font>###ICON_DATASHEET###</p>

<!-- ###PRODUCT_LINK_DATASHEET1### end -->

<!-- ###PRODUCT_LINK_DATASHEET2### begin -->

###GW1B######P_DATASHEET### 2: ###GW1E### <font size="1"><b><i>###PRODUCT_DATASHEET2###</i></b></font>###ICON_DATASHEET###</p>

<!-- ###PRODUCT_LINK_DATASHEET2### end -->

 
ORDER_STATUS_TIME, value order values TRACKING_DISPLAY_INFO
ORDER_STATUS, ORDER_STATUS_INFO, ORDER_STATUS_COMMENT      
PERSON_... NAME, ADDRESS, TELEPHONE, value address information fields have to be connected with a prefix PERSON_... the customer of the order  
FAX, EMAIL,   DELIVERY_... the recipient of the order  
COMPANY,      
CITY,      
ZIP,      
STATE,      
COUNTRY      
PID_TRACKING value the tracking pid  
STATUS_CODE_60 wrap used to allow the disappearance of the text with status code by the shop TRACKING_DISPLAY_INFO
STATUS_OPTIONS value Select menu of state options ADMIN_CONTROL inside TRACKING_DISPLAY_INFO
SHOPADMIN_EMAIL value Email-Address of the shop admin all

global markers 

The global markers are allowed to be used within all subparts on any position. You can define your own markers.

.. configuration_marks:

marks

marks
Type
array

self defined markers

Example:

define marker MY_MARKER
plugin.tt_products.marks {
    my_marker = Come soon back to our shop!
}
Copied!

markerFile

markerFile
Type
array
Constants: file.markerFile

The marker file with the translations

Example: (Setup):

use HTML template marker MY_MARKER
###MY_MARKER###
Copied!

Example: (Setup):

markerFile for translations
plugin.tt_products.markerFile = EXT:myext/marker/fr.locallang.xlf
Copied!

Automatic creation of front end users and address fields 

It is possible to create front end users automatically after each order. You have to set createUsers to 1, enter the PID of the sysfolder as PIDuserFolder in the Setup field. Then you have to set memberOfGroup to the ID of your front end user group. The customer will get an email with his account data after his first order. This email will contain his account name, which is his email address, and his automatically created password.

If you do not want to use a single address field, but a separate address field for the name of the street, the house number and additional fields for the ZIP, city and country, then you have to insert the appropriate parts in your template file. If you install extension sjbr/static-info-tables and set useStaticInfoCountry = 1 then the small field static_info_country of the fe_users will be used instead of a country string. It is customer friendly to have a select box for the country.

Important 

Some of the TypoScript settings do not function via the constants area and can be entered in the setup area only. Only those settings which can be found using the Constants Editor or in the file static/css_styled/constants.txt are valid constants.

Template files 

You need to have the following lines in the template files for the shop so the change of the number of items in the basket will work:

required hidden input elements for the basket
<input type="hidden" name="mode_update" value="1">
<input type="submit" name="products_update" value="update basket">
Copied!

Put this into your FORM html of the BASKET_TEMPLATE.

TypoScript Setup 

Properties 

templateFile 

templateFile

templateFile
Type
resource

Same as file.templateFile from Constants. The template-file. See example in jambagecom/addons-tt-products Resources/Private/Templates/collection/products_template.tmpl You can also specify a CODE and ERROR for error cases. (see display mode)

Example:

plugin.tt_products.templateFile
plugin.tt_products {
    templateFile = EXT:/addons_tt_products/Resources/Private/Templates/collection/example_template_bill_de.tmpl
}	
plugin.tt_products {
    templateFile.LIST = EXT:tt_products/Resources/Private/Templates/example_locallang_xml.html
}
Copied!

templateSuffix 

templateSuffix

templateSuffix
Type
string

This suffix is appended to all templates' major subparts.

fe 

fe

fe
Type
boolean

If front end output is used. You can turn off the front end output. This is useful for a callback script (see CODE SCRIPT). No template file is needed in this case.

pid_list 

pid_list

pid_list
Type
list of page ids

The page ids from where to fetch categories, products and so on. Default is the current page. Accepts multiple PIDs separated by comma.

defaultCode 

defaultCode

defaultCode
Type
string

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

Example:

defaultCode = HELP
defaultCode = HELP
Copied!

code 

code

code
Type
string /stdWrap
Default
HELP

see chapter 'display mode'

defaultArticleID 

defaultArticleID

defaultArticleID
Type
int+

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

defaultProductID 

defaultProductID

defaultProductID
Type
int+

The default product uid number for the single display is used when the link to the script did not contain a 'tt_products[product]' parameter. Set this default value when you get an error message like: “GET/POST var 'tt_products[product]' was missing.”

defaultCategoryID 

defaultCategoryID

defaultCategoryID
Type
int+

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

defaultPageID 

defaultPageID

defaultPageID
Type
int+

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

defaultDAMCategoryID 

defaultDAMCategoryID

defaultDAMCategoryID
Type
int+

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

productDAMCategoryID 

productDAMCategoryID

productDAMCategoryID
Type
int+

DAM category of products to be used in DAM lists.

rootAddressID 

rootAddressID

rootAddressID
Type
int+

The upper most address ID from where you want to start to list addresses.

rootCategoryID 

rootCategoryID

rootCategoryID
Type
int+

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

rootDAMCategoryID 

rootDAMCategoryID

rootDAMCategoryID
Type
int+

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

rootPageID 

rootPageID

rootPageID
Type
int+

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

recursive 

recursive

recursive
Type
int+
Default
99

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

domain 

domain

domain
Type
string

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

altMainMarkers 

altMainMarkers

altMainMarkers
Type
array of string

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:

main subpart markers with may get an alternative marker name
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
BILL_TEMPLATE
DELIVERY_TEMPLATE
Copied!

Example:

main subpart markers with may get an alternative marker name
altMainMarkers.BASKET_TEMPLATE =  BASKET_DESIGN2
altMainMarkers.BASKET_TEMPLATE.wrap = ### | ###
Copied!

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 

stdSearchFieldExt

stdSearchFieldExt
Type
list of fields
Default
title,subtitle,note

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

limit 

limit

limit
Type
int+
Default
99

The maximum number of items displayed on one page.

separateImage 

separateImage

separateImage
Type
boolean
Default
0

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

image 

image

image
Type
IMAGE cObject
Default
see setup.typoscript

The image configuration in single display

listImage 

listImage

listImage
Type
IMAGE cObject
Default
see setup.typoscript

The image configuration in list display

Example:

reset the ListImage
listImage >
listImage {
  altImgResource.import = uploads/media/
  altImgResource.import.field = media
  altImgResource.import.listNum = 0
  altText.data = field:title
}
Copied!

That way, attached images are not copied to and displayed from /typo3temp/ (which leads into trouble with transparent backgrounds) but directly linked from /uploads/pics/. The line with altText leads to the drawing of an alternative text.

listImageHasChilds 

listImageHasChilds

listImageHasChilds
Type
IMAGE cObject
Default
see setup.typoscript

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

see listImage

basketImage 

basketImage

basketImage
Type
IMAGE cObject
Default
see setup.typoscript

The image configuration in basket display

datasheetIcon 

datasheetIcon

datasheetIcon
Type
IMAGE cObject / Array of integers (only setup)
Default
see setup.typoscript

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

If it is an array, then it consists of a file type and a file name.

Example:

EXT:my_extension/ext_localconf.php
plugin.tt_products.datasheetIcon {
       10.fileext = pdf
       10.file = fileadmin/img/pdf-icon.png
       20.fileext = doc
       20.file = fileadmin/img/msword-icon.png
}
Copied!

basketPic 

basketPic

basketPic
Type
string
Default
see setup.typoscript

URL link to the basket image

clickIntoBasket 

clickIntoBasket

clickIntoBasket
Type
boolean
Default
0 (false)

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.

clickIntoList 

clickIntoList

clickIntoList
Type
boolean
Default
0 (false)

If set you will be directed into the list page from the single view after putting a product into the basket. This only works if PIDlistDisplay has been set.

basketMaxQuantity 

basketMaxQuantity

basketMaxQuantity
Type
int+ / string
Default
100000

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.
  • creditpoint: Items can only be put into the basket if the FE user has enough credit points.

quantityIsFloat 

quantityIsFloat

quantityIsFloat
Type
boolean
Default
0 (false)

If set the basket count can be a float value.

noImageAvailable 

noImageAvailable

noImageAvailable
Type
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 

displayListCatHeader

displayListCatHeader
Type
boolean
Default
1 (true)

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.

displayBasketCatHeader 

displayBasketCatHeader

displayBasketCatHeader
Type
boolean
Default
0 (false)

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

displayCatListType 

displayCatListType

displayCatListType
Type
string
Default
ul

Define the HTML main tag for the display of the categories in the category list view. Use the new plugin 'Categories: menu' instead of the former displayCatListType=ul.

substitutePagetitle 

substitutePagetitle

substitutePagetitle
Type
int+
Default
1

Set the page title in single view:

  • 1 : product title
  • 2 : product subtitle
  • 12 : product title and subtitle
  • 21 : product subtitle and title
  • 3 : bread crumb

CSS 

CSS

CSS
Type
see below

Set the CSS files.

js 

js

js
Type
see below

Set the JavaScript files.

conf 

conf

conf
Type
see below

configurations of the tables

NoSingleViewOnList 

NoSingleViewOnList

NoSingleViewOnList
Type
boolean
Default
0 (false)

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 

itemMarkerArrayFunc

itemMarkerArrayFunc
Type
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/ value pairs 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.

Example: (provided that a function or class is included!)

define an itemMarkerArrayFunc
itemMarkerArrayFunc = user_addFieldsMarkerArr
itemMarkerArrayFunc.simpleOption = 1
Copied!

PIDitemDisplay 

PIDitemDisplay

PIDitemDisplay
Type
int+/Array of integers

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.

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.

Example:

PIDitemDisplay with where conditions
PIDitemDisplay {
     10.type = sql 
     10.where = color=red
     10.pid = 142 
     20.type = sql 
     20.where = color=white 
     20.pid = 143 
}
Copied!

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

PIDitemDisplay with where conditions
PIDitemDisplay {
    10.type = pid
}
Copied!

PIDlistDisplay 

PIDlistDisplay

PIDlistDisplay
Type
int+/Array of integers

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

PIDsearch 

PIDsearch

PIDsearch
Type
int+

If you want all product searches to go to a specific page, enter the PID it here!

NOTE: If you set this PID, all search queries will (must) be handled with a list content element with the display mode "Products: search" on that page.

PIDsearch 

PIDbasket

PIDbasket
Type
int+

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 

PIDstoreRoot

PIDstoreRoot
Type
int+

This is the PID of the "root page" 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 

PID_sys_products_orders

PID_sys_products_orders
Type
int+

By default they will get the pid of the payment ( finalize) page.

PIDinfo 

PIDinfo

PIDinfo
Type
int+

On the info page name and address are entered.

PIDpayment 

PIDpayment

PIDpayment
Type
int+

On the payment page the address is checked and the order is confirmed by the customer. You could change to a payment gateway from here.

PIDfinalize 

PIDfinalize

PIDfinalize
Type
int+

The finalization page is the page directed to after the user has confirmed the order data. The order will get stored here.

PIDthanks 

PIDthanks

PIDthanks
Type
int+

The thanks page can be shown instead of the order confirmation. BASKET_ORDERTHANKS_TEMPLATE will be used. You must not set PIDfinalize if you use this.

PIDtracking 

PIDtracking

PIDtracking
Type
int+

The tracking is a front end tool to see and set the status of an order.

PIDbilling 

PIDbilling

PIDbilling
Type
int+

PIDdelivery 

PIDdelivery

PIDdelivery
Type
int+

PIDmemo 

PIDmemo

PIDmemo
Type
int+

PIDagb 

PIDagb

PIDagb
Type
int+

The UID of a page with the general trading conditions (AGB in Germany) Only if this page id is set the AGB check will be active.

PIDrevocation 

PIDrevocation

PIDrevocation
Type
int+

PIDuserFolder 

PIDuserFolder

PIDuserFolder
Type
int+

pidsRelatedProducts 

pidsAddresses 

pidsAddresses

pidsAddresses
Type
int+

UIDstore 

UIDstore

UIDstore
Type
int+

comma separated list of UIDs of the fe_users table with the data of the shop.

paymentActivity 

paymentActivity

paymentActivity
Type
string
Default
finalize

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

  • payment
  • finalize
  • verify

advanceOrderNumberWithInteger 

advanceOrderNumberWithInteger

advanceOrderNumberWithInteger
Type
string
Default
finalize

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: :typoscript:`1,10`: This will increment the counter randomly between :php:`1` and :php:`10` 5,5 : This will increment the counter with 5 each time

alwaysAdvanceOrderNumber 

alwaysAdvanceOrderNumber

alwaysAdvanceOrderNumber
Type
boolean
Default
0 (false)

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 

alwaysUpdateOrderAmount

alwaysUpdateOrderAmount
Type
boolean
Default
0 (false)

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

parseFunc 

parseFunc

parseFunc
Type
see parseFunc

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:*

parseFunc
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 = *
Copied!

categoryHeader 

categoryHeader

categoryHeader
Type
cObject

Example:*

categoryHeader
categoryHeader = TEXT
categoryHeader.current = 1
Copied!

TAXpercentage 

TAXpercentage

TAXpercentage
Type
cObject

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

Example:*

set TAXpercentage
# Danish sales TAX is 25%:
TAXpercentage = 25.00
Copied!

TAXincluded 

TAXincluded

TAXincluded
Type
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.

TAXrates 

TAXrates

TAXrates
Type
string

Comma separated list of tax rates. The first will be taken as tax A, the second as tax B aso.

TAXmode 

TAXmode

TAXmode
Type
int+
Default
1
  • 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.

priceDec 

priceDec

priceDec
Type
int+
Default
2

priceDecPoint 

priceDecPoint

priceDecPoint
Type
string
Default
.

priceThousandPoint 

priceThousandPoint

priceThousandPoint
Type
string

Enter the thousand separator, if any.

noZeroDecimalPoint 

noZeroDecimalPoint

noZeroDecimalPoint
Type
boolean

If set then no decimal point is shown for integers.

priceNoReseller 

priceNoReseller

priceNoReseller
Type
int+

Price number for reseller, which can be only 2 without the help of third party extensions. The price2 will however only be taken when its value is greater than 0. An enhancement extension must add more price fields if you want to use more price numbers. Here is an example based on Typoscript conditions to get the price2 for a special user group:

Example:

active the price2 field for front end users with group 1
[usergroup = 1]
priceNoReseller = 2
[global]
...
Copied!

percentDec 

percentDec

percentDec
Type
int+

percentDecPoint 

percentDecPoint

percentDecPoint
Type
string

percentThousandPoint 

percentThousandPoint

percentThousandPoint
Type
string

Enter the thousand separator, if any.

percentNoZeroDecimalPoint 

percentNoZeroDecimalPoint

percentNoZeroDecimalPoint
Type
string

If set then no decimal point is shown for integers.

currencySymbol 

currencySymbol

currencySymbol
Type
string
Default
EURO

Used in shop administration.

Example:

EUR DKR USD $

lockLoginUserInfo 

lockLoginUserInfo

lockLoginUserInfo
Type
boolean
Default
1 (true)

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 

editLockedLoginInfo

editLockedLoginInfo
Type
boolean

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

loginUserInfoAddress 

loginUserInfoAddress

loginUserInfoAddress
Type
boolean

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

requiredInfoFields 

requiredInfoFields

requiredInfoFields
Type
boolean

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

Example:

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

The subvalues billing and delivery are possible.

Example:

requiredInfoFields for delivery
requiredInfoFields.delivery = name,address
Copied!

orderNumberPrefix 

orderNumberPrefix

orderNumberPrefix
Type
string (Max 10 chars)

If this string starts with % then the rest will be interpreted as a PHP date format.

orderEmail 

orderEmail

orderEmail
Type
array

This defines additional confirmation emails containing suffixes, sender and receiver email addresses.

  • from: 'shop' will fetch orderEmail_from, 'customer' will fetch the customer email address.
  • to: email of the receiver
  • suffix: suffix to the ###EMAIL_PLAINTEXT_TEMPLATE_### subpart.
  • returnPath: email address to use in the case of a failure to send the email

Example:

requiredInfoFields for delivery
plugin.tt_products.orderEmail {
       10.suffix = factory
       10.from = shop
       10.to = seller1@webshop-typo3.com
       10.attachment = bill
       20.suffix = logistic
       20.from = customer
       20.to = seller2@webshop-typo3.com
       20.attachment = bill
}
Copied!

It is possible to send confirmation emails to the email address stored in a foreign table and where a foreign key has been added to the table fe_users.

Example:

requiredInfoFields for delivery
plugin.tt_products.orderEmail {
   10000.suffix = shop
   10000.from = customer
   10000.to {
      table = fe_users
      field = key_field
      foreign_table = my_table
      foreign_field = my_table_key_field
      foreign_email_field = my_table_email
   }
}
Copied!

A SQL comparison will be made to fetch the email address:

user defined query for order email my_table
SELECT my_table_key_field FROM my_table WHERE my_table_key_field = $content_of_fe_users_key_field;
Copied!

orderEmail_bcc 

orderEmail_bcc

orderEmail_bcc
Type
array

BCC for the shop admin's order confirmation

orderEmail_from 

orderEmail_from

orderEmail_from
Type
array

From email address for the confirmation email to customer

orderEmail_from 

orderEmail_fromName

orderEmail_fromName
Type
array

From name for the confirmation email to customer.

orderEmail_to 

orderEmail_to

orderEmail_to
Type
list of email addresses

Shop and administrator/supervisor email addresses go here!

orderEmail_toAddress 

orderEmail_toAddress

orderEmail_toAddress
Type
boolean

If set, then the order email is sent to all addresses which are connected to the products in the basket.

orderEmail_radio 

orderEmail_radio

orderEmail_radio
Type
array of radio button number and email adresses

Comma separated list of recipients of the order email if a radio box has been selected. The number is the radio box and the second number is the selected value.

Example:

orderEmail for radio box selection
orderEmail_radio {
   1.2 = inform@mytypo3site.de
}
Copied!

orderEmail_toDelivery 

orderEmail_toDelivery

orderEmail_toDelivery
Type
boolean

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

orderEmail_subject 

orderEmail_subject

orderEmail_subject
Type
string

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

orderEmail_returnPath 

orderEmail_returnPath

orderEmail_returnPath
Type
string

Fills the 'Return-Path' of the email header. If the email of the recipient is invalid then the message will be sent to this address.

orderEmail_htmlmail 

orderEmail_htmlmail

orderEmail_htmlmail
Type
boolean / string

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

orderEmail_apostrophe 

orderEmail_apostrophe

orderEmail_apostrophe
Type
string

Use these characters as apostrophe in the order email subject

orderEmail_order2 

orderEmail_order2

orderEmail_order2
Type
boolean
Default
0 (false)

If set, the shop admin receives 2 email order confirmations. The same email like the customer with EMAIL_PLAINTEXT_TEMPLATE and also the one only for shop admins EMAIL_PLAINTEXT_TEMPLATE_SHOP if available.

email_notify_default 

email_notify_default

email_notify_default
Type
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 

statusCodes

statusCodes
Type
Array of integers
  • Numbers above 100 remove the order from the tracklist.
  • Number 0 (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 are available for the customer to choose from.
  • Number 1 is reserved to be selected when an order goes from 0 (zero) to 1
    because it's confirmed. Number 1 cannot be selected by shop admin.

These will be written into ###STATUS_OPTIONS### markers.

Example:

status code standard setup
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
   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 = Order cancelled
}
Copied!

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)

update_code 

update_code

update_code
Type
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 back end user is logged in, but this password is still needed.

statusDate_stdWrap 

statusDate_stdWrap

statusDate_stdWrap
Type
stdWrap

Example:

stdWrap for status date
statusDate_stdWrap.strftime = %d-%m-%Y %H:%M
Copied!

orderDate_stdWrap 

orderDate_stdWrap

orderDate_stdWrap
Type
stdWrap

Example:

stdWrap for order date
orderDate_stdWrap.strftime = %d-%m-%Y
Copied!

usebyDate_stdWrap 

usebyDate_stdWrap

usebyDate_stdWrap
Type
stdWrap

cardEndDate_stdWrap 

cardEndDate_stdWrap

cardEndDate_stdWrap
Type
stdWrap

displayCurrentRecord 

displayCurrentRecord

displayCurrentRecord
Type
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 

externalProcessing

externalProcessing
Type
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 is executed before any of the main processing. See the class for details.

externalProcessing_final 

externalProcessing_final

externalProcessing_final
Type
cObject

cObject for the final order confirmation template

externalFinalizing 

externalFinalizing

externalFinalizing
Type
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 

wrap1

wrap1
Type
stdWrap

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 split
wrap1.wrap = <b> |</b>
Copied!

wrap2 

wrap2

wrap2
Type
stdWrap

(see above) markers ###GW2B### and ###GW2E###

wrapInBaseClass 

wrapInBaseClass

wrapInBaseClass
Type
boolean S

If true the output will be wrapped with <div class="tx-ttproducts-pi1"> | </div>

wrapInCode 

wrapInCode

wrapInCode
Type
boolean S

If set, then the output will be wrapped by

wrap the output by code uid
  <!-- START: tt-products-code-uid --><div id="tt-products-code-uid">
|</div><!-- END: tt-products-code-uid -->
Copied!

code will be replaced by the code of the plugin. uid will be replaced by the field 'uid' of the table tt_products.

selectColor 

selectColor

selectColor
Type
integer
Default
1

If > 0 the colour of a product is selectable in a select box.

selectColor2 

selectColor2

selectColor2
Type
integer
Default
1

If > 0 the 2nd colour of a product is selectable in a select box.

selectColor3 

selectColor3

selectColor3
Type
integer
Default
1

If > 0 the 3rd colour of a product is selectable in a select box.

selectSize 

selectSize

selectSize
Type
integer
Default
1

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

selectSize2 

selectSize2

selectSize2
Type
integer
Default
1

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

selectSize3 

selectSize3

selectSize3
Type
integer
Default
1

If > 0 the 3rd size of a product is selectable in a select box.

nl2brNote 

nl2brNote

nl2brNote
Type
integer
Default
1

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

useArticles 

useArticles

useArticles
Type
integer
Default
3
  • 0: If you do not want to use the articles table then this must remain 0.
  • 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. All variants must be entered for the products and the articles. The article of a product is chosen if it contains all the selected variants. The instock of the articles table will be used instead of the products table. Articles are sold together with their related product.
  • 2: No variants are used. No product is assigned to an article. The articles are sold without products.
  • 3: The variants of the product need not be entered but are taken from the articles assigned to a product. No product is assigned to an article, but many articles are assigned to a product with the possibility of additional prices. Each article can have a part of the variants. If more than one article is added and can be part of the variants, then the additional prices are added and the text fields are chained.

keepProductData 

keepProductData

keepProductData
Type
boolean
Default
1 (true)

If true, the product data are kept in the article markers if they are not empty and if the product is merged with a corresponding article which fits in the variant fields. Only used if useArticles = 3.

noArticleSingleView 

noArticleSingleView

noArticleSingleView
Type
boolean
Default
1 (true)

If true, then no article single view is used. Articles are instead linked to the product single view and the corresponding variant selection is shown.

priceTagObj 

priceTagObj

priceTagObj
Type
IMAGE cObjec

Image for the display of the price

usePriceTag 

usePriceTag

usePriceTag
Type
boolean
Default
0 (false)

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

useStaticInfoCountry 

useStaticInfoCountry

useStaticInfoCountry
Type
boolean
Default
0 (false)

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

useStaticTaxes 

useStaticTaxes

useStaticTaxes
Type
boolean
Default
0 (false)

If true, the tax will be determined from the country and region by the extension static_info_tables_taxes.

whereGift 

whereGift

whereGift
Type
string

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

whereGiftService 

whereGiftService

whereGiftService
Type
string

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

specialPreparation 

specialPreparation

specialPreparation
Type
string

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

createUsers 

createUsers

createUsers
Type
boolean
Default
0 (false)

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###)

useMd5Password 

useMd5Password

useMd5Password
Type
boolean
Default
0 (false)

Note: If set, passwords will be encrypted. Consider to install an extension like kb_md5fepw and the newloginbox.

outputFolder 

outputFolder

outputFolder
Type
string
Default
fileadmin/data

memberOfGroup 

memberOfGroup

memberOfGroup
Type
int+
Default
1

The ID of the front end user group, the new users should be member of.

discountGroupName 

discountGroupName

discountGroupName
Type
string

getDiscountPrice 

getDiscountPrice

getDiscountPrice
Type
boolean

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

discountPriceMode 

discountPriceMode

discountPriceMode
Type
integer
  • If unset, then the price field is used as the base to calculate the discount: discount = (price – price2) / price ... where price contains no discounts
  • set to 1: discount = (price2 – price) / price2 ... where price contains the discounts

This is only needed for setting the behavior of the price2 markers.

discountFieldMode 

discountFieldMode

discountFieldMode
Type
integer

If set the discount field in the product and category table will be used to get a reducted price for a product. Modes: 1 ... the highest discount from product and categories will be used 2 ... use the product discount if set, otherwise use the highest hierarchical category discount which is set.

AGBtarget 

AGBtarget

AGBtarget
Type
string
Default
_blank

target for the PIDagb link

AGBattachment 

AGBattachment

AGBattachment
Type
resource
Default
fileadmin/agb.pdf

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

generateXML 

generateXML

generateXML
Type
boolean
Default
0 (false)

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

XMLdestination 

XMLdestination

XMLdestination
Type
resource
Default
../xmlorders/

The directory on the server, where the XML 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.

generateCSV 

generateCSV

generateCSV
Type
boolean
Default
0 (false)

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

CSVdestination 

CSVdestination

CSVdestination
Type
resource
Default
../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.

CSVfields 

CSVfields

CSVfields
Type
string
Default
../csvorders/

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

CSVinOneLine 

CSVinOneLine

CSVinOneLine
Type
boolean
Default
0 (false)

If you set this to 1, all additional information (shipping, payment, address data, delivery note) will be appended to the first ordered item. This is good if you want to import these files somewhere. If you leave this at 0, the file will be formatted for best view in programs like Excel.

CSVnotInEmail 

CSVnotInEmail

CSVnotInEmail
Type
boolean
Default
0 (false)

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

alwaysInStock 

alwaysInStock

alwaysInStock
Type
boolean
Default
1 (true)

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

showNotinStock 

showNotinStock

showNotinStock
Type
boolean
Default
1 (true)

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

notInStockMessage 

notInStockMessage

notInStockMessage
Type
string
Default
Not in stock

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

warningInStockLimit 

warningInStockLimit

warningInStockLimit
Type
string
Default
Not in stock

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

inStockPieces 

inStockPieces

inStockPieces
Type
string
Default
pieces

This is the unit for items inStock.

newItemDays 

newItemDays

newItemDays
Type
string
Default
pieces

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

bulkilyWarning 

bulkilyWarning

bulkilyWarning
Type
string

Text for ###BULKILY_WARNING### for bulk goods.

javaScript 

javaScript

javaScript
Type
array of integers

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

Example:

JavaScript functions
javaScript {
    10.value = function addValues (a, b) { return a+b; }
    20.value = function multiplyValues (a, b) { return a*b; }
}
Copied!

Configuration 

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 Example templates in English.
products_template_htmlmail.tmpl '.._htmlmail.tmpl' is a HTML-wrap for the HTML-emails sent.
example_template_bill_de.tmpl bananaguard.de template with examples for bill and delivery sheet in German
product_detail.tmpl Example templates for gift certificates, creditpoints
product_proefpakketten.tmpl and voucher system in Dutch
shop-a-box.tmpl producten.tmpl  
products_css_en.html CSS styled template. Use this if you need a barrier-free shop.

[tsref:(cObject).TEST]

Basket 

basket.minPrice

basket.minPrice
Type
array of string
Required

true

minimum price which the products must reach to get a permission to buy them. E.g. only products of a total price of at least 250 shall be accepted. The products which have the 'no minimum price checked, will not be counted here.

Example:

example basket.minPrice
plugin.tt_products.basket.minPrice {
    type = price
    collect = goodstotal
    value = 250
}
Copied!

basket.maxPrice

basket.maxPrice
Type
array of string
Required

true

maximum price which the products may reach to get a permission to buy them. E.g. only products of a total price of at most 2500 shall be accepted. The products which have the 'no maximum price' checked, will not be counted here.

Example:

example basket.maxPrice
plugin.tt_products.basket.maxPrice {
    type = price
    collect = goodstotal
    value = 2500
}
Copied!

basket.view

basket.view
Type
array of string
Required

true

Default
showAmount = basket

basket view configuration showAmount = basket: if the amount of items in the basket is shown with each product in single and list view.

  • 0 : if the default amount with each product is always zero (needed for caching)
  • input: input tag with radio buttons for the list view of products and the marker ###BASKET_INPUT###
    insert the name of the radio buttons
  • where: SQL where condition for products
  • checked: preselected product uid

Example:

example basket.view
plugin.tt_products.basket.view.input {
10.label = Buy:
10.type = radio
10.where = uid IN (12,13,14,15)
10.checked = 12
10.name = Radiobox1
10.params =
Copied!

}

basket.activity

basket.activity
Type
array of string
Required

true

activity configuration Possible activities are: basket, info, payment, verify, finalize, overview

  • check: :typoscript:`address`: if the required fields have been filled in (see requiredInfoFields) agb: if the trading conditions checkbox has been clicked :typoscript:`basket`: if the basket has entries. edit_variant: if the edit variants follows some restrictions
  • clear: * memo: If the MEMO for the items shall be cleared.

Example:

example basket.activity
basket.activity.payment {
    check = address,agb,basket
}
Copied!

basket.store

basket.store
Type
boolean
Required

true

If set to 0, then no basket will be stored. This is only usefull, if you have several shop plugins on a site. Then items are added to the basket only once.

basket.round

basket.round
Type
string
Required

true

Rounding format for the prices in the basket.

  • round.discount ... rounding format for the discount from the discount field

Example:

example basket.round
basket {
      round = .XX
      round.discount = .XX
}
Copied!

Description 

Built-in shopping basket and products display within TYPO3. It has a connection to the extension Transactor API ( jambagecom/transactor ) which lets you write your own implementation with existing payment-gateways.

Display Modes / CODE 

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

Code to define, what the script does. In the back end flexforms these entries are shown as display modes instead of the Codes (in capital letters). Use the codefields only in 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 recently visited items LISTVIEWEDITEMS Listing of the recently visited products of the logged in user
Products: list mostly visited LISTVIEWEDMOST Listing of the mostly visited products of the logged in user
Products: list all users mostly visited LISTVIEWEDMOSTOTHERS Listing of the mostly visited products of all users
Products: list affordable items LISTAFFORDABLE Listing of the products which the logged in user can afford to pay with his creditpoints
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 for products
Products: memo MEMO memo of products
Basket: shopping cart, options 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 and the total sum
Basket: collect addresses INFO enter address information
Basket: order review, payment PAYMENT last check and payment gateway
Basket: order confirmation FINALIZE finalize the order and send emails – thanks page for the order
Orders: tracking TRACKING to track the order state, bill and delivery
Orders: billing BILL creates a file containing the bill
Orders: delivery DELIVERY creates a file containing the delivery sheet
Orders: list ORDERS display orders on per fe-user basis
Orders: downloads (variable content) DOWNLOAD a list of products with downloads gained by the orders
General: help HELP information how to use tt_products
Categories: list LISTCAT listing of categories
Categories: select SELECTCAT categories inside of select boxes
Categories: menu MENUCAT category menu
Categories: single SINGLECAT category single view
DAM: memo MEMODAM DAM memo
DAM: memo overview MEMODAMOVERVIEW overview for DAM memo
DAM Categories: list LISTDAMCAT listing of DAM categories
DAM Categories: select SELECTDAMCAT DAM categories inside of select boxes
DAM Categories: menu MENUDAMCAT DAM category menu
DAM Categories: single SINGLEDAMCAT DAM category single view
Articles: list LISTARTICLES list of articles
Addresses: list LISTAD list of addresses
Addresses: select SELECTAD addresses inside of select boxes
Adresses: menu MENUAD addresses as a menu
Adresses: single SINGLEAD addresses as single view
  SCRIPT execution as a PHP script without any output

Articles, Products, Categories, Pages, Addresses and Images 

Setup only.

The last but one/two value will be the name of the view. ALL means it is valid for all views.

Views correspond to the code field:

  • SINGLE
  • LIST
  • BASKET

Additional possible values are

  • EMAIL
  • PAYMENT
  • LISTRELATED ( LIST for related products)

Example:

generatePath
plugin.tt_products {
    conf {
        tt_products_articles.LIST.generatePath.base = fileadmin/images
        tt_products.LIST.orderBy = sorting
    }
}
Copied!

generatePath

generatePath
Type
array of string
Required

true

Default
fileadmin/img

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.

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:

generatePath for all codes
ALL.generatePath {
    type = tablefields
    base = fileadmin/images
    field.itemnumber = 2
}
Copied!

generateImage

generateImage
Type
array of string
Required

true

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)
  • prefix: a prefix to the image filename
  • field.fieldname: name of the table field
  • separator: separator in the filename between the
    matched beginning of the filename and the end part of the filename.
  • 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

The file names will be like 41000_1.jpg. A product will have multiple images if there are more files with a similar file name, e.g. 41000_2.jpg .

Example:

select the image by filenames
ALL.generateImage {
    type = tablefields
    field.itemnumber = 6

    separator = _
}
Copied!

Example:

select the image path by the article table
ALL.generateImage {
    type = foreigntable
    table = tt_products_articles
    uid_local = uid
    uid_foreign = pid
    field.itemnumber = 6
    separator = _
}
Copied!

imageMarker

imageMarker
Type
array of string
Required

true

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:

select the image by filenames
ALL.imageMarker {
    type = imagename
    parts = 2,3
}
Copied!

limit

limit
Type
int+
Required

true

Default
50

The maximum number of items displayed on a list view.

limitImage

limitImage
Type
int+
Required

true

Default
1

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

Example:

maximum of 10 images to be shown on all display views
plugin.tt_products.conf.tt_products.ALL.limitImage = 10
Copied!

orderBy

orderBy
Type
string
Required

true

Default
sorting

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

fetchImage

fetchImage
Type
int+
Required

true

Default
1

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

Example:

fetch images from the table tt_content
plugin.tt_products.conf.tt_products.ALL.fetchImage {
      type = foreigntable
      table = tt_content
}
Copied!

language

language
Type
array of string

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

  • type:
* csv: The values are separated by ';' and newline characters
  • noTranslation: do not use the language overlay table
  • field: the translation is in fields
  • 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
  • marker ... Like CSV, but markers inside of the database table contents are substituted

Example:

use csv file for translations
[globalVar = GP:L = 1]
plugin.tt_products.conf.tt_products_cat.ALL.language {
    type = csv
    file = fileadmin/data/EnglishCategories.csv
}

[GLOBAL]
Copied!

Example:

use the subtitle for translations
plugin.tt_products.conf.tt_products_cat.ALL.language {
    type = field
    field.title = subtitle
}
Copied!

image

image
Type
IMAGE cObject

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

Example:

###PRODUCT_IMAGE1:M###

Image cObect
plugin.tt_products.conf.tt_products.ALL.image.m {
    wrap = |<br />
    file.maxW = 320
    file.maxH = 280
}
Copied!

joinedImagesWrap

joinedImagesWrap
Type
stdWrap

Wrap around all images. separateImage must be 0. This will be wrapped around the HTML output of the joined images.

Example:

joinedImagesWrap
joinedImagesWrap.wrap = <div id=”myimageid”> |</div>
Copied!

filter

filter
Type
array of string
Use only table records which apply to a filter on a field or parameter base.
  • param: GET/PUT parameter (value: gp) or predefined
  • regexp: use a regular expression
  • where: use WHERE conditions
  • field: name of the field on left and value on right side

Example:

joinedImagesWrap
filter {
    regexp {
        field {
            title = [:alpha:]+[:blank:]+1[:blank:]+
        }
    }
}

filter {
    where {
        field {
            bargain = 1
        }
    }
}

filter {
     param {
         cat = gp
     }
}
Copied!

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

urlparams

urlparams
Type
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

displayColumns
Type
array

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:

display columns 3 on first category level
displayColumns {
    1 = 3
}
Copied!

Example:

HTML part to support columns
<!-- ###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 -->
Copied!

displayHeader

displayHeader
Type
string

Each list view of items can have a header for the category. Normally the header is shown and after it all items of this category. But sometimes you want to show the header always with each product.

values: :typoscript:`always`: The category and product block is repeated always with each product * current: The current category is taken and not a second category

Example:

display columns 3 on first category level
displayHeader {
    1 = always
}
Copied!

requiredFields

requiredFields
Type
string

Fields which must be read in from the database table even if not marker for them is found in the used template subpart.

special

special
Type
array of string

Special treatment for the table. Only used with category parameters. :typoscript:`all`: This uid stands for all uids. 'all=all' means that all uids are always allowed. The tt_products[cat] parameter is ignored. no: This uid shall never be considered field*: name of the field on left and value on right side

Example:

joinedImagesWrap
special {
    all = 1
}
Copied!

Table tt_products_cat: This will display the products of all categories if the parameter tt_products[cat] = 1'is max_note_lengthset. So instead of listing the products of category 1 all products of all categories will be listed.

onlyChildsOfCurrent

onlyChildsOfCurrent
Type
boolean

If set, the child items (e.g. subcategories) will only be displayed for the current item (category).

rootChildsOfCurrent

rootChildsOfCurrent
Type
boolean

If set, the child items of the currently selected item will be shown on the root level.

field

field
Type
array of cObject

Use cObjects for the display of some fields. By default the field's contents are printed as is. Only the image field is used to draw an IMAGE. Use untouched=1 to get the original value (might be needed for the note field).

Example:

field
field {
    title = COA
    title {
        untouched = 0
        10 = TEXT
        10.value = ###PRODUCT_TITLE###  in sizes  ###PRODUCT_SIZE###
        10.wrap = Title: - | -
    }
}
Copied!

controlFields

controlFields
Type
array of string
Default
newItemDays -> starttime

newitemdays ... name of the field to use with the newItemDays function

Example:

field
controlFields {
    newItemDays = starttime
}
Copied!

displayFields

displayFields
Type
array of string

Definitions how to display some fields.

Example:

field
displayFields {
    note = RTEcssText
}
Copied!

fe_users

fe_users
Type
array of string
date_of_birth.period: This period of time since the FE user's birth must have been passed,
if products with uid 12 oder 24 are in the basket.

Example:

field
fe_users {
    date_of_birth.period.y = 12
    where = uid IN (12, 24)
}
Copied!

view

view
Type
array of string
  • sortselect: array of form elements
  • filterselect: filtering
  • browser: configuration for the record browser with types div2007
  • showFirstLast: if the first and last link is shown.

Example:

field
view.sortSelect {
    1 {
        label = sort by
        type = select
        attribute {
        onchange=submit();
        }
        valueArray {
        10.label = title
        10.value = 1
        10.field = title
        }
    }
}
Copied!

Example:

field
view.browser = div2007
view.browser {
    browseLinksWrap = <div class="browseLinksWrap">|</div>
    disabledLinkWrap = <span class="disabledLinkWrap">|</span>
    inactiveLinkWrap = <span class="inactiveLinkWrap">|</span>
    activeLinkWrap = <span class="activeLinkWrap">|</span>
    disabledNextLinkWrap = <span class="pagination-next">|</span>
    inactiveNextLinkWrap = <span class="pagination-next">|</span>
    disabledPreviousLinkWrap = <span class="pagination-previous">|</span>
    inactivePreviousLinkWrapn = <span class="pagination-previous">|</span>
}
Copied!

subpart

subpart
Type
array of string

This determines the behaviour of the display of the subparts.

  • show: default: if a record for a default category must be shown even if no product is found
    (for cat). This is used if you have a default category on each page and the category header should always be shown.

Example:

set the subpart behaviour for ITEM_CATEGORY
subpart.ITEM_CATEGORY {
    show = default
}
Copied!

marks

marks
Type
array

Self defined markers for the record.

Example:

table based markers
marks {
    mymarker = COA
    mymarker {
        10 = TEXT
        10.value = ###PRODUCT_TITLE###  in sizes  ###PRODUCT_SIZE###
        10.wrap = Title: - | -
    }
}
Copied!

tagmark (only categories in LIST)

tagmark (only categories in LIST)
Type
array

defines how the marker ###CATALLTAGS### is filled with the tags of the categories.

Example:

tag marker
tagmark {
    parents = 1
    prefix = cat
}
Copied!

hideID

hideID
Type
int+

The ID of the item for which the whole shop plugin gets hidden (invisible). Use this with care! The shop plugin will not be shown in the front end if the table's url parameter is set to one of these elements of the comma separated list of values.

hideZero

hideZero
Type
boolean

If true then a plugin is hidden if no category parameter with a uid is given.

hideChildless

hideChildless
Type
boolean

If true then a plugin is hidden if a category parameter with a uid is given which has no child category. This can only be used with hierarchical categories.

Form configuration 

Setup only.

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

data

data
Type
string/->stdWrap
Default
depends on codefield

This is the data that sets up the form.

  • name: name of the form.
  • If empty, default values will be used.

Example:

searchform for the shop
plugin.tt_products.form.SEARCH.data.name = ShopSearchForm
Copied!

dataArray

dataArray
Type
[array of form elements]

Every entry in the dataArray is numeric and has four main properties

  • label
  • type
  • value
  • equired

label and value have stdWrap properties.

params: Put additional parameters here.

Example:

select for for adddresses
  form.SELECTAD.dataArray {
      10.label =
      10.type = tt_products[address]=select
      10.params = onchange="submit();"
  }

Enhancement for the selection of variants with :typoscript:`selectColor`, … specification.
Copied!
select for for adddresses
form.ALL.selectColor.dataArray {
    10.params = onchange="submit();"
}
Copied!

image

image
Type
IMAGE

Image to display

imageImport

imageImport
Type
array of fields

Fetch the images corresponding to values.

Example:

select for for adddresses
form.ALL.selectColor.imageImport {
    10.sql.where =
    10.prod.0 = earth-round.gif   
    10.prod.1 = marigold-round.gif
    10.prod.2 = delft-round.gif  
}
Copied!

layout

layout
Type
string

This defines how the input field and other markers are placed towards each other.

Example:

This substitutes the ###INPUT### with the input tag and the ###IMAGE### with image data.

substitution with input tag and image data
<tr><td>###INPUT###</td><td>###IMAGE###</td></tr>
Copied!

panel

panel
Type
array of string

Inserts a panel with various clickable buttons.

Example:

substitution with input tag and image data
form.ORDERS.panel.input.10 {
    marker = button1
    label = Sort by title:
    name = Button1
    params =
}
Copied!

Control configuration 

Setup only.

You can configure the behaviour of the control for the views here. Insert the CODE after control.

param

param
Type
array of string

The behaviour of the control parameters can be changed here. This is needed e.g. if you have several product lists on the same page and you must turn some URL parameters off in order the lists are shown correctly and without unwanted filter effects.

  • use: if a parameter is to be activated (only for backPID)
  • item: if a link parameter must always be generated from the item record (for cat)

Example:

control param to ignore the parameter pp, use the backPID and read the item from the cat parameter
param {
    ignore = pp
    use = backPID
    item = cat
}
Copied!

Download configuration 

Setup only.

You can configure the generation of downloads here.

download.where

download.where
Type
array of string

Example:

download where condition
plugin.tt_products.download.10 {
    where.tt_products = uid = 12
}
Copied!

SQL where condition about the table tt_products.

Example:

for itemnumbers 3422, 3423 and 3424
download.10.where {
    tt_products = itemnumber IN (3422, 3423, 3424)
}
Copied!

generatePath

generatePath
Type
array of string

path to the download folders where the downloads for generateDownload are located.

Pairs of field names and the count of the first characters to be used to form the name of the download folder. :typoscript:`type`: tablefields fieldname: name of the table field

Example:

EXT:my_extension/ext_localconf.php
download.10.generatePath {
    type = tablefields
    base = fileadmin/downloads
    field.itemnumber = 20
}
Copied!

generateDownload

generateDownload
Type
array of string

Pairs of field names and the count of the first characters to be used to form the name of the download 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:

EXT:my_extension/ext_localconf.php
DOWNLOAD.generateDownload {
    type = tablefields
    field.itemnumber = 6
}

DOWNLOAD.generateDownload {
    type = foreigntable
    table = tt_products_articles
    uid_local = uid
    uid_foreign = pid
    field.itemnumber = 6
}
Copied!

Payment, shipping and handling 

Setup only.

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.

Example:

EXT:my_extension/ext_localconf.php
plugin.tt_products.payment {
    radio = 1
    TAXpercentage = 19
    10.title = Prepaid
    20.title = PayPal
    20.percentOfTotalShipping = 0.04
    30.title = Cash on Delivery
    30.price.1 = 4
    30.price.6 = 5.8
    30.showLimit = 99
}

plugin.tt_products.shipping {
    radio = 0
    TAXpercentage = 19
    10.title = Deutschland
    10.image.params = align=absmiddle
    10.price.type = count
    10.price.1 = 2.5
    10.price.20 = 4.8
    10.price.50 = 10
    10.price.100 = 25
    10.price.120 = 30
    10.price.300 = 150
    10.percentOfGoodstotal = 0

    20.title = Europa (nicht Deutschland)
    20.image.params = align=absmiddle
    20.price.type = count
    20.price.1 = 8.8
    20.price.20 = 11.8
    20.price.50 = 11.8
    20.price.100 = 25
    20.price.120 = 30
    20.price.300 = 150
    20.percentOfGoodstotal = 0

    30.title = Selbstabholung
    30.type = pick_store
    30.price.1 = 0
}

plugin.tt_products.handling {
    10 {
        TAXpercentage = 19
        10.title = Printing Costs
        10.price = 17
    }
    20 {
        TAXpercentage = 19
        10.title = Small Volume Addition
        10.price = 5
    }
    30 {
        TAXpercentage = 19
        10.title = Packaging Costs
        10.price = 1.95
    }
}
Copied!

radio

radio
Type
boolean
Default
0

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

template (radio layout only)

template (radio layout only)
Type
string
Default
see below

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

Example for default:

default template in one line
<nobr>###IMAGE### <input type="radio" name="recs[tt_products]['.$pskey.']" onClick="submit()" value="###VALUE###"###CHECKED###> ###TITLE###</nobr><br>
Copied!

wrap

wrap
Type
string
Default
see below

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

Default:

default template in one line
<select name="recs[tt_products]['.$key.']" onChange="submit()">|</select>
Copied!

TAXpercentage

TAXpercentage
Type
double
Default
from global config

Double value (!) (means, "use . as decimal point") This substitutes priceNoTax. This can be different to the global tax with the same name.

Example:

default template in one line
# Danish payment TAX is 25%:
payment.TAXpercentage = 25.00
Copied!

TAXincluded

TAXincluded
Type
boolean
Default
from global

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

*multiple lines*

*multiple lines*
Type
array of integers

Enter a line for each option.

Example:

default template in one line
TAXpercentage = 12
10.title = Credit card
10.image.file = typo3/sysext/cms/tslib/media/logos/dankort.gif
10.price =
10.percentOfGoodstotal = 0
10.calculationScript = MyDomain/MyExtension/MyPath/CalculationScript.php

30.title = By mail
30.image.file = typo3/sysext/cms/tslib/media/logos/postdanmark.gif
30.price = 40
Copied!

Selectable Payment / Shipping / Handling Items 

title

title
Type
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.

type

type
Type
string
  • pick_store: pick it up from a store. The delivery address is filled from a selected store (see UIDstore)
  • nocopy: bill address will not be copied into the delivery address even if it has been left empty in the entry form.

mode

mode
Type
string

Possible payment options:

  • bank_transfer ... payment via account
  • credit_card
  • cash
  • PayPal
  • Saferpay
  • iPayment
  • Payone
  • ClickandBuy
  • vrepay
  • Authorize.net

image

image
Type
IMAGE cObject

Logo image for the item

price

price
Type
double or array 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:

use the subtitle for translations
30.price.type = count
30.price.1 = 4
30.price.6 = 5.8
Copied!

replaceTAXpercentage

replaceTAXpercentage
Type
double of integers

If set as double, the general TAXpercentage will be overridden by this value. You can alternatively use it as an array. You give the tax to replace on the left side, and the new tax value on the right side. This will replace all taxes of items of zero tax by a tax of 8% and it will replace all items of 14% with a tax of 2,5% instead. Use this to set different taxes for different countries.

Example:

replaceTAXpercentage depending on sum
30.replaceTAXpercentage {
    0 = 8
    14 = 2.5
}
Copied!

priceFactWeight

priceFactWeight
Type
double

Will be added to price. The weight is multiplied with this factor to increase the shipping price.

priceFactCount

priceFactCount
Type
double

Will be added to price. The product's count is multiplied with this factor to increase the shipping price.

percentOfGoodstotal

percentOfGoodstotal
Type
double

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

percentOfTotalShipping

percentOfTotalShipping
Type
double

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

creditcards

creditcards
Type
string

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

creditcardSelect

creditcardSelect
Type
array of form elements

If set, the month and year for the credit card are selectable from select boxes. Subvalues: mm (month) and yy (year)

Example:

replaceTAXpercentage depending on sum
creditcardSelect {
      mm {
        label = Month
        valueArray {
          10.label = 1
          10.value = 1
          20.label = 2
          20.value = 2
          30.label = 3
          30.value = 3
          40.label = 4
          40.value = 4
          50.label = 5
          50.value = 5
          60.label = 6
          60.value = 6
          70.label = 7
          70.value = 7
          80.label = 8
          80.value = 8
          90.label = 9
          90.value = 9
          100.label = 10
          100.value = 10
          110.label = 11
          110.value = 11
          120.label = 12
          120.value = 12
        }
      }

      yy {
        label = Year
        type = recs[creditcard][endtime_yy]=select
        valueArray {
          10.label = 2026
          10.value = 2027
          20.label = 2028
          20.value = 2029
          30.label = 2030
          30.value = 2031
          40.label = 2032
          40.value = 2033
      }
 }
Copied!

accounts

accounts
Type
boolean

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

useAsterisk

useAsterisk
Type
int+
Default
1

If set then the account and credit data is replaced with asterisks after having been entered..

bulkilyAddition

bulkilyAddition
Type
int+
Default
1

Factor to multiply with a product which is bulkily

bulkilyFeeTax

bulkilyFeeTax
Type
int+

Tax fee in percent for shipping of bulkily

calculationScript

calculationScript
Type
resource

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. It is not recommended to use this feature. Write your own TYPO3 extension instead which is based on hooks. Properties of the calculation script is passed to the function as $confScript array. The resulting prices need to be written into the variables $priceShippingTax and $priceShippingNoTax.

handleScript

handleScript
Type
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 payment_DIBS.php in jambagecom/addons-tt-products 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

handleLib
Type
string / array

Name of the TYPO3 library to handle the Payment. Currently you can set only jambagecom/transactor here to use the Payment Transactor Library Extension.

array values: :typoscript:`extName`: name of the specific Payment Library (SPL) extension paymentMethod: method of the SPL (e.g. paymentlib_transcentral_cc_mastercard) :typoscript:`currency`: currency to use templateFile: template file for the display of the payment * gatewaymode: mode of the gateway (form / request)

Example:

transactor for Mastercard
40.title = Mastercard
40.handleLib = transactor
40.image.file = EXT:tt_products/res/icons/fe/mastercard.gif
40.handleLib {
    extName = transcentral
    paymentMethod = paymentlib_transcentral_cc_mastercard
    Currency = $
    templateFile = EXT:tt_products/template/paymentlib.tmpl
    gatewaymode = form
}
Copied!

handleURL

handleURL
Type
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

handleTarget
Type
string

Alternative target for the form.

excludePayment

excludePayment
Type
string

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:

excludePayment for pickup in store
40.title = Pick up in store
40.excludePayment = 10,40
Copied!

excludeHandling

excludeHandling
Type
string

This is a list of handling 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 need a packaging for transport. So you can exclude those handling methods

Example:

excludePayment for pickup in store
40.title = Pick up in store
40.excludeHandling = 20,70
Copied!

replacePayment

replacePayment
Type
list of integers

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

Example:

excludePayment for pickup in store
40.title = China
40.replacePayment.10.title = Payment with China
40.replacePayment.10.price = 100
Copied!

. _configuration-payment-shipping-handling-show:

show

show
Type
boolean
Required

true

Default
1

If set, the item is shown in the list.

. _configuration-payment-shipping-handling-show-limit:

showLimit

showLimit
Type
double
Required

true

Default
0

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

. _configuration-payment-shipping-handling-type:

type

type
Type
string
Required

true

  • fe_users: the payment can be configured via the fe_users table

. _configuration-payment-shipping-handling-visible-for-group-id:

visibleForGroupID

visibleForGroupID
Type
string
Required

true

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

. _configuration-payment-shipping-handling-add-required-info-fields:

addRequiredInfoFields

addRequiredInfoFields
Type
string

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

. _configuration-payment-shipping-handling-where-static-countries:

where_static_countries

where_static_countries
Type
string
Required

true

Set a SQL WHERE condition to follow for the selected country in the static_countries table of the sjbr/static-info-tables extension.

Example: .. code-block:: typoscript :caption: excludePayment for pickup in store

plugin.tt_products.shipping {
10.title = Parcel Germany 10.where.static_countries = cn_short_local = 'Deutschland' 10.price = 5.9 20.title = Parcel EU ###STATICCOUNTRIES_CN_SHORT_EN### 20.where.static_countries = cn_eu_member = 1 AND cn_short_local != 'Deutschland' 20.price = 8.9 30.title = Outside EU ###STATICCOUNTRIES_CN_SHORT_EN### 30.where.static_countries = cn_eu_member <> 1 30.price = 15

}

Payment / Shipping / Handling Item Prices 

type

type
Type
string

Meaning of the number: :typoscript:`count`: the items count weight: the calculated weight in Gramm * price: the total products price

WherePIDMinPrice

WherePIDMinPrice
Type
int+

Set a minimum price for shipping if there is an item in the basket which is from the sysfolder with PID 155. Where 7.5 is the minimum price taken for shipping costs when at least one product in the basket comes from the page with that UID.

Example:

price based on minimum weight for page 155
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 
}
Copied!

calc

calc
Type
array

the shippingcalc price calculations to be used. (see chapter shipping cost calculation)

Example:

price calculation deferred to line 10 of another configuration
plugin.tt_products.shipping { 
     10.title = Parcel 
     10.price.calc {
         use = 10
     }
}
Copied!

noCostsAmount

noCostsAmount
Type
double

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

Example:

price calculation deferred to line 10 of another configuration
plugin.tt_products.shipping { 
     10.title = Parcel 
     10.price.type = count 
     10.price.noCostsAmount = 200 
     10.price.1 = 1.5 
}
Copied!

Shipping Cost Calculation shippingcalc / handlingcalc 

Setup only.

The calculation of the shipping costs can be even more complex. Even the order of the calculation is relevant. This is necessary if you use two different calculation modes simultaneously. The highest price will be used by default.

type

type
Type
string

A special price calculation only valid for some products. Identical to discountprice.

  • percent: in percent of the price

In this example a shipping price of 25% from the product's price will be added, if the products total price is more than 0.

Example:

price calculation deferred to line 10 of another configuration
shippingcalc.10 {
    type = price
    sql.where = color = 'red'
    prod.type = percent
    prod.0 = 0.06
}
Copied!

sql

sql
Type
string

SQL condition over the database table records

Pricecalc, discountprice and creditpoints configuration 

Setup only.

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.

type

type
Type
two-edged list of integers
Default
0

The left edge of integers correspond to lines belonging together, the meaning of the right edge depends on the settings for each line. With pricecalc you will get a rebate only with the listed amounts, with discount price you will get a rebate also for all amounts in between.

  • pricecalc: price calculation

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. Attention: getDiscountPrice must be 1 if you want to allow it for all customers.

Example:

price calculation without where
pricecalc {
    10.type = count
    10.field = price
    10.sql.where = 
    10.prod.1 = 4.99
    10.prod.2 = 8.99
    10.prod.5 = 19.99
    20.type = count
    20.field = price
    20.sql.where = 
    20.prod.1 = 6.99
    20.prod.2 = 13.98
    20.prod.5 = 29.99
}
Copied!
  • discountprice: discount price calculation

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. Use type = count and prod.type = percent if you want to give a rebate in percentage instead of the total price. But you must set a sql condition in this case in order not all products will offer this reduction.

Example:

discount price calculation with where
discountprice.50 {
    type = count
    sql.where = color = 'rot'
    prod.type = percent
    prod.0 = 6
}
Copied!

Example:

discount price calculation for red coloured products
discountprice.50 {
    type = count
    sql.where = color = 'red'
    prod.type = percent
    prod.0 = 6
}
Copied!

Example:

discount price calculation without where
discountprice {
    10.type = count
    10.field = price
    10.additive = 0
    10.sql.where =
    10.prod.1 = 4.99
    10.prod.100 = 2.49
    10.prod.1050 = 2.39
    20.type = count
    20.field = price
    20.sql.where =
    20.prod.1 = 6.99
    20.prod.100 = 2.59
    20.prod.1050 = 2.49
}
Copied!
  • Credit points:

This tells you how many credit points 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:

credit points
creditpoints {
    pricefactor = 0.5
    10.type = price
    10.prod.1   = 0.02
    10.prod.101 = 0.04
    10.prod.501 = 0.06
}
Copied!

additive

additive
Type
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

type
Type
string

Meaning of the right edge integer which usually gets calculated: :typoscript:`count`: the products count (:typoscript:`pricecalc` and :typoscript:`discountprice` only) price: the total price of all articles is used (creditpoints only)

sql

sql
Type
string

SQL conditions over the records

Creditpoints Configuration 

See above for the main configuration of creditpoints.

pricefactor

pricefactor
Type
double
Default
0

Used to calculate how much money someone will get for his creditpoints. 2 creditpoins will give 1 Euro or it will be in the currency of your choice. In this example one creditpoint of a product will have the value of 50 Cent.

Example:

price calculation without where
creditpoints {
    pricefactor = 0.5
}
Copied!

mode

mode
Type
string

Normally you must create you HTML template with entry fields for the amount of creditpoins you want to use. Change this to the mode auto. Then all necessary creditpoints wil be used automatically.

Example:

price calculation without where
creditpoints {
    mode = auto
}
Copied!

Voucher System 

Setup only.

The voucher codes must be stored in a database table. Normally the fe_users table will be used. A voucher will be used as the FE user name of the person who has invited another one to the shop. The customer who has invited his friend will get a price reduction at his next shopping. If another table is set here then this will work only together with the voucher extension and the voucher code can be anything hard to guess to obtain a price reduction.

table

table
Type
string

Name of the table where the voucher codes are stored. It must have a column fe_users_uid with the uid of the FE user. If this is empty the voucher code will be stored in the fe_users table in the column tt_products_vouchercode.

Example:

define voucher table
plugin.tt_products.voucher {
   table = my_voucher_table
}
Copied!

amount

amount
Type
double

Price reduction for the voucher if the fe_users table is used.

price

price
Type
double

Price for a voucher when used as a refund for the invitation of a friend

Order Confirmation Configuration 

Setup only.

These are some settings if you want to change the behaviour of the order confirmation.

productsFilter

productsFilter
Type
array

This separates the order confirmation emails with the products on different pages. A confirmation email can be sent which includes only the products from specific pages.

The array has these items: :typoscript:`pid` : a list of page ids email: a list of email addresses

Example:

use the subtitle for translations
plugin.tt_products.finalize {
    productsFilter {
        10 {
             pid = 12
             email = myemail@mytypo3site1.com
        }
        20 {
             pid = 12
             email = myemail@mytypo3site2.com
        }
    }
}
Copied!

Bill and Delivery Configuration 

Setup only.

These are some settings if you want to use the feature of the creation and usage of bill and delivery sheets. They are generated in the folder fileadmin/data/bill.

generation

generation
Type
string
Required

true

Defines the behaviour for the generation of the bill/delivery sheet.

  • auto: Generation will be done when the order is finalized.

Example:

automise generation of a bill without a delivery sheet
plugin.tt_products.bill {
    generation = auto
}

plugin.tt_products.delivery {
    generation =
}
Copied!

type

type
Type
string
Required

true

Type of bill or delivery :typoscript:`html`: HTML format pdf : PDF format (extension :composer:'codingms/fluid-fpdf' must have been installed.)

handleLib

handleLib
Type
string / arry
Required

true

Name of the PHP library to handle the PDF generation. Currently you can set only PhpWord here.

Example:

automise generation of a bill without a delivery sheet
bill.handleLib =  PhpWord
Copied!

array values:

  • path ... file path to the library, relative to the TYPO3 directory
  • rendererLibrary.path ... file path to the helper library to generate formats which the main library cannot handle

Example:

automatice generation of a bill by PhpWord by a master branch
bill.handleLib = PhpWord
bill.handleLib {
    path = PHPWord-master
    rendererLibrary {
       path = dompdf-0.6.1
    }
}
Copied!

Tracking 

Setup only.

These are some settings if you want to change the display of the tracking page.

fields

fields
Type
string

Defines the fields of sys_products_orders to be shown in the select box of the orders.

Example:

fields for selector box
plugin.tt_products.tracking {
    fields = uid,name,tracking_code,amount,status,status_log,bill_no
}
Copied!

recordLine

recordLine
Type
string

Complete HTML line for the options tag of the order select box.

Example:

text for order selector box
plugin.tt_products.tracking {
    recordLine = ###ORDER_UID### (###ORDER_BILL_NO###): ###ORDER_NAME### (###ORDER_AMOUNT### ###CUR_SYM###) / ###ORDER_STATUS###) ###ORDER_CRDATE### ###LAST_ORDER_TYPE### ###LAST_ORDER_COUNT###
}
Copied!

recordType

recordType
Type
string

type of HTML selector for the orders select radio * checkbox

recordBox

recordBox
Type
string
Required

true

Example:

text for order selector box
plugin.tt_products.tracking {
    recordBox.wrap = <table id="thetable" cellspacing="0"><tbody> | </tbody></table>
}
Copied!

sql.where

sql.where
Type
string
Required

true

SQL where condition for the order select box. The enable fields will be added automatically.

Example:

text for order selector box
plugin.tt_products.tracking {
    sql.where = status!=0 AND status<100
}
Copied!

sql.orderBy

sql.orderBy
Type
string
Required

true

SQL order by clause for the order select box.

Example:

SQL order by for sorting
plugin.tt_products.tracking {
    sql.orderBy = crdate
}
Copied!

Graduated Price 

Setup only

The graduated prices gives you the possibility to add special prices for a list of amount of products.

Example:

use the subtitle for translations
plugin.tt_products.graduate {
    10.type = count
    10.sql.where = category = 12
    10.marks {
        factor = 3
    }
}
Copied!

marks

marks
Type
array

Self defined markers for a price formula.

Error configuration 

Setup only.

You can set the behaviour of tt_products in case of errors. The Resources/Private/Language/Pi1/locallang.xlf contains the list of tags for the error messages.

redirect

redirect
Type
array
  • pid: page id for redirection page.

Known problems 

General: 

the Extension Library since 2007 (div2007)
and the other required extensions as described in Shop System .
* Please look at the website `Wiki for_tt_products
<https://github.com/franzholz/tt_products/wiki>`_ .
* Get the latest supported version from `Upgrade licences shop for_tt_products
<https://www.ttproducts.de/shop>_ . Or have a look at the forum at mehrsprachiges Forum zur TYPO3 Benutzerregistrierung, Shop System <https://www.jambage.com/kontakt/forum>`_
* .htaccess must be properly configured otherwise tt_products does not work as expected because the
plugin can't find all necessary scripts with a poor configuration of .htaccess.
* Wrong parameters. GET/POST var 'tt_products[|]' is missing or no item with uid = x found on allowed pages (y,z)
You should set the pid_list to inform the shop where to search for the products.
  • Pay attention to all legal claims of all the countries where you ship the goods to!
  • The plugin does not produce any output See the checklist below.
  • The LIST view does not replace some marker fields: Use the Setup addToList with requiredFields and add the missing fields.

Checklist: 

  • include a 'Shop System' or 'Shop System Variable Content' from 'Advanced Options' -> 'Include TypoScript sets'
  • set 'in stock' greater 0 for the products and articles
  • do not use languages or have products in the products alternative languages tables
  • the shop template file is found
  • an error in the shop produces an entry in the PHP error_log file (activate this in Install Tool and php.ini, .user.ini or .htaccess)
  • the TYPO3 cache has been cleared before
  • the web browser cache has been cleared before
  • the cookies have been deleted
  • set the pid_list and recursive in TypoScript or set the "Record Storage Page" / "Recursive" inside of the shop plugins

Sitemap