You are here

commerce-add-to-wishlist-link.html.twig in Commerce Add To Cart Link 2.x

Same filename and directory in other branches
  1. 8 modules/wishlist/templates/commerce-add-to-wishlist-link.html.twig

Default template for add to cart link.

Available variables:

  • attributes: HTML attributes for the wrapper.
  • url: The URL to the add to cart route.
  • product_variation: The product variation entity.

File

modules/wishlist/templates/commerce-add-to-wishlist-link.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. *
  5. * Default template for add to cart link.
  6. *
  7. * Available variables:
  8. * - attributes: HTML attributes for the wrapper.
  9. * - url: The URL to the add to cart route.
  10. * - product_variation: The product variation entity.
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. <div{{ attributes }}>
  16. <a href="{{ url }}" class="add-to-wishlist-link" rel="nofollow" data-variation="{{ product_variation.id }}">{{ 'Add to wishlist'|t }}</a>
  17. </div>