commercetools-8.x-1.2-alpha1/modules/commercetools_content/templates/commercetools-product-titles-item.html.twig
modules/commercetools_content/templates/commercetools-product-titles-item.html.twig
{#
/**
* @file
*
* Default product card template.
*
* Available variables:
* - attributes: HTML attributes for the wrapper.
* - product: The commercetools product data.
*
* @ingroup themeable
*/
#}
{{ attach_library('commercetools/commercetools.bootstrap_checker') }}
<span{{ attributes }}>
<a class="text-decoration-none" href="{{ url }}">
{{ product.name }} - <span class="price">
{% if product.price.discounted %}
<del>{{ product.price.localizedPrice ?? unavailable_data_text }}</del>
<span class="discount text-danger">{{ product.price.discounted.localizedPrice }}</span>
{% else %}
{{ product.price.localizedPrice ?? unavailable_data_text }}
{% endif %}
</span>
</a>
</span>
