routeEnhancers configuration for typo3 > 9.5

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
rungis
Posts: 14
Joined: 23 Oct 2019, 12:14

routeEnhancers configuration for typo3 > 9.5

Post by rungis » 23 Oct 2019, 13:00

My environments
TYPO3 Version 9.5.10
Webserver nginx/1.17.4
PHP Version 7.3.10
Database (Default) MySQL 5.5.5-10.4.8-MariaDB-1:10.4.8+maria~bionic
Application Context Development/Dev
Composer mode Enabled
Operating System Linux 5.0.0-25-generic
aimeos 19.10.1

Please, could you provide full configuration file for typo3 >9.5 routeEnhancers ? I am feeling stuck.
TYPO3 Version 10.4.12
Aimeos 20.10.5
Webserver nginx/1.15.9
PHP Version 7.3.13-1+ubuntu19.04.1+deb.sury.org+1
Database (Default) MySQL 5.7.28
Operating System Linux 5.0.0-38-generic

User avatar
aimeos
Administrator
Posts: 7835
Joined: 01 Jan 1970, 00:00

Re: routeEnhancers configuration for typo3 > 9.5

Post by aimeos » 24 Oct 2019, 07:33

Try this one and adapt the page IDs in "limitToPages" to your own ones:

Code: Select all

routeEnhancers:
  AimeosList:
    type: Extbase
    namespace: ai
    limitToPages:
      - 120
    routes:
      -
        routePath: /
        _controller: 'Catalog::list'
      -
        routePath: '/{f_name}~{f_catid}'
        _controller: 'Catalog::list'
      -
        routePath: '/{f_name}~{f_catid}'
        _controller: 'Catalog::tree'
  AimeosDetail:
    type: Extbase
    namespace: ai
    limitToPages:
      - 128
    routes:
      -
        routePath: '/{d_name}'
        _controller: 'Catalog::detail'
      -
        routePath: '/{d_name}/d/{d_prodid}'
        _controller: 'Catalog::detail'
      -
        routePath: '/pin/{pin_action}/{pin_id}/{d_name}'
        _controller: 'Catalog::detail'
    defaults:
      d_pos: ''
  AimeosBasket:
    type: Extbase
    namespace: ai
    limitToPages:
      - 127
    routes:
      -
        routePath: /
        _controller: 'Basket::index'
      -
        routePath: /{b_action}
        _controller: 'Basket::index'
  AimeosCheckout:
    type: Extbase
    namespace: ai
    limitToPages:
      - 126
    routes:
      -
        routePath: /
        _controller: 'Checkout::index'
      -
        routePath: /{c_step}
        _controller: 'Checkout::index'
  AimeosConfirm:
    type: Simple
    limitToPages:
      - 125
    routePath: /{code}
  AimeosProfile:
    type: Extbase
    namespace: ai
    limitToPages:
      - 118
    routes:
      -
        routePath: /
        _controller: 'Account::index'
      -
        routePath: /
        _controller: 'Account::watch'
      -
        routePath: /
        _controller: 'Account::favorite'
      -
        routePath: /watch/{wat_action}
        _controller: 'Account::watch'
      -
        routePath: /watch/{wat_action}/{wat_id}
        _controller: 'Account::watch'
      -
        routePath: /fav/{fav_action}
        _controller: 'Account::favorite'
      -
        routePath: /fav/{fav_action}/{fav_id}
        _controller: 'Account::favorite'
      -
        routePath: /history/{his_action}/{his_id}
        _controller: 'Account::history'
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

rungis
Posts: 14
Joined: 23 Oct 2019, 12:14

Re: routeEnhancers configuration for typo3 > 9.5

Post by rungis » 24 Oct 2019, 15:28

Thank you much for the help. Your code snippet doesn't work for me but I have received some hints.
This code work well for my task :)

Code: Select all

 routeEnhancers:
  Aimeos:
    type: Extbase
    namespace: ai
    limitToPages: 13
    defaultController: 'Catalog::list'
    routes:
      - { routePath: '/{d_name}', _controller: 'Catalog::detail' }
      - { routePath: '/pin/{pin_action}/{pin_id}/{d_name}', _controller: 'Catalog::detail' }
      - { routePath: '/{f_name}/{f_catid}', _controller: 'Catalog::list' }
      - { routePath: '/{f_name}/{f_catid}/{l_page}', _controller: 'Catalog::tree' }
      - { routePath: '/{f_name}/{f_catid}/{f_sort}', _controller: 'Catalog::tree' }
      - { routePath: '/{f_name}/{f_catid}/{l_page}/{f_sort}', _controller: 'Catalog::tree' }
      - { routePath: '/watch/{wat_action}', _controller: 'Account::watch' }
      - { routePath: '/watch/{wat_action}/{wat_id}', _controller: 'Account::watch' }
      - { routePath: '/fav/{fav_action}', _controller: 'Account::favorite' }
      - { routePath: '/fav/{fav_action}/{fav_id}', _controller: 'Account::favorite' }
      - { routePath: '/history/{his_action}/{his_id}', _controller: 'Account::history' }
      - { routePath: '/{b_action}', _controller: 'Basket::index' }
      - { routePath: '/{c_step}', _controller: 'Checkout::index' }
    defaults:
      c_step: ''
      d_pos: ''
      f_search: ''
      f_sort: ''
      l_page: '1'
    requirements:
      d_pos: '[0-9]+'
      f_sort: '-?[a-z]+'
      l_page: '[0-9]+'
TYPO3 Version 10.4.12
Aimeos 20.10.5
Webserver nginx/1.15.9
PHP Version 7.3.13-1+ubuntu19.04.1+deb.sury.org+1
Database (Default) MySQL 5.7.28
Operating System Linux 5.0.0-38-generic

User avatar
aimeos
Administrator
Posts: 7835
Joined: 01 Jan 1970, 00:00

Re: routeEnhancers configuration for typo3 > 9.5

Post by aimeos » 25 Oct 2019, 08:01

Why didn't our example work? What was the problem?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

rungis
Posts: 14
Joined: 23 Oct 2019, 12:14

Re: routeEnhancers configuration for typo3 > 9.5

Post by rungis » 25 Oct 2019, 08:57

sorry a lot ! your example is working as well . I have problems in the part of sorting & paginating catalog list only.
TYPO3 Version 10.4.12
Aimeos 20.10.5
Webserver nginx/1.15.9
PHP Version 7.3.13-1+ubuntu19.04.1+deb.sury.org+1
Database (Default) MySQL 5.7.28
Operating System Linux 5.0.0-38-generic

Post Reply