Articles, Products, Categories, Pages, Addresses and Images
Setup only.
The last but one/two value will be the name of the view.
ALL means it is valid for all views.
Views correspond to the code field:
SINGLELISTBASKET
Additional possible values are
EMAILPAYMENTLISTRELATED(LISTfor related products)
Example:
plugin.tt_products.conf {
tt_products_articles.LIST.generatePath.base = fileadmin/images
tt_products.LIST.orderBy = sorting
}
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 codesALL.generatePath { type = tablefields base = fileadmin/images field.itemnumber = 2 }Copied!
generateImage
-
- Type
- array of string
- Required
true
Pairs of field names and the count of the first characters to be used to form the name of the image file.
- type: tablefields, foreigntable (for field of another table)
- prefix: a prefix to the image filename
- field.fieldname: name of the table field*
- separator: separator in the filename between the
- matched beginning of the filename and the end part of the filename.
- table: use another table and its configuration to get the image
- uid_local: use the value of this local field of the current table
- uid_foreign: use this field of the foreign table to find a match
The file names will be like
41000_. A product will have multiple images if there are more files with a similar file name, e.g.1. jpg 41000_.2. jpg Example:
select the image by filenamesALL.generateImage { type = tablefields field.itemnumber = 6 separator = _ }Copied!Example:
select the image path by the article tableALL.generateImage { type = foreigntable table = tt_products_articles uid_local = uid uid_foreign = pid field.itemnumber = 6 separator = _ }Copied!
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
P1and the third part001form the marker. So the marker will be###CATEGORY_.IMAGE_ P1_ 001### Example:
select the image by filenamesALL.imageMarker { type = imagename parts = 2,3 }Copied!
limit
-
- Type
- int+
- Required
true
- Default
- 50
The maximum number of items displayed on a list view.
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 viewsplugin.tt_products.conf.tt_products.ALL.limitImage = 10Copied!
orderBy
-
- Type
- string
- Required
true
- Default
- sorting
List of the fields by which the items will be ordered.
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_contentplugin.tt_products.conf.tt_products.ALL.fetchImage { type = foreigntable table = tt_content }Copied!
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 translationsplugin.tt_products.conf.tt_products_cat.ALL.language { type = field field.title = subtitle }Copied!
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 cObectplugin.tt_products.conf.tt_products.ALL.image.m { wrap = |<br /> file.maxW = 320 file.maxH = 280 }Copied!
joinedImagesWrap
-
- Type
- stdWrap
Wrap around all images. separateImage must be 0. This will be wrapped around the HTML output of the joined images.
Example:
joinedImagesWrapjoinedImagesWrap.wrap = <div id=”myimageid”> |</div>Copied!
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:
joinedImagesWrapfilter { 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
-
- 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
-
- Type
- array
You have to adapt your template using special template markers. The
ITEM_andSINGLE_ PRE_ HTML ITEM_must surround yourSINGLE_ POST_ HTML <TD>-</tags, so the table will be created correctly. The first number is the order in the category hierarchy.TD> Example:
display columns 3 on first category leveldisplayColumns { 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
-
- 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 leveldisplayHeader { 1 = always }Copied!
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
-
- 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:
joinedImagesWrapspecial { all = 1 }Copied!Table
tt_: This will display the products of all categories if the parameterproducts_ cat tt_isproducts [cat] = 1' max_. So instead of listing the products of category 1 all products of all categories will be listed.note_ lengthset
onlyChildsOfCurrent
-
- Type
- boolean
If set, the child items (e.g. subcategories) will only be displayed for the current item (category).
rootChildsOfCurrent
-
- Type
- boolean
If set, the child items of the currently selected item will be shown on the root level.
field
-
- Type
- array of cObject
Use
cfor the display of some fields. By default the field's contents are printed as is. Only the image field is used to draw anObjects IMAGE. Useuntouched=1to get the original value (might be needed for the note field).Example:
fieldfield { title = COA title { untouched = 0 10 = TEXT 10.value = ###PRODUCT_TITLE### in sizes ###PRODUCT_SIZE### 10.wrap = Title: - | - } }Copied!
controlFields
-
- Type
- array of string
- Default
- newItemDays -> starttime
newitemdays ... name of the field to use with the newItemDays function
Example:
fieldcontrolFields { newItemDays = starttime }Copied!
displayFields
-
- Type
- array of string
Definitions how to display some fields.
Example:
fielddisplayFields { note = RTEcssText }Copied!
fieldLink
-
- Type
- array of typolink
Example:
fieldconf.tt_products.ALL { fieldLink { datasheet.ATagParams=class="datasheetClass" } }Copied!
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:
fieldfe_users { date_of_birth.period.y = 12 where = uid IN (12, 24) }Copied!
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:
fieldview.sortSelect { 1 { label = sort by type = select attribute { onchange=submit(); } valueArray { 10.label = title 10.value = 1 10.field = title } } }Copied!Example:
fieldview.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
-
- 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.
- show:
Example:
fieldsubpart.ITEM_CATEGORY { show = default }Copied!
marks
-
- Type
- array
Self defined markers for the record.
Example:
table based markersmarks { mymarker = COA mymarker { 10 = TEXT 10.value = ###PRODUCT_TITLE### in sizes ###PRODUCT_SIZE### 10.wrap = Title: - | - } }Copied!
tagmark (only categories in LIST)
-
- Type
- array
defines how the marker
###CATALLTAGS###is filled with the tags of the categories.Example:
tag markertagmark { parents = 1 prefix = cat }Copied!
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
-
- Type
- boolean
If true then a plugin is hidden if no category parameter with a uid is given.
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.