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.

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.

http://www.legalshop.co.uk

Upgrade 

If you upgrade from Version 1.2.7 you have to do all the administrative steps under the topic 'Important'.

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 Payment Library extension - Paypal and Transaction Central
  • Tracking customers order status
  • Automatic creation of bill and delivery sheet
  • Different tax percentages per item, shipping and payment
  • basic stock management
  • Send a 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 frontend 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 new customer indicates when registrating that she/he was tipped by another existing customer, this customers gets a credit point bonus. The new customer gets a discount on first order.
  • Gift certificate: Users can buy certificates and send them as gifts to their friends. After signing on as front end users they can transform their gift certificates into creditpoints.

Developers 

  • Kasper Skårhøj: 1st developer 1.2.7 / TYPO3 3.8
  • René Fritz: 1st developer 1.2.7 / TYPO3 3.8
  • Franz Holzinger (trainer): price calculation, discount price, gift certificates, e-mail table for notification, error correction, billing, receipts, multi-column listings, product/articles tables, multiple languages, DAM list and category list
  • Klaus Zierer (trainer of zk_products): more sizes and colours, entry lists, automatic registration of front-end users, category pages. In zk_products you can find a good example shop template.

Sponsors 

  • pil.dk - Professionelle Internet Løsninger ApS is a main sponsor of the code for the Payment Library extension.
  • 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 GmbH .
  • Websolutions für Apotheke und Pharmazie TYPO3 FullService * Konzeptionierung * Realisierung * TYPO3 Hosting * pharmaline - Internet für die Apotheke, Apotheker Christian Platt, Kupferdreher Str 150, 45257 Essen

Note: 

The data path is renamed from 'pi' to 'pi1', thereby tt_products will now be put together like standard TYPO3 extensions. If paths have been employed from previous versions 1.2.x of tt_products then these must now be renamed in TypoScript setup. If you newly installl or update the extension, please observe the Depencies in TER (online repository of the extension manager).

You must fill in the product's 'In Stock (pcs)' field of your product properties, or no item will be shown in your frontend list if set to 0. This has been changed to the older version.

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 template with multiple columns (

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 tt_products/template, like the template, example_template_bill_de.tmpl, when you start your shop. You have to change the page id in the links (after the 'id=...') to the page id of the basket on your site. 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 TypoScript : plugin.domain=mydomain.com).

tt_products is based on the Table Library (table) and Static Methods for Extensions since 2007 (div2007). So you have to always update to the latest versions of these extensions when you update 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. For entering in the shop page, most should be directed in the template's setup field and constant editor.

Calculation script: 

If you write and use your own calculation scripts, then you should always use only the price variables. The priceTax and priceNoTax variables will be deleted in August 2008 because they can be calculated from the price variables and the TAXpercentage and TAXincluded constants. You can use the global PHP variables $this->calculatedArray and $this->itemArray to make your own price calculations.

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

Discount: 

There are several methods to get a discount.

  1. Use the discount field for a frontend user and enter the percent of discount.
  2. Use the price2 field for special feuser 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 frontend user group 'discountGroupName'.

Offers and highlights 

You have to use the plugin code LISTOFFERS for the items marked as 'offer' and LISTHIGHLIGHTS for the newest 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 set to the customer as an email with an attachment to the order confirmation. The shop administration will not get this file. (he can get a 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_user table or in the FE session. Simply create a new page with the Shop plugin as content and enter the code "MEMO". You must set the starting point there too, like in the SEARCH pages.

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 (lets say user 1) can enter a voucher code if he concludes an order. Then user 1 will obtain a discount. This credit entry code undergoes a change with each different user name (which is the e-mail address). Let's say user 2 gets 5 credit points altogether and applies his code to his purchase. Only one entry code out of a voucher system can be used by each user. In fe_users table there is a field given for this "tt_products_vouchercode" which contains the used credit entry code (e-mail of user 2).

10.type = price 10.prod.1 = 0.02 10.prod.101 = 0.04 10.prod.501 = 0.06 } 

Gift Certificates 

A shop manager can sell, for example, electronic gift certificates for wine bottles. A client may order a certificate that corresponds to 50 credit points (=25 Euros) to send to someone as a gift. To redeem this gift certificate, then one must register as a shop customer and input the certificate code. Thereby, haveing 50 credit points credited to his account. This customer can purchase a particular product with these credit points.

