You are here

dc-ajax-add-cart-popup.html.twig in Commerce Ajax Add to Cart 8

Default template for the ajax add-to-cart popup.

Available variables:

  • attributes: HTML attributes for the wrapper.
  • product_variation: The rendered product variation fields. Use 'product_variation' to print them all, or print a subset such as 'product_variation.title'. Use the following code to exclude the printing of a given field:

  {{ product_variation|without('title') }}
  
  • product_variation_entity: The product variation entity.
  • cart_url: The URL of the shopping cart page.

File

modules/dc_ajax_add_cart_popup/templates/dc-ajax-add-cart-popup.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. *
  5. * Default template for the ajax add-to-cart popup.
  6. *
  7. * Available variables:
  8. * - attributes: HTML attributes for the wrapper.
  9. * - product_variation: The rendered product variation fields.
  10. * Use 'product_variation' to print them all, or print a subset such as
  11. * 'product_variation.title'. Use the following code to exclude the
  12. * printing of a given field:
  13. * @code
  14. * {{ product_variation|without('title') }}
  15. * @endcode
  16. * - product_variation_entity: The product variation entity.
  17. * - cart_url: The URL of the shopping cart page.
  18. *
  19. * @ingroup themeable
  20. */
  21. #}
  22. <div{{ attributes }}>
  23. <p>
  24. {{ 'The item has been added to your cart.'|t }}
  25. </p>
  26. <div>
  27. {{ product_variation }}
  28. </div>
  29. <p>
  30. <a href="{{ cart_url }}">{{ 'View your cart'|t }}</a>
  31. </p>
  32. </div>