TYPO3-Testaccount
Testen Sie die aktuellste TYPO3-Version kostenlos und unverbindlich für einen Monat!

Jetzt testen!

Schulungen

jetzt buchen

tt_products, realurl und backPID


Autor Nachricht
Verfasst am: 19. 12. 2008 [10:38]
Michaelh74
Dabei seit: 16.11.2004
Beiträge: 1509
Das Problem ist, dass tt_products trotz des Eintrags plugin.tt_products.PIDlistDisplay=XY die backPid im Link übergibt, wenn man nicht mit Kategorien arbeitet.

Mit folgender Änderung kann man Einstellen, dass bei gesetzter PIDlistDisplay der backPid Parameter nicht mehr im Link übergeben wird.
Vers. 2.6.0
view/class.tx_ttproducts_list_view.php

Dort bei ca. Zeile 777 statt:
PHP
$bUseBackPid = true;
if ($piVarCat)	{
	if ($this->conf['PIDlistDisplay'])	{
		$bUseBackPid = false;
	}
	$cat = $piVarCat;
}


das hier:
PHP
if ($this->conf['PIDlistDisplay'])	{
    $bUseBackPid = false;
} else {
    $bUseBackPid = true;
}
if ($piVarCat)	{
    $cat = $piVarCat;
}


Vielleicht hilft es ja dem ein oder anderen...

Gruß
Michael
Profil
Verfasst am: 19. 12. 2008 [12:27]
danton
Dabei seit: 21.09.2006
Beiträge: 150
hi
gibt es mitlerweile eine "saubere" Lösung wie man RealURL zusammen mit tt_products konfiguriert?

es gibt eine tt_products definition.
siehe www.typo3.net/forum/list/list_post//85070/?page=1#pid313193

gruß danton
Profil
Verfasst am: 17. 02. 2009 [12:55]
MathiasReiche
Dabei seit: 17.02.2009
Beiträge: 8
Ich habe jetzt alle möglichen Varianten ausprobiert, die ich bisher hier und über google gefunden habe. Die Darstellung der Kategorien durch realurl funktioniert erstmal. Nur das Unterdrücken der backPID nicht.

Meine Aktuelle Konfiguration der realurl:
PHP
<?php
 
