[TYPO3-shop] [Typo3-shop] Problem extending tt_products

Franz Holzinger franz at fholzinger.com
Tue May 23 07:21:10 CEST 2006


Hello Katharina Z.,

> 
> But still the fields did not show up. I found out that the new fields
> have to be added to the 'palettes' array in file tca.php of tt_products:
> 
> 'palettes' => Array ( ....
> 
> ONLY when I add my fieldnames here the fields are displayed in the edit
> page in the BE Module. This is a bit unhandy because it means that this
> additions will have to be done manually each time tt_products is
> updated. Is there no better way to extend tt_products?


You have to do something like this:



$tempColumns = Array (
	'tx_customproducts_extrafield' => Array (
		'exclude' => 1,
		'label' =>
'LLL:EXT:'.CUSTOM_PRODUCTS_EXTkey.'/locallang_db.php:tt_products.tx_customproducts_extrafield',
		'config' => Array (
			'type' => 'input',
			'size' => '30',
			'max' => '256'
		)
	),
);


t3lib_div::loadTCA('tt_products');

t3lib_extMgm::addTCAcolumns('tt_products',$tempColumns,1);
t3lib_extMgm::addToAllTCAtypes('tt_products','tx_customproducts_extrafield;;;;1-1-1');

You have to put each field you want to add into $tempColumns and into
the line addToAllTCAtypes in ext_tables.php.




Greets,

Franz H.



More information about the TYPO3-project-tt-products mailing list