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 18.12.2006, 17:19
Gast
 
Beiträge: n/a
Standard [TYPO3-shop] how to list related products in list view - LIST code

Hello ...

In single view, I list related products of current product, this is OK

But how can I list related products in the list view ( LIST code I would
to list products and their related products.

File : tt_products/view/class.tx_ttproducts_list_view.php

Near Line 647 ... just before this comments :

// cuts note in list view


I tried ...


// --> add by ingabs
// get related products

// query to get related prdouct of $row['uid'] product

$relatedIds = '';

$TYPO3_DB->exec_SELECTquery('tt_products_related_products_pr oducts_mm.uid_foreign',
'tt_products_related_products_products_mm,tt_produ cts',
'tt_products.deleted=0 AND tt_products.hidden=0 AND
tt_products_related_products_products_mm.uid_local
='.intval($row['uid']).'');

while($row_related = $TYPO3_DB->sql_fetch_assoc($res_related)) {
if(false===strpos($relatedIds,$row_related['uid_foreign'])) $relatedIds .=
$row_related['uid_foreign'].',';
}

debug($relatedIds);

// ok, here I get the correct id of the related products


// try to list them

if ($relatedIds != '') {
// List all products:

include_once (PATH_BE_ttproducts.'view/class.tx_ttproducts_list_view.php');

$listView = t3lib_div::makeInstance('tx_ttproducts_list_view') ;

$listView->init(
$this->pibase,
$this->cnf,
$this->basket,
$this->page,
$this->tt_content,
$this->tt_products,
$this->tt_products_articles,
$this->tt_products_cat,
$this->fe_users,
$this->pid,
$this->LLkey,
$this->useArticles
);

//debug($listView);

// get markers

$templateArea = '###ITEM_LIST_RELATED_TEMPLATE###';
$tmpContent = $listView->printView(
$templateCode,
'LIST',
explode(',', $relatedIds),
$error_code,
$templateArea2,
$this->pibase->pageAsCategory
);

$markerArray['###PRODUCT_RELATED_UID###'] = $tmpContent;

debug($tmpContent);

// gives nothing, only "debug" !!!


} else {
$markerArray['###PRODUCT_RELATED_UID###'] = '';
}

// --> end ingabs


Thank you.

Ingabs


_______________________________________________
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] order list Andrea Giorgini typo3-project-tt-products@lists.netfielders.de 3 21.12.2006 10:31
[TYPO3] tt_news: LIST always shows all the news already Cyrill Helg typo3-english@lists.netfielders.de 0 15.12.2006 09:40
Re: [TYPO3-shop] related products Franz Holzinger typo3-project-tt-products@lists.netfielders.de 0 06.12.2006 15:21
Re: [TYPO3-dev] List of modifications for TemplaVoila Martin Kutschker typo3-dev@lists.netfielders.de 4 04.12.2006 11:23
Re: [TYPO3-shop] Reducing LIST view => Showing only products withspecific values? Franz Holzinger typo3-project-tt-products@lists.netfielders.de 0 03.12.2006 14:31


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:08 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