/**
 *
 * aeUrlTool default realurl configuration
 * based on realurl-configuration of news.typo3.org
 * 	http://news.typo3.org/about/realurl-configuration/
 *
 */
 
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array ( 
    '_DEFAULT' => array (
        'init' => array (
            'enableCHashCache' => '1',
            'appendMissingSlash' => 'ifNotFile',
            'enableUrlDecodeCache' => '1',
            'enableUrlEncodeCache' => '1',
        ),
        'redirects' => array (
        ),
        'preVars' => array (
            '0' => array (
                'GETvar' => 'no_cache',
                'valueMap' => array (
                    'nc' => '1',
                ),
                'noMatch' => 'bypass'
            ),
            '1' => array (
                'GETvar' => 'L',
                'valueMap' => array (
                    'de' => '0',
                    'en' => '1',
                ),
                'noMatch' => 'bypass',
            ),
            '2' => array (
                'GETvar' => 'lang',
                'valueMap' => array (
                    'de' => 'de',
                    'en' => 'en',
                ),
                'noMatch' => 'bypass',
            ),
/*            '3' => array (
                'GETvar' => 'backPID',
                'valueMap' => array(
                    'dummy' => '1',
                ),
                'noMatch' => 'bypass',
            ),*/
        ),
        'pagePath' => array (
            'type' => 'user',
            'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
            'spaceCharacter' => '-',
            'languageGetVar' => 'L',
            'expireDays' => '7',
            'rootpage_id' => '46',
        ),
        'fixedPostVars' => array (
        ),
        'postVarSets' => array (
            '_DEFAULT' => array (
                'archive' => array (
                    '0' => array (
                        'GETvar' => 'tx_ttnews[year]',
                    ),
                    '1' => array (
                        'GETvar' => 'tx_ttnews[month]',
                        'valueMap' => array (
                            'january' => '01',
                            'february' => '02',
                            'march' => '03',
                            'april' => '04',
                            'may' => '05',
                            'june' => '06',
                            'july' => '07',
                            'august' => '08',
                            'september' => '09',
                            'october' => '10',
                            'november' => '11',
                            'december' => '12',
                        ),
                    ),
                ),
                'browse' => array (
                    '0' => array (
                        'GETvar' => 'tx_ttnews[pointer]',
                    ),
                ),
                'select_category' => array (
                    '0' => array (
                        'GETvar' => 'tx_ttnews[cat]',
                    ),
                ),
                'article' => array (
                    '0' => array (
                        'GETvar' => 'tx_ttnews[tt_news]',
                        'lookUpTable' => array (
                            'table' => 'tt_news',
                            'id_field' => 'uid',
                            'alias_field' => 'title',
                            'addWhereClause' => ' AND NOT deleted',
                            'useUniqueCache' => '1',
                            'useUniqueCache_conf' => array (
                                'strtolower' => '1',
                                'spaceCharacter' => '-',
                            ),
                        ),
                    ),
                    '1' => array (
                        'GETvar' => 'tx_ttnews[swords]',
                    ),
                ),
                // product categories
                'categories' => array(
                    array(
                        'GETvar' => 'tx_ttproducts_pi1[cat]',
                        'lookUpTable' => array(
                            'table' => 'tt_products_cat',
                            'id_field' => 'uid',
                            'alias_field' => 'title',
                            'addWhereClause' => ' AND NOT deleted',
                            'useUniqueCache' => 1,
                            'useUniqueCache_conf' => array(
                                  'strtolower' => 1,
                                  'spaceCharacter' => '-',
                            ),
                        ),
                    ),
                ),
                // products
                'products' => array(
                    array(
                        'GETvar' => 'tx_ttproducts_pi1[product]',
                        'lookUpTable' => array(
                            'table' => 'tt_products',
                            'id_field' => 'uid',
                            'alias_field' => 'title',
                            'addWhereClause' => ' AND NOT deleted',
                            'useUniqueCache' => 1,
                            'useUniqueCache_conf' => array(
                                  'strtolower' => 1,
                                  'spaceCharacter' => '-',
                            ),
                        ),
                    ),
                ),
                // backPID
                'backPID' => array(
                    array(
                        'GETvar' => 'tx_ttproducts_pi1[backPID]',
                        'lookUpTable' => array(
                            'table' => 'pages',
                            'id_field' => 'uid',
                            'alias_field' => 'title',
                            'addWhereClause' => ' AND NOT deleted',
                            'useUniqueCache' => 1,
                            'useUniqueCache_conf' => array(
                                  'strtolower' => 1,
                                  'spaceCharacter' => '-',
                            ),
                        ),
                    ),
                ), 
            ),
        ),
        'fileName' => array (
            'defaultToHTMLsuffixOnPrev' => false,
            'index' => array (
                'rss.xml' => array (
                    'keyValues' => array (
                        'type' => '100',
                    ),
                ),
                'rss091.xml' => array (
                    'keyValues' => array (
                        'type' => '101',
                    ),
                ),
                'rdf.xml' => array (
                    'keyValues' => array (
                        'type' => '102',
                    ),
                ),
                'atom.xml' => array (
                    'keyValues' => array (
                        'type' => '103',
                    ),
                ),
            ),
        ),
    ),
);
?>


Die class.tx_ttproducts_list_view.php ist auch umgeschrieben, wie hier in dem Topic beschrieben.

