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.
1 theme call to dc-ajax-add-cart-popup.html.twig
- AjaxAddToCartPopupSubscriber::onResponse in modules/
dc_ajax_add_cart_popup/ src/ EventSubscriber/ AjaxAddToCartPopupSubscriber.php - Adds the popup confirmation message on page.
File
modules/dc_ajax_add_cart_popup/templates/dc-ajax-add-cart-popup.html.twigView source
- {#
- /**
- * @file
- *
- * 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:
- * @code
- * {{ product_variation|without('title') }}
- * @endcode
- * - product_variation_entity: The product variation entity.
- * - cart_url: The URL of the shopping cart page.
- *
- * @ingroup themeable
- */
- #}
- <div{{ attributes }}>
- <p>
- {{ 'The item has been added to your cart.'|t }}
- </p>
- <div>
- {{ product_variation }}
- </div>
- <p>
- <a href="{{ cart_url }}">{{ 'View your cart'|t }}</a>
- </p>
- </div>