Advertisement
sairi

commerce-product.html.twig

Dec 17th, 2022
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. {#
  2. /**
  3. * @file
  4. *
  5. * Default product template.
  6. *
  7. * Available variables:
  8. * - attributes: HTML attributes for the wrapper.
  9. * - product: The rendered product fields.
  10. * Use 'product' to print them all, or print a subset such as
  11. * 'product.title'. Use the following code to exclude the
  12. * printing of a given field:
  13. * @code
  14. * {{ product|without('title') }}
  15. * @endcode
  16. * - product_entity: The product entity.
  17. * - product_url: The product URL.
  18. *
  19. * @ingroup themeable
  20. */
  21. #}
  22.  
  23. <style type="text/css">
  24. .page-header {
  25. display: none;
  26. }
  27.  
  28. </style>
  29.  
  30.  
  31. <article{{ attributes }}>
  32. {# - product|without('variation_attributes') - #}
  33. </article>
  34.  
  35.  
  36. {{ kint( product|keys ) }}
  37.  
  38.  
  39.  
  40.  
  41. <div class="col-md-6">
  42.  
  43. {# product.variation_field_kategori_imej #}
  44.  
  45.  
  46. {% set imej = product.variation_field_kategori_imej %}
  47.  
  48. {# imej #}
  49.  
  50. {% for img in imej %}
  51.  
  52. {% if img.entity %}
  53.  
  54. {% for imgv in img %}
  55.  
  56. {{ kint( imgv|keys) }}
  57. {{ kint( imgv.entity.uri.value) }}
  58. {{ kint( file_url( imgv.entity.uri.value )) }}
  59.  
  60. {% set imagestyle = {
  61. '#theme': 'image_style',
  62. '#style_name': 'large',
  63. '#uri': imgv.entity.uri.value,
  64. '#alt': imgv.alt,
  65. '#attributes': { class: 'pruebaclase' },
  66. } %}
  67.  
  68. {{ imagestyle }}
  69.  
  70.  
  71.  
  72. {% endfor%}
  73.  
  74. {% endif%}
  75.  
  76.  
  77. {% endfor %}
  78.  
  79.  
  80.  
  81.  
  82.  
  83. </div>
  84.  
  85.  
  86.  
  87. <div class="col-md-6">
  88.  
  89. <h3> {{ product.title }}</h3>
  90.  
  91. <br>
  92.  
  93. {{ product.field_kategori }}
  94.  
  95. {{ product. field_jenama }}
  96. <br>
  97. {{ product.variation_price }}
  98. <br>
  99. {{ product.field_penerangan }}
  100. <br>
  101.  
  102. {{ product.variations }}
  103.  
  104.  
  105. </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement