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

Matthias Kurz mk at mediamachine.de
Fri Feb 10 13:39:50 CET 2006


Simon Tuck wrote:
> 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...
Hi Simon,
thank you so much for gently putting me on the right track. I'll go for 
the proper way. I owe you a drink for this hint!
Cheers, Matthias



More information about the TYPO3-english mailing list