---
title: "CoolURI & tt_products"
url: "https://www.typo3.net/d/96717-cooluri-tt-products"
source: "typo3.net"
tags: ["Extensions","Frage","URLs & Routing"]
created: "2010-02-15"
last_reply: "2010-11-05"
replies: 4
solved: false
page: 1
pages: 1
lang: "de"
---

# CoolURI & tt_products

Extensions · 4 Antworten · gestartet 2010-02-15

## Eröffnungsbeitrag

**schmutti** · 2010-02-15 · [Beitrag #1](https://www.typo3.net/d/96717-cooluri-tt-products/1)

Hallo zusammen,
ich schaffe es gerade nicht die von tt_products erzeugten URLs sauber in CoolUri darzustellen. Der Rest der Seite funktioniert wunderbar, das heist das Modul an sich funktioniert. Woran  kann das liegen?

CoolURIConf.xml

```php
<?xml version="1.0" encoding="utf-8"?> 
<cooluri> 
   <cooluris>1</cooluris> 

   <cache> 
     <usecache>1</usecache> 
     <params2cool> 
       <checkforchangeevery>1</checkforchangeevery> 
     </params2cool> 
     <cool2params> 
       <translateifnotfound>0</translateifnotfound> 
       <oldlinksvalidfor>365</oldlinksvalidfor> 
     </cool2params> 
     <cacheparams>0</cacheparams> 

     <pagenotfound> 
       <status>HTTP/1.0 404 Not Found</status> 
       <behavior type="message"><![CDATA[ <h1>Page not found!</h1> 
]]></behavior> 
     </pagenotfound> 
   </cache> 

   <pagepath> 
     <title>tx_realurl_pathsegment,alias,subtitle,title</title> 
     <saveto>id</saveto> 
     <default>0</default> 
     <userfunc>tx_cooluri->getPageTitle</userfunc> 
     <t3conv>1</t3conv> 
   </pagepath> 

   <uriparts> 
     <part> 
       <parameter>tx_ttnews[tt_news]</parameter> 
       <lookindb> 
         <to>SELECT title FROM tt_news WHERE uid=$1</to> 
         <translatetoif> 
           <match>^[0-9]+$</match> 
         </translatetoif> 
         <t3conv>1</t3conv> 
       </lookindb> 
     </part> 
     <part> 
       <parameter>tx_ttproducts_pi1[product]</parameter> 
       <lookindb> 
         <to>SELECT title FROM tt_products WHERE uid=$1</to> 
         <translatetoif> 
           <match>^[0-9]+$</match> 
         </translatetoif> 
         <t3conv>1</t3conv> 
       </lookindb> 
     </part> 
     <part> 
       <parameter>tx_eeblog[showUid]</parameter> 
       <lookindb> 
         <to>SELECT subject FROM tx_eeblog_maintable WHERE uid=$1</to> 
         <translatetoif> 
           <match>^[0-9]+$</match> 
         </translatetoif> 
         <t3conv>1</t3conv> 
       </lookindb> 
     </part> 
   </uriparts> 

   <predefinedparts> 
     <part> 
       <parameter>tx_ttnews[backPid]</parameter> 
     </part> 
     <part> 
       <parameter>cHash</parameter> 
     </part> 
     <part> 
       <parameter>tx_eeblog[pointer]</parameter> 
     </part> 
     <part> 
       <parameter>tx_eeblog[backPID]</parameter> 
     </part> 
     <part> 
       <parameter>tx_ttproducts_pi1[backPID]</parameter> 
     </part> 
     <part> 
       <parameter>no_cache</parameter> 
     </part> 
   </predefinedparts> 

   <valuemaps> 
     <valuemap> 
       <parameter>L</parameter> 
       <value key="">0</value> 
       <value key="en">1</value> 
     </valuemap> 
   </valuemaps> 

   <paramorder> 
     <param>L</param> 
   </paramorder> 

</cooluri>
```

TypoScript:

```typoscript
page.config {
   simulateStaticDocuments = 0
   baseURL = https://www.my-domain.de/
   #Die Basisdomain
   tx_cooluri_enable = 1
   #Optional alte gespeicherte Links zu neuen Weiterleiten
   redirectOldLinksToNew = 1
}
```

.htaccess

```php
# Enable URL rewriting
RewriteEngine On
RewriteRule ^/(typo3|typo3temp|typo3conf|t3lib|tslib|fileadmin|uploads|showpic\.php)/ - [L]
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

# Main URL rewriting.
RewriteRule .* index.php [L]

### End: Rewrite stuff ###

### PHP Optimisation ###

# TYPO3 works fine with register_globals turned off.
# This is highly recommended!
php_flag register_globals off

# TYPO3 doesn't need this, so just turn it off.
php_flag register_argc_argv off

# Magic quotes for runtime-generated data (data from SQL, exec(), etc.)
php_flag magic_quotes_gpc off

# Order in which PHP registers GET, POST, Cookie and Built-in variables
php_value variables_order GPCS

### End: PHP optimisation ###

### Begin: Miscellaneous ###

# Make sure that directory listings are disabled
#Options -Indexes

# There is a problem with Internet Explorer and mod_gzip on Apache servers.
# For more information, see
# http://typo3.org/documentation/document-library/rtehtmlarea/Tutorial-79/
#mod_gzip_item_exclude file \.css$
#mod_gzip_item_exclude file \.png$
#mod_gzip_item_exclude file \.gif$
#mod_gzip_item_exclude file \.jpg$
#mod_gzip_item_exclude file \.jpeg$
#mod_gzip_item_exclude file \.js$

### End: Miscellaneous ###
```

Trotz dieser Einstellungen erhalten ich URLs im Format:
<https://www.my-domain.de/einzelansicht/?tt_products%5BbackPID%5D=14&tt_products%5Bproduct%5D=83&tt_products%5Bcat%5D=19,20,21>

Hat da vielleicht jemand eine Idee?
Danke
Basti

## Antworten

### [#2](https://www.typo3.net/d/96717-cooluri-tt-products/2) · GoSnA · 2010-02-16

Du schreibst deine CoolURI Conf wie folgt:

```html
     <part>
       <parameter>tx_ttproducts_pi1[product]</parameter>
       <lookindb>
         <to>SELECT title FROM tt_products WHERE uid=</to>
         <translatetoif>
           <match>^[0-9]+$</match>
         </translatetoif>
         <t3conv>1</t3conv>
       </lookindb>
     </part>
```

Anderseits schreibst du die URL sieht so aus:

> <https://www.my-domain.de/einzelansicht/?tt_products%5BbackPID%5D=14&tt_products%5Bproduct%5D=83&tt_products%5Bcat%5D=19,20,21>

Also müsste die Conf doch eigentlich

```html
     <part>
       <parameter>tt_products[product]</parameter>
       <lookindb>
         <to>SELECT title FROM tt_products WHERE uid=</to>
         <translatetoif>
           <match>^[0-9]+$</match>
         </translatetoif>
         <t3conv>1</t3conv>
       </lookindb>
     </part>
```

lauten.

### [#3](https://www.typo3.net/d/96717-cooluri-tt-products/3) · schmutti · 2010-02-22

Also, mein Fehler war einfach sowas von banal:
Es fehlt schlicht und ergreifend das $1 in der SQL Query...

Mein Setup sieht nun (lediglich der tt_products Teil) so aus:

```php
<part>
      <parameter>tt_products[cat]</parameter>
      <lookindb>
        <to>SELECT title FROM tt_products_cat WHERE uid=$1</to>
        <translatetoif>
          <match>^[0-9]+$</match>
        </translatetoif>
        <urlize>1</urlize>
      </lookindb>
    </part>
  <part>
      <parameter>tt_products[backPID]</parameter>
      <lookindb>
        <to>SELECT title FROM pages WHERE uid=$1</to>
        <translatetoif>
          <match>^[0-9]+$</match>
        </translatetoif>
        <urlize>1</urlize>
      </lookindb>
    </part>
    <part>
      <parameter>tt_products[product]</parameter>
      <lookindb>
        <to>SELECT title(uid,'-',title) FROM tt_products WHERE uid=$1</to>
        <translatetoif>
          <match>^[0-9]+$</match>
        </translatetoif>
        <urlize>1</urlize>
      </lookindb>
    </part>
```

Damit erreiche ich auch eine unterschiedliche Darstellung von Produkten mit dem gleichen Namen. Vielleicht hilfts dem ein oder anderen?!

Danke
Basti

[edit] Hier werden auch wieder die Dollar1 aus der XMl gelöscht, denkt sie euch einfach dazu  8-)

