custom/plugins/HyBuys/src/Resources/views/storefront/component/product/card/wishlist.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/product/card/wishlist.html.twig' %}
  2. {% block component_product_wishlist %}
  3.     {% set addToWishlistOptions = {
  4.         productId: productId,
  5.         router: {
  6.             add: {
  7.                 afterLoginPath: path('frontend.wishlist.add.after.login', { productId: productId }),
  8.                 path: path('frontend.wishlist.product.add', { productId: productId }),
  9.                 token: sw_csrf('frontend.wishlist.product.add', {"mode": "token"})
  10.             },
  11.             remove: {
  12.                 path: path('frontend.wishlist.product.remove', { productId: productId }),
  13.                 token: sw_csrf('frontend.wishlist.product.remove', {"mode": "token"}),
  14.             }
  15.         }
  16.     } %}
  17.     {% set size = size ?? 'md' %}
  18. {#    <div class="product-wishlist">#}
  19.         {% block component_product_wishlist_button %}
  20.             <a
  21.                 class="product-wishlist-{{ productId }} favorite_btn icon_heart selected product-wishlist-not-added product-wishlist-loading"
  22.                 title="{{ "listing.toggleWishlist"|trans|sw_sanitize }}"
  23.                 data-add-to-wishlist="true"
  24.                 data-add-to-wishlist-options="{{ addToWishlistOptions|json_encode }}"
  25.             >
  26.                 {% block component_product_wishlist_icon %}
  27. {#                    {% sw_icon 'heart-fill' style { 'class': 'wishlist icon-wishlist-added', 'size': size } %}#}
  28. {#                    {% sw_icon 'heart' style {'class': 'wishlist icon-wishlist-not-added', 'size': size } %}#}
  29. {#                    {% if showText %}#}
  30. {#                        <span class="product-wishlist-btn-content text-wishlist-not-added product-wishlist-btn-content-{{ size }}">#}
  31. {#                            {{ "listing.addToWishlist"|trans|sw_sanitize }}#}
  32. {#                        </span>#}
  33. {#                        <span class="product-wishlist-btn-content text-wishlist-remove product-wishlist-btn-content-{{ size }}">#}
  34. {#                            {{ "listing.removeFromWishlist"|trans|sw_sanitize }}#}
  35. {#                        </span>#}
  36. {#                    {% endif %}#}
  37.                 {% endblock %}
  38.             </a>
  39.         {% endblock %}
  40. {#    </div>#}
  41. {% endblock %}