|
|||||||
| Registrieren | Hilfe | Benutzerliste | Kalender | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren |
|
#1
|
|||
|
|||
|
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 _______________________________________________ TYPO3-project-tt-products mailing list TYPO3-project-tt-products (AT) lists...netfielders.de http://lists.netfielders.de/cgi-bin/...ct-tt-products |
|
#2
|
|||
|
|||
|
Hello,
as I got no answer in German tt_products forum, I now start a try in this list: Because I need some extra fields for a bookshop, I started writing an extension based on tt_products. 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. I'm not really experienced in TYPO3 (a few month), but in PHP and SQL and Joomla, for which I wrote some project specific extensions. Thanks in advance for your help. Petra Arentzen _______________________________________________ TYPO3-project-tt-products mailing list TYPO3-project-tt-products (AT) lists...netfielders.de http://lists.netfielders.de/cgi-bin/...ct-tt-products |
|
#3
|
|||
|
|||
|
Franz Holzinger wrote:
> 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']; Hello Franz, thank you for answering my question. I just had only time for quick test ing your solution and it seems to work ![]() Greetings Petra _______________________________________________ TYPO3-project-tt-products mailing list TYPO3-project-tt-products (AT) lists...netfielders.de http://lists.netfielders.de/cgi-bin/...ct-tt-products |
|
#4
|
|||
|
|||
|
Hello,
while applying Franz' solution another question encounters: The content of my own markers depends on content of other fields which are deposed in tt_products.additional, which is a flexform field. Also I've dumped a lot of stuff I can't figure out how to access these flexform fields. Can anybody give me tip/ a little snippet of code? Thanks in advance Petra P. Arentzen schrieb: > > Hello Franz, > > thank you for answering my question. I just had only time for quick test > ing your solution and it seems to work ![]() > > Greetings > > Petra _______________________________________________ TYPO3-project-tt-products mailing list TYPO3-project-tt-products (AT) lists...netfielders.de http://lists.netfielders.de/cgi-bin/...ct-tt-products |
|
#5
|
|||
|
|||
|
Hello Petra,
> > while applying Franz' solution another question encounters: > > The content of my own markers depends on content of other fields which > are deposed in tt_products.additional, which is a flexform field. > > Also I've dumped a lot of stuff I can't figure out how to access these > flexform fields. > > > Can anybody give me tip/ a little snippet of code? > see model/class.tx_ttproducts_product.php: function hasAdditional(&$row, $check) { $hasAdditional = false; $additional = t3lib_div::xml2array($row['additional']); $hasAdditional = $this->pibase->pi_getFFvalue($additional, $check); return $hasAdditional; } - Franz _______________________________________________ TYPO3-project-tt-products mailing list TYPO3-project-tt-products (AT) lists...netfielders.de http://lists.netfielders.de/cgi-bin/...ct-tt-products |
| Lesezeichen |
| Themen-Optionen | |
| Ansicht | Thema bewerten |
|
|
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| [TYPO3-shop] shipping costs for first item / each additional item | John Nicholas | typo3-project-tt-products@lists.netfielders.de | 0 | 01.05.2008 21:57 |
| [TYPO3-shop] Table error!,Probably one or more required fields/tables are missing in thedatabase! | Kate Schrøder Jensen | typo3-project-tt-products@lists.netfielders.de | 5 | 02.04.2008 13:31 |
| Re: [TYPO3-shop] SingleView-query - 3 extra database-fields | Daniel Brüßler | typo3-project-tt-products@lists.netfielders.de | 1 | 21.07.2007 12:22 |
| [TYPO3] Templavoila and additional where clause | âÏÊÞÕË ðÅÔÒÏ | typo3-english@lists.netfielders.de | 2 | 18.07.2007 10:46 |
| Re: [TYPO3-dev] How to add additional checkboxtoallContentandRecord-Elemets | Stefan Bothner | [m]zentrale | typo3-dev@lists.netfielders.de | 0 | 15.05.2007 10:35 |