You are here

commerce-pado-addon-product-variation-label.html.twig in Commerce Product Add-on 8

Default product add-on add product variation label template.

Available variables:

  • variation_entity: The add on product.

File

tests/modules/commerce_pado_test/templates/commerce-pado-addon-product-variation-label.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default product add-on add product variation label template.
  5. *
  6. * Available variables:
  7. * - variation_entity: The add on product.
  8. *
  9. * @ingroup themeable
  10. */
  11. #}
  12. {% if variation_entity.hasField('attribute_color') %}
  13. {{ variation_entity.getAttributeValue('attribute_color').label }} for {{ variation_entity.getPrice|commerce_price_format }}
  14. {% else %}
  15. {{ variation_entity.label }} for {{ variation_entity.getPrice|commerce_price_format }}
  16. {% endif %}