# This file is part of the Sylius package.
# (c) Sylius Sp. z o.o.

sylius_shop_product_show:
    path: /products/{slug}
    methods: [GET]
    defaults:
        _controller: sylius.controller.product::showAction
        _sylius:
            template: "@SyliusShop/Product/show.html.twig"
            repository:
                method: findOneByChannelAndSlug
                arguments:
                    - "expr:service('sylius.context.channel').getChannel()"
                    - "expr:service('sylius.context.locale').getLocaleCode()"
                    - $slug

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