I want to place a link to add a product to the cart as indicated by the documentation and I have to use the path 'sylius_shop_partial_cart_add_item' with the parameter 'productId'
<a href="{{ path('sylius_shop_partial_cart_add_item', {'productId': product.id }) }}">{{ 'sylius.ui.add_to_cart'|trans }}</a>
returns the error:
Unable to find template "/add.html.twig" (looked into: /var/www/sylius-prueba/vendor/knplabs/knp-menu/src/Knp/Menu/Resources/views, /var/www/sylius-prueba/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form).
If I add a 'template' parameter as indicated by the routing.yml file by default.
<a href="{{ path('sylius_shop_partial_cart_add_item', {'productId': product.variants.owner.id, 'template': '@SyliusShop/Cart/summary.html.twig' }) }}">{{ 'sylius.ui.add_to_cart'|trans }}</a>
I get the error that the template variable can not be found in the template.
I do not know what to do without redoing Sylius default drivers.