keep commerce-product-variation.html.twig, invoked when displaying the cart

Created on 23 September 2017, over 7 years ago
Updated 12 May 2023, almost 2 years ago

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.

πŸ“Œ Task
Status

Active

Version

2.0

Component

Product

Created by

πŸ‡ΊπŸ‡ΈUnited States websiteworkspace

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024