Anyone can buy, for example:

  • 3 certificates @ 25 credit points
  • 5 certificates @ 50 credit points
  • 8 certificates @ 75 credit points ...all within the same order.

Modify the page menu 

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

Administration 

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

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

to be able to use them. Otherwise the pages will form the category and the category will be used as subcategory ( = 1) or not used at all but replaced by the page ( = 2).

The flexforms in the backup are always activated automatically.

Installation 

Install the extension with the Extension Manager. If you already use an older version of tt_products that is installed in the “global” location (typo3/ext/), it is recommended to install the new extension into the “local” folder (typo3conf/ext/) without overwriting the old one. By doing this you can easily switch back to the former version.

Deinstall the extension from the Extension Manager. Then download the version of your choice from the TYPO3 Online Repository with the Extension Manager. Then use the Extension Manager's "Available extensions to install" menu entry and add the shop system again.

This extension works best in union with static_info_tables, static_info_tables_taxes, agency, rtehtmlarea, mbi_products_categories, transactor and taxajax.

Handling of Categories 

There are multiple ways to create a shop. The usual way is to create sysfolders for the products and lists and single sites where the products are displayed. If you want to build a bigger shop with TYPO3, this will become a little bit unhandy.

If you want to make bigger shops with hierarchical categories you shall install the mbi_products_categories and maybe also the nsb_cat2menu extension. Sponsors will get a working version of mbi_products_categories with which 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   top
BASKET_INFO_TEMPLATE

This is normally used to let people enter address information separately from the real basket.

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 this will always be used for the text in HTML emails.

see: BASKET_ORDERTHANKS_TEMPLATE

 
BASKET_ORDERCONFIRMATION_NOSAVE_TEMPLATE This HTML data will be added to the display after the order has been stored to the database.  
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

 
BASKET_OVERVIEW_EMPTY message 'your basket is empty' for OVERVIEW  
BASKET_OVERVIEW_TEMPLATE    
BASKET_PAYMENT_TEMPLATE    
BASKET_REQUIRED_INFO_MISSING    
BASKET_TEMPLATE_EMPTY message 'your basket is empty'  
BASKET_TEMPLATE_NOT_LOGGED_IN error message that the user has not logged in  
BASKET_TEMPLATE_INVALID_GIFT_UNIQUE_ID error message that a wrong unique id for a gift product has been entered  
BILL_TEMPLATE how your bill file will look like  
DELIVERY_TEMPLATE for the file of your delivery sheet  
EMAIL_PLAINTEXT_TEMPLATE

the email notification text

The first line is the subject.

 
EMAIL_NEWUSER_TEMPLATE email after creation of new frontend use  
ITEM_LIST_TEMPLATE the listing of products on the starting LIST page  
ITEM_LIST_GIFTS_TEMPLATE listing of the gift products  
ITEM_SEARCH    
ITEM_SEARCH_EMPTY    
ITEM_SINGLE_DISPLAY    
ITEM_SINGLE_DISPLAY_GIFT single display used when this is a gift product  
ITEM_SINGLE_DISPLAY_NOT_IN_STOCK single display when item is not in stock  
ITEM_SINGLE_DISPLAY_RECORDINSERT see displayCurrentRecord: render the $cObj->data  
MEMO_TEMPLATE    
MEMO_NOT_LOGGED_IN error message that use has not been logged in for MEMO  
ORDERS_LIST_TEMPLATE display of the order list  
TRACKING_EMAIL_GIFTNOTIFY_TEMPLATE notification to the gift recipient in the order tracking  
TRACKING_ENTER_NUMBER    
TRACKING_WRONG_NUMBER    

single markers 

Example for a wrap:

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

datasheet for the product 

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 with all subparts. You can even define new markers.

Example:

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

:

plugin.tt_products.marks {
  my_marker = Come soon back to our shop!
}

Copied!

###MY_MARKER###

Property Data type Default
marks    
markerFile    
Constants: file.markerFile    

marks 

Property
marks
Data type
array
Description
self defined markers

markerFile 

Property
markerFile Constants: file.markerFile
Data type
resource / array of string
Description
The marker file with the translations. (v2.9) Example: (Setup): plugin.tt_products.markerFile = EXT:myext/marker/fr.locallang.xlf t3tsref:data-type-resource

Automatic creation of frontend users and address fields 

