{% if sylius_bundle_loaded_checker('SyliusShopBundle') %} {% set enabled_channels = product.channels|filter(channel => channel.enabled == true) %} {% if not product.enabled or enabled_channels|length < 1 %} {{ ux_icon('tabler:arrow-up-right') }} {{ 'sylius.ui.view_in_store'|trans }} {% elseif enabled_channels|length > 1 %} {% else %} {% for channel in enabled_channels %} {% set product_translation = sylius_product_translation(product, channel) %} {% if product_translation is not null %} {% set url = sylius_channel_url(path('sylius_shop_product_show', {'slug': product_translation.slug, '_locale': product_translation.locale}), channel) %} {% endif %} {{ ux_icon('tabler:arrow-up-right') }} {{ 'sylius.ui.view_in_store'|trans }} {% endfor %} {% endif %} {% endif %}