TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv

TYPO3 Mailingliste: nicht fragen - lesen!

TYPO3 Mailingliste: nicht fragen - lesen!_RR_1-->
Zurück   TYPO3Jack.net - Das TYPO3 Mailinglist Forum Archiv > TYPO3-Mailinglists: ENGLISH > typo3-project-tt-products@lists.netfielders.de

Registrieren Hilfe Benutzerliste Kalender Suchen Heutige Beiträge Alle Foren als gelesen markieren
  #1  
Alt 03.06.2008, 14:18
Franz Holzinger
Gast
 
Beiträge: n/a
Standard Re: [TYPO3-shop] additional fields

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #2  
Alt 03.06.2008, 15:20
P. Arentzen
Gast
 
Beiträge: n/a
Standard [TYPO3-shop] additional fields

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #3  
Alt 06.06.2008, 16:24
P. Arentzen
Gast
 
Beiträge: n/a
Standard Re: [TYPO3-shop] additional fields

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #4  
Alt 07.06.2008, 14:48
P. Arentzen
Gast
 
Beiträge: n/a
Standard Re: [TYPO3-shop] additional fields

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
  #5  
Alt 10.06.2008, 17:34
Franz Holzinger
Gast
 
Beiträge: n/a
Standard Re: [TYPO3-shop] additional fields

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Wong this Post!Spurl this Post!Reddit! Diesen Post bei linksilo.de bookmarken!
 

Lesezeichen

Themen-Optionen
Ansicht Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an


Ähnliche Themen

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


Alle Zeitangaben in WEZ +1. Es ist jetzt 23:02 Uhr.


Powered by vBulletin® Version 3.7.4 (Deutsch)
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
Template-Modifikationen durch TMS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77