---
title: "Route Enhancers"
manual: "Cart Products"
version: "main"
permalink: "https://docs.typo3.org/permalink/extcode/cart-products:route-enhancers@main"
source: "Tutorials/RouteEnhancers/Index.rst"
rendered: "2026-11-24T20:21:03+00:00"
---

# Route Enhancers {#route-enhancers}

To get speaking URLs it's necessary to add a Route Enhancer for the detail view.

Be aware that you need to adapt the `limitToPages` entry.

**config/sites/\<your-site>/config.yaml**

```yaml
routeEnhancers:
  CartProducts:
    type: Extbase
    limitToPages:
      - 123
    extension: CartProducts
    plugin: ShowProduct
    routes:
      - routePath: '/{product-title}'
        _controller: 'Product::show'
        _arguments:
          product-title: product
    defaultController: 'Product::show'
    aspects:
      product-title:
        type: PersistedAliasMapper
        tableName: tx_cartproducts_domain_model_product_product
        routeFieldName: path_segment
```

> [!NOTE]
> **Multi-site setup**
>
> The TCA configuration for `path_segment` sets `eval = uniqueInSite`.
>
> On a TYPO3 setup with multiple sites (= multiple roots) every site can have
> its own product with the same path segment. This means all sites can have
> an individual product with the path segment `t-shirt`.
>
> Due to this setting it is not possible to share products between multiple
> sites. To achieve this you need to set
>
> **sitepackage/Configuration/TCA/Overrides/tx_cartproducts_domain_model_product_product.php**
>
> ```php
> $GLOBALS['TCA']['tx_cartproducts_domain_model_product_product']['columns']['path_segment']['config']['eval'] = 'unique';
> ```
