routeEnhancers:
  ProductPageVariant:
    type: Extbase
    extension: CartProducts
    plugin: Products
    routes:
      - { routePath: '/{product}/{beVariantOption1}-{beVariantOption2}', _controller: 'Product::show', _arguments: { product: 'product', beVariantOption1: 'beVariantOption1', beVariantOption2: 'beVariantOption2' } }
      - { routePath: '/{product}/{beVariantOption1}', _controller: 'Product::show', _arguments: { product: 'product', beVariantOption1: 'beVariantOption1' } }
      - { routePath: '/{product}', _controller: 'Product::show', _arguments: { product: 'product' } }
      # - { routePath: '/{product}', _controller: 'Product::show', _arguments: { product: 'product' } }
    defaultController: 'Product::show'
      # requirements:
      # title: '\d+'
    # title: '\d+'
    # title: '\d+'

    aspects:
      product:
        type: PersistedAliasMapper
        tableName: tx_cartproducts_domain_model_product_product
        routeFieldName: path_segment
      attributeOne:
        type: PersistedAliasMapper
        tableName: tx_cartproducts_domain_model_product_bevariantattributeoption
        routeFieldName: path_segment

      attributeTwo:
        type: PersistedAliasMapper
        tableName: tx_cartproducts_domain_model_product_bevariantattributeoption
        routeFieldName: path_segment

#  ProductPageVariant_:
#    type: Extbase
#    extension: CartProducts
#    plugin: ProductPartial
#    routes:
#      - { routePath: '/fetch-form/{product}/{beVariantOption1}-{beVariantOption2}', _controller: 'Product::show', _arguments: { product: 'product', beVariantOption1: 'beVariantOption1', beVariantOption2: 'beVariantOption2' } }
#      - { routePath: '/fetch-form/{product}/{beVariantOption1}', _controller: 'Product::show', _arguments: { product: 'product', beVariantOption1: 'beVariantOption1' } }
#      - { routePath: '/fetch-form/{product}', _controller: 'Product::show', _arguments: { product: 'product' } }
#      # - { routePath: '/{product}', _controller: 'Product::show', _arguments: { product: 'product' } }
#    defaultController: 'Product::show'
#      # requirements:
#    # title: '\d+'
#    # title: '\d+'
#    # title: '\d+'
#
#    aspects:
#      product:
#        type: PersistedAliasMapper
#        tableName: tx_cartproducts_domain_model_product_product
#        routeFieldName: path_segment
#      beVariantOption1:
#        type: PersistedAliasMapper
#        tableName: tx_cartproducts_domain_model_product_bevariantattributeoption
#        routeFieldName: path_segment
#      beVariantOption2:
#        type: PersistedAliasMapper
#        tableName: tx_cartproducts_domain_model_product_bevariantattributeoption
#        routeFieldName: path_segment
