Typo3 Mailarchive typo3_english typo3_dev


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[TYPO3] Extending shop (tt_products) 2.4.1 with new fields and markers


  • From: e-mailNO at SPAMeyejet.com (Simon Tuck)
  • Date: Thu, 09 Feb 2006 16:42:39 +0100

Matthias Kurz wrote:
> Hi list,
> It might be answered somewhere, but I just cannot find it: What is the 
> best strategy to extend the tt_products extension with news fields?
> 
> Thanks, Matthias
Hi Matthias,
Unfortunately there is no easy way, or rather, you can't do it without some 
fairly advanced knowledge of T3. Basically there are two approaches, 
the 'proper way' and the 'quick and dirty way'. The quick and dirty way is to 
hack the extension according to your requirements. The proper way 
is as follows:

[1.] Create an extensions which adds your additional fields to the relevant 
tt_products tables using the kickstarter.

[2.] Add the following hook to your extensions ext_localconf.php file:
$TYPO3_CONF_VARS['EXTCONF'][TT_PRODUCTS_EXTkey]['extendingTCA'][] = $_EXTKEY;

[3.] Use the hook 'getItemMarkerArray' in tt_products to render your additional 
fields:
[3a.] Create your custom script to render these additional fields, e.g. 
path/to/my/script/filename.php
The function you can hook looks like this:
function getItemMarkerArray ($pObj, &$markerArray, $item, $catTitle, 
$tt_products, $tt_content, $imageNum, $imageRenderObj, $forminfoArray)
[3b.] Add your script to the tt_products hook in your extensions 
ext_localconf.php file:
$TYPO3_CONF_VARS['EXTCONF'][TT_PRODUCTS_EXTkey]['getItemMarkerArray'][] = 
'path/to/my/script/filename.php:&my_custom_class';

Cheers,
Simon

PS. Try the tt_products mailing list for most questions relating to 
tt_products...