Login / Status
developer.Resource
Home . Documentation . Document Library . Extension Manuals
Sponsors
hosted by punkt.deTYPO3 and Open Source MagazineAOE Media

1.5. 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).

Activate now the flexforms in the backup. The code field will be replaced by a graphical user interface. However you have to reenter all your code fields.

$TYPO3_CONF_VARS['EXTCONF']['tt_products']['useFlexforms'] = 1

Installation

Install the extension with the extension manager. If you already use an older version of tt_products that's installed in the “global” location (typo3/ext/), it's 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 Online Repository with the Extension Manager. Then use the Extension Manager's "Available extensions to install" and add the Shop system again.

This extension works best in union with static_info_tables, sr_feuser_register, rtehtmlarea and conf_userts.

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 do 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 an enhanced 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 list DAM images.

Example of tt_products/ext_localconf.php:

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

Handling of Images

There are ways to use and display the infos about images of the DAM extension.

Important

This should be fully downwards compatible to the former tt_products 1.2.7. But it needs some adaption to the template file. In ###BASKET_TEMPLATE### you must have the lines

<input type="hidden" name="mode_update" value="1"> 
<input type="Submit" name="products_update" value="update basket"> 

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

This is compatible with zk_products 1.3.2.

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/old_style/constants.txt are valid constants. You must include the 'Shop System Old Style' 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

<INPUT size="30" maxlength="100" type="text" name="sword" value="###SWORD###">

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

Template files

In your template files for the shop you need to make the following settings 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-attributes of the BASKET_TEMPLATE.

Template markers

The following template markers for the tmpl-file are used. You have to put ### before and after them. There are more markers, so look into the example template files.

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:

<!--###LINK_DATASHEET###> datasheet for the product <!--###LINK_DATASHEET###>

Marker:

Type:

Description:

Area:

BROWSE_LINKS

for browsing the display list over several pages

DELIVERYCOSTS

value

sum of delivery costs and payment costs

DELIVERY_...NOTENOTE_DISPLAYDESIRED_DATE

value

see also PERSON_...

input field note for orderoutput field note with <br> instead of linebreaksdesired 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 colors

all

GW1B, GW2B, GW1E, GW2E

wrap

global wraps

all

PRICE_TAX

PRICE_NO_TAX

PRICE_ONLY_TAX

PRICE2_TAX

PRICE2_NO_TAX

PRICE2_ONLY_TAX

value

price/price2 of the item with, without and only VAT

ITEM_SINGLE

PRICE_TOTAL_TAX

PRICE_TOTAL_NO_TAX

PRICE_TOTAL_ONLY_TAX

value

total sum of the items with shipping and payment costs

all

PRICE_GOODSTOTAL_TAX

PRICE_GOODSTOTAL_NO_TAX

PRICE2_GOODSTOTAL_TAX

PRICE2_GOODSTOTAL_NO_TAX

value

total sum ot the items for price or price2

all

LINK_BASKET

wrap

link to the basket page

basket

LINK_DATASHEET

wrap

link to the datasheet file in uploads/tx_ttproducts/datasheet

ORDER_STATUS_TIME,

ORDER_STATUS, ORDER_STATUS_INFO, ORDER_STATUS_COMMENT

value

order values

TRACKING_DISPLAY_INFO

PERSON_...NAME,ADDRESS,TELEPHONE,

FAX,EMAIL,

COMPANY,

CITY,

ZIP,

STATE,

COUNTRY

value

address information fieldshave to be connected with a prefixPERSON_...  the customer of the order

DELIVERY_... the recipient of the order

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

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 frontend 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 the address field for the name of the street and the housenumber and additional fields for the ZIP, city and country, then you have to set 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 country. This is useful to make a select box for the country.

Product properties:

Color, Size, Additional and Gradings

To enter variants of products you have to separate the values by a semicolon. So for t-shirts with different color and size enter "red;green;blue" in variant1 and "S;X;XL;XXL" in variant2.Color (Variant 1) and Size (Variant 2): enter here values with title and values separated by semicolon ';' like

M;L;XL;XXL

Change the template to support this:

  <!-- ###display_variant1### -->
  ###GW2B### Color: ###GW2E### <SELECT style="font-size: 10px"
  name="###FIELD_COLOR_NAME###" rows="1">###PRODUCT_COLOR###</SELECT><br>
  <!-- ###display_variant1### -->
  <!-- ###display_variant2### -->
  ###GW2B### Size: ###GW2E### <SELECT style="font-size: 10px"
  name="###FIELD_SIZE_NAME###" rows="1">###PRODUCT_SIZE###</SELECT><br>  <!-- ###display_variant2### -->

If you do not make colors or size selectable, you have to set selectColor or selectSize to 0 and only use the ###PRODUCT_COLOR### and ###PRODUCT_SIZE### markers and within the template itself delete the corresponding ###display_variant### marker. You can, however, use markers as representations of the colors, also if no different colors can be chosen.

The field name of all the fields in the list view and the basket view will be addressed with the marker ###FIELD_NAME###. The markers will be internally replaced in shop through a field name with which the field can be chosen and attributed correctly.

When you have products with different mixes of colors, sizes, and gradations, then you must replace the notation ###FIELD_NAME#### in the field BASKET_TEMPLATE with the notation ###FIELD_NAME_BASKET###.

In the list view of the web module, you can now complete the readily available items with the variant, for example color. For that purpose, you select the table product article.

You must set useArticles=1 in the template setup in order to apply the article attributes/properties.

When you have prepared products, having arranged product qualities of different color, you use only one article number and one price, etc. for this product. However, when you need, for example, different colors, different article numbers, and perhaps prices, etc then this arrangement occurs in the article property (web module, list, product article table). The advantage is that you do not need to create a completely "new" product. The default quality will be transmitted. You only give the color a new article number and a new price. All other product statements will be accepted. Leave a field empty so the default product quality field content will be accepted.

It makes a differene, if an article with different colors or sizes in the product list or shopping cart can be selected. A color or size normally will be chosen by way of a selection box. The quantity for the first color/size will be indicated in the product list. The products in all variables will be, however, individually listed. The lists of products in the basket and in the payment page are, therefore, nearly the same, but will be handled otherwise/differently. You must deactivate selectSize and selectColor whenever you do not want to have selection boxes in the product list.

Weight, bulk and special preparation

Each product can have weight (kg) and bulkily (Yes/No). The total weight is calculated and can be used in the price calculation for the shipping costs.

If an item has been marked as 'bulkily' then a warning message will be displays ('bulkilyWarning' in setup). By setting 'bulkilyAddition' in setup you can add an additional shipping price for this bulkily item.Special preparation does generally not have a function. Only a marker (like with BulkilyWarning) will be written. You can set here a link to the mail form page. Example:

specialPreparation = special preparation is possible! 
<A HREF="?id=999&tt_products=###PRODUCT_ID###">Order here</A>. 

Basic stock management

The field inStock can be used for a stock administration. If "in stock" is at "0", the item will not be visible for the customers any more. After each order the number of the ordered items will be erased from "in stock".

If a new item gets created, its number will be set to '1' by default. If you have set 'alwaysInStock=1' then this item will always be available and visible. Otherwise the number of products will be reducted with each order.

You can fill in the checkbox for each product to have it always in stock.You can define the unit on the store by "inStockPieces" like "pieces".

Several tax rates

Each item can have its own tax. But you have to enter this separately for each item.