templates/bundles/BitBagSyliusWishlistPlugin/Common/_addToWishlistIcon.html.twig line 1

Open in your IDE?
  1. {% if app.user %}
  2.     {% if findAllByShopUserAndToken(app.user)|length < 2 %}
  3.         <a
  4.                 href="{{ path('bitbag_sylius_wishlist_plugin_shop_locale_wishlist_add_product', {'productId': product.id}) }}"
  5.                 class="bitbag-add-to-wishlist bb-wishlist-button product-card-button text-xs"
  6.                 data-product-name="{{ product.name }}"
  7.                 {{ sylius_test_html_attribute('wishlist-add-product') }}
  8.         >
  9.             <span class="material-symbols-outlined">bookmark</span>
  10.             {{ 'app.ui.product.card.add_to_list'|trans }}
  11.         </a>
  12.     {% else %}
  13.         <div class="ui hyfindr btn product-card-button bb-wishlist-button pointing bottom dropdown button">
  14.             <span class="material-symbols-outlined">bookmark</span>
  15.             {{ 'app.ui.product.card.add_to_list'|trans }}
  16.             <div class="menu" data-bb-wishlist-hrefs="hrefs-adding-variant">
  17.                 {% for wishlist in findAllByShopUserAndToken(app.user)  %}
  18.                     <a
  19.                             href="{{ path('bitbag_sylius_wishlist_plugin_shop_locale_wishlist_add_product_to_selected_wishlist', {'wishlistId': wishlist.id, 'productId': product.id}) }}"
  20.                             class="item wishlist-item"
  21.                             data-product-name="{{ product.name }}"
  22.                             {{ sylius_test_html_attribute('bitbag-add-to-wishlist') }}
  23.                     >
  24.                         <span>
  25.                             {{ wishlist.name }}
  26.                         </span>
  27.                     </a>
  28.                 {% endfor %}
  29.             </div>
  30.         </div>
  31.     {% endif %}
  32. {% else %}
  33.     {% if findAllByAnonymousAndChannel(sylius.channel)|length < 2 %}
  34.         <a
  35.                 href="{{ path('bitbag_sylius_wishlist_plugin_shop_locale_wishlist_add_product', {'productId': product.id}) }}"
  36.                 class="bitbag-add-to-wishlist bb-wishlist-button product-card-button text-xs"
  37.                 data-product-name="{{ product.name }}"
  38.                 {{ sylius_test_html_attribute('wishlist-add-product') }}
  39.         >
  40.             <span class="material-symbols-outlined">bookmark</span>
  41.             {{ 'app.ui.product.card.add_to_list'|trans }}
  42.         </a>
  43.     {% else %}
  44.         <div class="ui hyfindr btn product-card-button bb-wishlist-button pointing bottom dropdown button">
  45.             <span class="material-symbols-outlined">bookmark</span>
  46.             {{ 'app.ui.product.card.add_to_list'|trans }}
  47.             <div class="menu" data-bb-wishlist-hrefs="hrefs-adding-variant">
  48.                 {% for wishlist in findAllByAnonymousAndChannel(sylius.channel) %}
  49.                     <a
  50.                             href="{{ path('bitbag_sylius_wishlist_plugin_shop_locale_wishlist_add_product_to_selected_wishlist', {'wishlistId': wishlist.id, 'productId': product.id}) }}"
  51.                             class="item wishlist-item"
  52.                             data-product-name="{{ product.name }}"
  53.                             {{ sylius_test_html_attribute('wishlist-add-product') }}
  54.                     >
  55.                         <span>
  56.                             {{ wishlist.name }}
  57.                         </span>
  58.                     </a>
  59.                 {% endfor %}
  60.             </div>
  61.         </div>
  62.     {% endif %}
  63. {% endif %}