Woran könnte es denn noch hängen?
ProfilWWW
Verfasst am: 09. 08. 2010 [16:18]
allvitalia
Dabei seit: 08.07.2009
Beiträge: 4
Hallo und einen schönen Tag,
ich habe soweit die Kategorien von tt_products als Pfad in typo3 4.3.3. Nur wenn ich auf die Artikel (single view) dann zeigt es zwar den Link
(http://meineDomain.de/detailansicht.html?tt_products%5BbackPID%5D=93&tt_products%5Bproduct%5D=12&tt_products%5Bcat%5D=1&cHash=723d38b9b09c2e776f00fff0d2b168b0)
zum Produkt aber die Seite lädt dann die Index-Seite.

Meine Einstellungen in der localconf:
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array (
'_DEFAULT' => array (
'init' => array (
'enableCHashCache' => '1',
'appendMissingSlash' => 'ifNotFile',
'enableUrlDecodeCache' => '1',
'enableUrlEncodeCache' => '1',
),
'redirects' => array (
),
'preVars' => array (
'0' => array (
'GETvar' => 'no_cache',
'valueMap' => array (
'nc' => '1',
),
'noMatch' => 'bypass'
),
'1' => array (
'GETvar' => 'L',
'valueMap' => array (
'de' => '0',
'en' => '1',
),
'noMatch' => 'bypass',
),
'2' => array (
'GETvar' => 'lang',
'valueMap' => array (
'de' => 'de',
'en' => 'en',
),
'noMatch' => 'bypass',
),
/* '3' => array (
'GETvar' => 'backPID',
'valueMap' => array(
'dummy' => '1',
),
'noMatch' => 'bypass',
),*/
),
'pagePath' => array (
'type' => 'user',
'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
'spaceCharacter' => '-',
'languageGetVar' => 'L',
'expireDays' => '7',
'rootpage_id' => '46',
),
'fixedPostVars' => array (
),
'postVarSets' => array (
'_DEFAULT' => array (
'archive' => array (
'0' => array (
'GETvar' => 'tx_ttnews[year]',
),
'1' => array (
'GETvar' => 'tx_ttnews[month]',
'valueMap' => array (
'january' => '01',
'february' => '02',
'march' => '03',
'april' => '04',
'may' => '05',
'june' => '06',
'july' => '07',
'august' => '08',
'september' => '09',
'october' => '10',
'november' => '11',
'december' => '12',
),
),
),
'browse' => array (
'0' => array (
'GETvar' => 'tx_ttnews[pointer]',
),
),
'select_category' => array (
'0' => array (
'GETvar' => 'tx_ttnews[cat]',
),
),
'article' => array (
'0' => array (
'GETvar' => 'tx_ttnews[tt_news]',
'lookUpTable' => array (
'table' => 'tt_news',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => '1',
'useUniqueCache_conf' => array (
'strtolower' => '1',
'spaceCharacter' => '-',
),
),
),
'1' => array (
'GETvar' => 'tx_ttnews[swords]',
),
),
// product categories
'categories' => array(
array(
'GETvar' => 'tx_ttproducts_pi1[cat]',
'lookUpTable' => array(
'table' => 'tt_products_cat',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
),
// products
'products' => array(
array(
'GETvar' => 'tx_ttproducts_pi1[product]',
'lookUpTable' => array(
'table' => 'tt_products',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
),
// backPID
'backPID' => array(
array(
'GETvar' => 'tx_ttproducts_pi1[backPID]',
'lookUpTable' => array(
'table' => 'pages',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
),
),
),
),
),
'fileName' => array (
'defaultToHTMLsuffixOnPrev' => false,
'index' => array (
'rss.xml' => array (
'keyValues' => array (
'type' => '100',
),
),
'rss091.xml' => array (
'keyValues' => array (
'type' => '101',
),
),
'rdf.xml' => array (
'keyValues' => array (
'type' => '102',
),
),
'atom.xml' => array (
'keyValues' => array (
'type' => '103',
),
),
),
),
),
);


class.tx_ttproducts_list_view.php:

// Print Item Title
$wrappedSubpartArray=array();
$addQueryString=array();
$typoVersion = t3lib_div::int_from_ver($GLOBALS['TYPO_VERSION']);
$pid = $this->page->getPID($this->conf['PIDitemDisplay'], $this->conf['PIDitemDisplay.'], $row);

if ($typoVersion < 3008000) {
$pageLink = htmlspecialchars('index.php?id='.$pid.'&amp;'.$this->pibase->prefixId.'['.strtolower($itemTable->marker).']='.intval($row['uid']).'&amp;'.$this->pibase->prefixId.'[backPID]='.$TSFE->id);
} else {
$addQueryString[$itemTable->piVar] = intval($row['uid']);
$piVarCat = $this->pibase->piVars[$categoryTable->piVar];
if ($this->conf['PIDlistDisplay']) {
$bUseBackPid = false;
} else {
$bUseBackPid = true;
}
if ($piVarCat) {
$cat = $piVarCat;
}
if ($cat) {
$addQueryString[$categoryTable->piVar] = $cat;
}


und die .htaccess:

RewriteEngine On
RewriteBase /

RewriteRule ^(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/ - [L]
RewriteRule ^typo3$ typo3/index_re.php [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l

RewriteRule .*\.(html|pdf)$ index.php [L]
RewriteRule ^typo3$ - [L]
RewriteRule ^typo3/.*$ - [L]



Habe ich einen Fehler drin?
Wäre sehr dankbar für Hilfe.
ProfilWWW