- πΉπ·Turkey rgnyldz
Is there any other way to customize the product variation? For example print the id of the selected variation?
The internal - commerce-product-variation.html.twig - file doesn't ever seem to ever get invoked. This was tested by modifying the internal .twig file:
- commerce-product-variation.html.twig -
located at:
{sitecode}modules/commerce/modules/product/templates
with an addition div, just to see if that div appeared in the final html output as proof of invocation, but it does not.
(contents of .twig file with simple test modification)
{#
/**
* @file
*
* Default template for product variations. - - - EXTRA <div> added for test output/invocation verification
*
* 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.
* - url: The product URL.
*
* @ingroup themeable
*/
#}
<div{{ attributes }}>
<div class="test_commerce_product_variation_layout">
{{- product_variation -}}
</div>
</div>
After multiple tests (all caches cleared of course), the final output never included the extra div wrapper added just for testing. The conclusion is that DC 2.x never invokes this .twig file.
Active
2.0
Product
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Is there any other way to customize the product variation? For example print the id of the selected variation?