[TYPO3-shop] additional fields
Franz Holzinger
franz at fholzinger.com
Tue Jun 3 14:18:47 CEST 2008
P. Arentzen a écrit :
> As I do not like code changes in other extension I'm searching for a way
> to show the content of these newly created fields by using template
> markers.
>
> But the only hook I found is called in
> tx_ttproducts_marker::getGlobalMarkers, but at this point there is no
> relation to the product to show.
>
> It would be kind, if somebody can give me a tip or just a hint where to
> start.
>
> To make it clear here's my example
>
> Name of extension: user_bookshop
> field name in table products: user_bookshop_isbn
>
> So I assumed marker name should be ###PRODUCT_USER_BOOKSHOP_ISBN###,
> which I did not got to work.
>
> I'm using tt_products 2.5.6.
You should add these line into your ext_localconf.php file:
$TYPO3_CONF_VARS['EXTCONF']['tt_products']['PRODUCT'][] =
'EXT:user_bookshop/hooks/class.user_ttproducts_product.php:user_ttproducts_product';
$TYPO3_CONF_VARS['EXTCONF']['tt_products']['extendingTCA'][] =
'user_bookshop';
And your file class.user_ttproducts_product.php will have
class user_ttproducts_product {
...
function getItemMarkerArray (&$parent, &$markerArray, $item, $catTitle,
$imageNum, $imageRenderObj, $forminfoArray, $theCode, $id) {
$row = &$item['rec'];
$markerArray['###PRODUCT_USER_BOOKSHOP_ISBN###'] =
$row['user_bookshop_isbn'];
...
}
- Franz
More information about the TYPO3-project-tt-products
mailing list