It is possible to create frontend 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 housenumber and additional fields for the ZIP, city and country, then you have to insert these in your template file. If you install 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 useful to make a select box for the country.

TypoScript Setup 

Properties 

templateFile 

templateFile

templateFile
Type
resource

Same as file.templateFile from Constants. The template-file. See example in 'addons_tt_products/Resources/Private/Templates/collection/products_template.tmpl' You can also specify a CODE and ERROR for error cases. (siehe display mode) Example:

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

}

templateSuffix 

templateSuffix

templateSuffix
Type
string

This suffix is appended to all template's major subparts.

fe 

fe

fe
Type
boolean

If FE output is used. You can turn the FE output off. 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_id's

The pids from where to fetch categories, products and so on. Default is the current page. Accepts multiple pid's 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

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!

Configuration 

FAQ 

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

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 product_proefpakketten.tmpl shop-a-box.tmpl producten.tmpl Example templates for gift certificates, creditpoints and voucher system in Dutch
products_css_en.html CSS styled template. Use this if you need a barrier-free shop.

[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: address: if the required fields have been filled in (see requiredInfoFields) agb: if the trading conditions checkbox has been clicked 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. Has a clearing interface which lets you write your own implementation with existing payment-gateways.

Currently there's an implementation with DIBS in Denmark, found at www.architrade.dk .

Reference 

Property: Data type: Description: Default:
templateFile resource The template-file.  
Constants: file.templateFile  

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

You can also specify a CODE and ERROR for error cases.

(siehe display mode)

Example:

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

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

 
templateSuffix - Setup string This suffix is appended to all template's major subparts.  
fe boolean If FE output is used. You can turn the FE output off. This is usefull for a callback script (see CODE SCRIPT). No template file is needed in this case. TRUE
pid_list string /stdWrap The pids from where to fetch categories, products and so on. Default is the current page. Accepts multiple pid's separated by comma.  
defaultCode string

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

Example:

plugin.tt_products.defaultCode = HELP

 
code string /stdWrap see chapter 'display mode' HELP
defaultArticleID int+ The default article uid number for the single display is used when the link to the script did not contain a 'tt_products[article]' parameter.  
defaultProductID 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 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 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 int+ See defaultCategoryID, but for DAM categories and the 'tt_products[damcat]' parameter.  
productDAMCategoryID int+ DAM category of products to be used in DAM lists.  
rootAddressID int+ The upper most address ID from where you want to start to list addresses.  
rootCategoryID int+ The upper most category ID from where you want to start to list categories.  
rootDAMCategoryID int+ The upper most DAM category ID from where you want to start to list DAM categories.  
rootPageID int+ The upper most page ID from where you want to start to list them as categories.  
recursive int+ Number of recursive sublevels of pids to select tt_products from in lists. 99
domain string The url of the shop. If not set, it will be detected automatically. Will replace ###DOMAIN### markers.  
altMainMarkers (array of strings)

Lets you specify alternative subpart markers for the various main template designs in the shopping basket system.

This is the list of main subparts you can override: Properties:

TRACKING_WRONG_NUMBER

TRACKING_ENTER_NUMBER

BASKET_REQUIRED_INFO_MISSING

BASKET_TEMP

ITEM_SINGLE_DISPLAY_RECORDINSERT

ITEM_SINGLE_DISPLAY

ITEM_SEARCH

ITEM_LIST_TEMPLATE

ITEM_LIST_GIFTS_TEMPLATE

ITEM_SEARCH_EMPTY

BASKET_TEMPLATE

BASKET_INFO_TEMPLATE

BASKET_PAYMENT_TEMPLATE

BASKET_ORDERCONFIRMATION_TEMPLATE

EMAIL_PLAINTEXT_TEMPLATE

BILL_TEMPLATE

DELIVERY_TEMPLATE

/+ stdWrap

Example:

altMainMarkers.BASKET_TEMPLATE = BASKET_DESIGN2

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

This example changes the main subpart marker for the regular basket display from the default ###BASKET_TEMPLATE### to the custom supplied design ###BASKET_DESIGN2### (found in the same template HTML-file)

 
stdSearchFieldExt list of fields

Search fields

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

 
limit int+ Max items displayed. The maximum number of items displayed on one page. 50
limitImage int+

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

Deprecated. See article/product configuration

Use this instead:

3
limitImageSingle int+

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

Deprecated. See article/product configuration

Use this instead:

10
usePageContentImage boolean

Deprecated. See article/product configuration

Use this instead:

type = foreigntable

table = tt_content

}

 
separateImage boolean Normally all images are displayed together. With separateImage=on you can use a ###PRODUCT_IMAGE3### for each image number (starting with 1) separatly.  
image IMAGE cObject The image configuration in single display  
listImage IMAGE cObject

The image configuration in list display

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

altText.data = field:title }

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

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

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

 
listImageHasChilds IMAGE cObject

DAM only:

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

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

altText.data = field:title }

see listImage

 
basketImage IMAGE cObject The image configuration in basket display  
datasheetIcon IMAGE cObject / Array of integers (only setup)

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 :

plugin.tt_products.datasheetIcon {

10.fileext = pdf

10.file = fileadmin/img/pdf-icon.png

20.fileext = doc

20.file = fileadmin/img/msword-icon.png

}

 
basketPic string URL link to the basket image  
clickIntoBasket boolean If set you will be directed into the basket page after putting a product into the basket. This only works if PIDbasket has been set.  
clickIntoList boolean 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.  
clickIntoSubmenu boolean

Deprecated. See onlyChildsOfCurrent and rootChildsOfCurrent of the category configuration

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

 
basketMaxQuantity int+ / string

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

'creditpoint': Items can only be put into the basket if the FE user has enough credit points.

100000
quantityIsFloat boolean If set the basket count can be a float value.  
noImageAvailable resource The image file displayed if no image was attached to a product. This image is processed by the IMAGE cObject which is active in the actual display of that image. That is, one of the above IMAGE cObjects.  
displayListCatHeader boolean

Display Category Header in list

If this option is set, the category headers (page titles) will automatically be displayed in the product lists. This is not always convenient because you might have chosen a header-title for the "list" content element.

1
displayBasketCatHeader boolean

Display Category Header in basket.

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

 
displayCatListType string

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.

ul
substitutePagetitle Int+

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

 
displayBasketColumns int+

Deprecated. see table configuration: displayColumns

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

Example:

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

 
CSS see below Cascading Stylesheets settings  
js see below JavaScript settings  
conf see below configurations of the tables  
NoSingleViewOnList boolean Usually you get the link to the single item view on the display page of the LIST code. If you however want to create your own pages for single view with SINGLE code you must set this to 1.  
itemMarkerArrayFunc function-name

Every time a product is displayed be it in the basket, list or single view, the method getItemMarkerArray() in tx_ttproducts_marker is called. This function fills in and returns an array, so called markerArray(), with key/values for template substitution.

If you enter a valid function name here (see datatype 'function-name' for details!) that array will be passed to that function as the second parameter. The first parameter will be the TypoScript properties to itemMarkerArrayFunc.

Parent PHP-Object reference:

.parentObj property is hardcoded to be a reference to the calling user_products object (PHP).

Example:

(provided that a function or class is included!)

itemMarkerArrayFunc = user_addFieldsMarkerArr

itemMarkerArrayFunc.simpleOption = 1

 
PIDitemDisplay int+/Array of integers

PID for single item display.

If you want a certain page to be used for display of item details, please enter the PID (page-uid) here. If you set the type to sql, you can use conditions using several lines. The where string can contain the AND condition. The pid for the first fulfilled condition will be returned.

PIDitemDisplay {

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

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

PIDitemDisplay {

10.type = pid

}

 
PIDlistDisplay int+/Array of integers

PID for the item list display

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

 
PIDsearch int+

PID for search page.

If you want all product searches to go to a specific page, enter the PID it here! NOTE: If you set this PID, all searchqueries will (must) be handled with a list content element with the display mode "Products: search" on that page.

 
PIDbasket int+

PID for the basket page.

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

 
PIDstoreRoot int+

PID for store root.

This is the PID of the rootPage of the store. If not set the store will operate over all pages from the root of the site. But if the site has many pages, performance may improve.

You should better set pid_list instead of it.

 
PID_sys_products_orders int+ PID for the sys_products_orders records. By default they will get the pid of the payment (finalize) page.  
PIDGiftsTable int+ PID for the tt_products_gifts table. The gift orders are stored here.  
PIDinfo int+ PID for the info page where name and address is entered.  
PIDpayment int+ PID for the payment page where name where the address is checked and the order is confirmed by the customer. You could change to a payment gateway from here.  
PIDfinalize int+ PID for the finalization page afther the user has confirmed the order data. The order will get stored here.  
PIDthanks int+ PID for the thanks page. BASKET_ORDERTHANKS_TEMPLATE will be used. You must not set PIDfinalize if you use this.  
PIDtracking int+ PID for the order tracking  
PIDbilling int+ PID for the generation of the bill  
PIDdelivery int+ PID for the generation of the delivery sheet  
PIDmemo int+ The ID of the memo page  
PIDagb int+

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

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

 
PIDrevocation Int+ The PID of a page with the right of revocation.  
PIDuserFolder int+ The sysfolder, where the new users should be stored 116
pidsRelatedProducts int+ Allowed pages for related products.  
pidsAddresses int+ Allowed pages for addresses  
UIDstore int+ comma separated list of UIDs of the tx_party_addresses table (or fe_users) with the data of the shop.  
paymentActivity string When the payment with a payment script shall be executed. Possible values: payment, finalize, verify finalize
advanceOrderNumberWithInteger int+

If this value is set, then each time a new order is created the order-number counter will be incremented with a random number between [first-integer] and [second integer] to cheat a little.

Example:

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

 
alwaysAdvanceOrderNumber boolean If set then the order number will always get increased and the empty order numbers are not reused. You have to set this if you use a payment script to pay via a payment system which does not accept duplicate order numbers.  
alwaysUpdateOrderAmount boolean If set then the entered order amount will always be updated and not increased by the entered number. 1
parseFunc

->parseFunc

not used with

'CSS styled content'

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

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

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

Example:

styles.content.parseFunc
categoryHeader cObject

Generates the category header.

Example:

categoryHeader = TEXT

categoryHeader.current = 1

 
breadcrumb cObject

Generates a breadcrumb line.

Example:

breadcrumb =

 
TAXpercentage double

Sales TAX/VAT percentage.

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

Example:

# Danish sales TAX is 25%:

TAXpercentage = 25.00

 
TAXincluded boolean

Set this, if TAX is included in the database prices! ( ... and of course: Clear this, if TAX is not included in the database prices and should be added in the display of items)

All profieldLinkcessing will take this flag into account and calculate prices accordingly.

1
TAXrates string Comma separated list of tax rates. The first will be taken as tax A, the second as tax B aso.  
TAXmode int+

tax mode

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

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

1
priceDec int+ Price decimals  
priceDecPoint string Price decimal point  
priceThousandPoint string

Price Thousand point

Enter the thousand separator, if any.

 
noZeroDecimalPoint boolean If set then no decimal point is shown for integers.  
priceNoReseller int+ S

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

Example:

[usergroup = 1]

priceNoReseller = 2

[global]

...

 
percentDec int+ Number of shown decimals of percentage values  
percentDecPoint string Percentage decimal point  
percentThousandPoint string

Percentage Thousand point

Enter the thousand separator, if any.

 
percentNoZeroDecimalPoint boolean Percentage: If set then no decimal point is shown for integers.  
currencySymbol string

Currency symbol. Used in shop administration.

Example:

EUR

DKR

USD

$

 
lockLoginUserInfo boolean If set and a user is logged in, the address info of that fe_user gets filled in as billing address of the user. It is not possible to change this data. 1
editLockedLoginInfo boolean If set and lockLoginUserInfo is set, then the filled in data is still editable for the order. You have to set the input HTML tags for this.  
loginUserInfoAddress boolean If lockLoginUserInfo is set, this switch makes that the address field is filled in from address, country, zip and city of the fe_user  
requiredInfoFields list or array of string List of the fields which are re‑quired in the address information This example gives you all possibilities.  
setup  

Example:

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

The subvalues 'billing' and 'delivery' are possible.

Example:

requiredInfoFields.delivery = name,address

 
orderBy string

Deprecated. See Article/Product configuration

Use this instead:

 
orderByCategoryTitle boolean Deprecated. Use this instead:  
orderByItemNumberSg boolean Deprecated. Use this instead:  
orderNumberPrefix string Prefix to the order numbers. Max 10 chars. If this string starts with '%' then the rest will be interpreted as a PHP date format.  
orderEmail 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 :

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

}

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 :

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

}

}

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