### [#4](https://www.typo3.net/d/96717-cooluri-tt-products/4) · LiThiUm-FX · 2010-03-29

ich habe ein ähnliches Problemchen und bin über meinen freund google auf diesen threat gekommen...

meine links sehen folgendermaßen aus:

<http://www.domain.de/shop/women/suiting/sundy-dress/b1f9d85b93641ffef924a19ab58703ab.html>

jetzt wäre es mir aber trotzdem lieber wenn diese ohne die kryptischen zeichen auskommen würden:

<http://www.domain.de/shop/women/suiting/sundy-dress.html>

weis hier jemand rat?

vielen dank schonmal!

### [#5](https://www.typo3.net/d/96717-cooluri-tt-products/5) · Anhur · 2010-11-05

Hallo

Ist zwar schon ein wenig her, dennoch ein Versuch:
Ich nehme mal an, dass die zeichenfolge am Ende vom cHash her kommt.
Schreib mal ein
<part>

<parameter>cHash</parameter>

</part>
in den "predefinedparts" der cooluri Konfigurationsdatei.
Wegen möglicher Probleme solltest du noch einen Blick in die Dokumentation (Kapitel 1.3).

Bis denn

Bernd

---

Quelle: „CoolURI & tt_products“, typo3.net, https://www.typo3.net/d/96717-cooluri-tt-products
Beiträge von Mitgliedern des Forums. Bitte mit Link auf die Diskussion zitieren.
