sylius_shop:
    resource: "@SyliusShopBundle/Resources/config/routing.yml"
    prefix: /{_locale}
    requirements:
        _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$

sylius_shop_payum:
    resource: "@SyliusShopBundle/Resources/config/routing/payum.yml"

sylius_shop_default_locale:
    path: /
    methods: [GET]
    defaults:
        _controller: sylius.controller.shop.locale_switch::switchAction

sylius_paypal:
    resource: "@SyliusPayPalPlugin/Resources/config/shop_routing.yaml"
    prefix: /{_locale}
    requirements:
        _locale: ^[A-Za-z]{2,4}(_([A-Za-z]{4}|[0-9]{3}))?(_([A-Za-z]{2}|[0-9]{3}))?$     

# see https://web.dev/change-password-url/
sylius_shop_request_password_reset_token_redirect:
    path: /.well-known/change-password
    methods: [GET]
    controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction
    defaults:
        route: sylius_shop_request_password_reset_token
        permanent: false

# config/routes/sylius_overrides.yaml

sylius_shop_product_index:
    path: /produits/{slug}
    methods: [GET]
    defaults:
        _controller: sylius.controller.product::indexAction
        _sylius:
            template: "@SyliusShop/Product/index.html.twig"
            grid: sylius_shop_product
    requirements:
        slug: .+(?<!/)

bootstrap_child_theme_routes:
    resource: "../../themes/BootstrapChildTheme/config/routes.yaml"

redirect_sylius_shop_product_index:
    path: /{_locale}/taxons/{slug}
    controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction
    defaults:
        route: bitbag_sylius_elasticsearch_plugin_shop_list_products
        permanent: true
    requirements:
        _locale: ^[a-z]{2}(?:_[A-Z]{2})?$
        slug: .+

# config/routes/sylius/shop/partial/taxon.yml

# config/routes/sylius/shop/partial/product_partial.yml

app_shop_partial_taxon:
  path: /partial/taxon/{slug}
  methods: [GET]
  defaults:
    _controller: App\Controller\ProductController::partialByTaxonAction