SELECT my_table_key_field FROM my_table WHERE my_table_key_field = $content_of_fe_users_key_field;

 
orderEmail_bcc string BCC for the shop admin's order confirmation  
orderEmail_from string From email address for the confirmation email to customer  
orderEmail_fromName string From name for the confirmation email to customer.  
orderEmail_to list of email-addresses Comma separated list of recipients of the order email. Shop and administrator/supervisor email addresses go here!  
orderEmail_toAddress boolean If set, then the order email is sent to all addresses which are connected to the products in the basket.  
orderEmail_radio 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_radio {

1.2 = inform@mytypo3site.de

}

 
orderEmail_toDelivery boolean If set, the email notification will be sent to the delivery email address and not to the billing email address.  
orderEmail_subject string Contents of the subject line if the first line in ###EMAIL_PLAINTEXT_TEMPLATE### is empty.  
orderEmail_returnPath 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 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 string Use these characters as apostrophe in the order email subject.  
orderEmail_order2 boolean 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 boolean If email-notification to the delivery email address of the customer is enabled by default for tracking (he can change it himself in the tracking module later)  
statusCodes Array of integers

Status codes used in the tracking module.

Numbers above 100 removes the order from the tracklist.

Number zero is the status of a non-finalized order (and non-finalized orders in the database may by time be regarded as garbage...)

Numbers of 50-59 is available for the customer to choose from.

Number 1 is reserved to be selected when an order goes from zero to 1 because it's confirmed. Number 1 cannot be selected by shop admin. These will be written into ###STATUS_OPTIONS### markers.

Example:

statusCodes {

1 = Order submitted by user

2 = Order is received and accepted by store

10 = Shop is awaiting goods from third-party

11 = Shop is awaiting customer payment

12 = Shop is awaiting material from customer

13 = Order has been payed

20 = Goods shipped to customer

21 = Gift certificates shipped to customer

30 = Other message from store

50 = Customer request for cancelling

51 = Message from customer to shop

60 = Send gift certificate message to receiver

100 = Order shipped and closed

101 = Order closed

200 = Order cancelled

}

 
update_code string

The 'password' used by the administrator of the shop to go into the tracking system in the front end.

The password form field will appear if a BE_USER is logged in, but this password is still needed.

password
statusDate_stdWrap ->stdWrap

stdWrap for status date

Example:

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

 
orderDate_stdWrap ->stdWrap

stdWrap for the order date

Example:

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

 
usebyDate_stdWrap ->stdWrap stdWrap for the useby date  
cardEndDate_stdWrap ->stdWrap stdWrap for credit card end time date  
displayCurrentRecord boolean

If set, certain settings are manipulated in order to let the script render a single item - the $cObj->data.

If this setting is set, the subpart marked ###ITEM_SINGLE_DISPLAY_RECORDINSERT### will be used instead of the regular subpart ###ITEM_SINGLE_DISPLAY### if it is found.

 
externalProcessing cObject

This cObject may be used to call a function which manipulates the shopping basket. This manipulation could be based on settings in an external order system. The output is included in the top of the order (HTML) on the basket-page.

This cObject is executed each time the main_products method of the user_products class in productsLib is called and it's executed before any of the main processing. See the class for details.

 
externalProcessing_final cObject cObject for the final order confirmation template  
externalFinalizing cObject

This cObject may be used to call a function which clears settings in an external order system. This is a sister to the above function and they should probably be used in conjunction somehow. This function is called immediately after the finalize-function has been called.

For instance this function would be suitable for clearing any external basket facilitated by the .externalProcessing cObject

Note: The output is NOT included anywhere.

 
wrap1 -> stdWrap

Global Wrap 1. This will be splitted into the markers ###GW1B### and ###GW1E###. Don't change the input value by the settings, only wrap it in something.

Example:

wrap1.wrap = <b> |</b>

 
wrap2 -> stdWrap Global Wrap 2 (see above) markers ###GW2B### and ###GW2E###  
wrapInBaseClass

boolean

S

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

boolean

S

If set, then the output will be wrapped by

<!-- START: tt-products-code-uid --><div id="tt-products-code-uid">

|<text:bookmark text:name="line764"/></div><!-- END: tt-products-code-uid -->

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

1
selectColor integer If true the colour of a product is selectable in a select box. 1
selectColor2 integer If true the 2nd colour of a product is selectable in a select box. 1
selectColor3 integer If true the 3rd colour of a product is selectable in a select box. 1
selectSize integer If true the size of a product is selectable in a select box. 1
selectSize2 integer If true the 2nd size of a product is selectable in a select box. 1
selectSize3 integer If true the 3rd size of a product is selectable in a select box. 1
selectDescription integer If true the description of a product is selectable in a select box. 1
selectGradings integer If true the gradings of a product are selectable in a select box. 1
selectMaterial integer If true the material of a product are selectable in a select box. 1
selectQuality integer If true the quality of a product are selectable in a select box. 1
color1 string /stdWrap Value for ###GC1### marker (Global colour 1)  
color2 string /stdWrap Value for ###GC2### marker (Global colour 2)  
color3 string /stdWrap Value for ###GC3### marker (Global colour 3)  
nl2brNote boolean If true the linefeeds in the note field are replaced by <br />. 1
useArticles integer    
keepProductData boolean

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.

1
noArticleSingleView boolean 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. 1
priceTagObj IMAGE cObject Image for the display of the price  
usePriceTag boolean If true, the priceTagObj will be used. If false, the text will be displayed.  
useStaticInfoCountry boolean If true the short fe_users static_info_country field will be used for country instead of the country field.  
useStaticTaxes boolean If true, the tax will be determined from the country and region by the extension static_info_tables_taxes. UIDstore must be set.  
whereGift string This SQL where clause defines which products will be treated as gifts.  
whereGiftService string This SQL where clause defines which products will be treated as gift services.  
max_note_length int+

Deprecated. See Article/Product configuration

Use this instead:

formerly:

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

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

10000
specialPreparation string This text will substitute your ###PRODUCT_SPECIAL_PREP### markers.  
createUsers boolean

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

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

 
useMd5Password boolean

Enable md5 password encryption.

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

 
outputFolder string Folder where the bill and delivery sheets are created. fileadmin/data
memberOfGroup int+ The ID of the frontend user group, the new users should be member of 1
discountGroupName string Name of the group for discount pricecalculation  
getDiscountPrice boolean If set the discount price will be used even for normal customers without having a frontend user in the discount group.  
discountPriceMode 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 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 small The target for the PIDagb link _blank
AGBattachment resource If this file exists, it will be attached to the order confirmation email to the customer. The shop administrator won't receive the agb attachment, but the CSV if you enable it fileadmin/agb.pdf
GiftAttachment resource If this file exists, it will be attached to the order gift email to the customer.  
generateXML boolean 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 resource

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.

../xmlorders/
generateCSV boolean 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 resource

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

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

../csvorders/
CSVfields string Select which product data should be added to the CSV. By default these are all important fields except the note (Long, long list)
CSVinOneLine boolean

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

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

 
CSVnotInEmail boolean If set no csv file will be appended to the email.  
alwaysInStock boolean If set the stock will not get reduced if something has been bought. 1
showNotinStock boolean If set the items will be shown even if no product is in the stock.  
notInStockMessage string See above. This will be shown if no items are in stock and showNotinStock is set. Not in stock
warningInStockLimit int+ Amount of items in stock at which when reached a warning message is sent.  
inStockPieces string This is the unit for items inStock. pieces
newItemDays int+ In LISTNEWITEMS, the newly added items of the last n days will be showed 7
bulkilyWarning string Text for ###BULKILY_WARNING### for bulk goods  
bulkilyAddition int+

See shipping.

Factor to multiply with a product which is bulkily

 
bulkilyFeeTax int+

See shipping.

Tax fee in percent for shipping of bulkily

 
javaScript array of integers

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

Example:

javaScript {

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

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

}

 
payment / shipping (see below)

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

See description below!

 

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

Display Modes (CODE) 

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

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

Display Mode: CODE: Description:
Products: list LIST isting 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 listing 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. It can be ALL, if it is valid for all views.

Views correspond to the code field:

  • SINGLE
  • LIST
  • BASKET

additional possible values are

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

Example:

generatePath
plugin.tt_products.conf.tt_products_articles.LIST.generatePath.base = fileadmin/images
plugin.tt_products.conf.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 :file: 41000_1.jpg . A product will have multiple images if there are more files with a similar file name, e.g. :file: 41000_2.jpg .

Example:

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

    separator = _
}

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

field
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 FE 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.

Example:

searchform for the shop
plugin.tt_products.form.SEARCH.data.name = ShopSearchForm
Copied!
Property: Data type: Description: Default:
data string/->stdWrap

This is the data that sets up the form.

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

depends on codefield
dataArray [array of form elements]

Every entry in the dataArray is numeric and has four main properties, label , type , value and required . 'label' and 'value' have stdWrap properties.

params ... Put additional parameters here.

Example:

form.SELECTAD.dataArray {

10.label =

10.type = tt_products[address]=select

10.params = onchange="submit();"

}

Enhancement for the selection of variants with selectColor, … specification.

form.ALL.selectColor.dataArray {

10.params = onchange="submit();"

}

 
image IMAGE Image to display.  
imageImport array of fields

Fetch the images corresponding to values.

Example:

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

}

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

<tr><td>###INPUT###</td><td>###IMAGE###</td></tr>

 
panel array of string

only for ORDERS.

Inserts a panel with various clickable buttons.

Example:

form.ORDERS.panel.input.10 {

marker = button1

label = Sort by title:

name = Button1

params =

}

 

Control configuration 

Setup only.

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

Example:

plugin.tt_products.control.LIST.param 

Example:

control.LIST.param
plugin.tt_products.control.LIST.param {
    ignore = pp
}
Copied!

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 not show 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
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. 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 configuration 

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 :typoscript'radio is true, this string is the 'template' layout for the radio items.

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 linew

multiple linew
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 = EXT:tt_products/pi1/products_comp_calcScript.inc

30.title = By mail
30.image.file = typo3/sysext/cms/tslib/media/logos/postdanmark.gif
30.price = 40
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 = 2010
          10.value = 2010
          20.label = 2011
          20.value = 2011
          30.label = 2012
          30.value = 2012
          40.label = 2013
          40.value = 2013
      }
 }
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 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 'transactor' here to use the Payment Transactor Library Extension.

array values: extName: name of the specific Payment Library (SPL) extension paymentMethod: method of the SPL (e.g. paymentlib_transcentral_cc_mastercard) 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: .. code-block:: typoscript :caption: excludePayment for pickup in store

40.title = China 40.replacePayment.10.title = Payment with China 40.replacePayment.10.price = 100

. _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 frontend 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 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: 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 sysfoldepaymentActivityr of this PID. Where 155 is the PID and 7.5 is the minimum price taken for shipping costs when at least one product in the basket comes from the page with that PID.

Example:

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 with where
discountprice.50 {
    type = count
    sql.where = color = 'rot'
    prod.type = percent
    prod.0 = 6
}
Copied!

Example:

discount price calculation with 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: count: the products count (pricecalc and 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 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.

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!

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: pid: a list of page ids email: a list of email addresses

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: .. code-block:: typoscript :caption: automatice generation of a bill

plugin.tt_products.bill {
generation = auto

}

plugin.tt_products.delivery {
generation =

}

type

type
Type
string
Required

true

Type of bill or delivery html: HTML format pdf: PDF format (extension '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: bill.handleLib = PhpWord

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: .. code-block:: typoscript :caption: automatice generation of a bill by PhpWord

bill.handleLib = PhpWord bill.handleLib { path = PHPWord-master rendererLibrary { path = dompdf-0.6.1 } }

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 file pi1/locallang.xml contains the list of tags for the error messages.

redirect

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

Known problems 

General: 

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 

Important 

You have to rename the marker ###FIELD_NAME### to ###FIELD_NAME_BASKET### in the BASKET_TEMPLATE.

Some of the TypoScript settings do not function via the constants field and must be entered in the setup field. Only those settings which can be found using the Constants Editor or in the file "static/css_styled/constants.txt" are valid constants. You must include the "Shop System CSS Styled" into your "static template records" of your TYPO3 template.

A negative value of a product at "in stock" does not have any more a special function. This has been replaced by a checkbox "always on stock".

Change the former input fields for a search into

search term entry
<INPUT size="30" maxlength="100" type="text" name="sword" value="###SWORD###">
Copied!

The marker ###SWORDS### must be changed into ###SWORD###, and the name attribute into "sword".

Template files 

You need to make the following settings in the template files for the shop so it will work:

<input type="hidden" name="mode_update" value="1">

<input type="submit" name="products_update" value="update basket">

Put this into your FORM html of the BASKET_TEMPLATE.